MADNESS  0.10.1
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
madness::LLRVDomainMask Class Reference

Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic functions. More...

#include <sdf_domainmask.h>

Inheritance diagram for madness::LLRVDomainMask:
Inheritance graph
[legend]
Collaboration diagram for madness::LLRVDomainMask:
Collaboration graph
[legend]

Public Member Functions

 LLRVDomainMask (double epsilon)
 Constructor for the domain mask. More...
 
virtual ~LLRVDomainMask ()
 
double dmask (double d) const
 Derivative of characteristic function with respect to the normal distance. More...
 
double dsurface (double d) const
 Value of d(surface)/ddistance. More...
 
double mask (double d) const
 Value of characteristic function at normal distance d from the surface. More...
 
double surface (double d) const
 Value of surface function at distance d normal to surface. More...
 
- Public Member Functions inherited from madness::DomainMaskInterface
virtual ~DomainMaskInterface ()
 

Protected Attributes

const double epsilon
 The width of the transition region. More...
 

Private Member Functions

 LLRVDomainMask ()
 Forbidden. More...
 

Detailed Description

Provides the Li-Lowengrub-Ratz-Voight (LLRV) domain mask characteristic functions.

See X. Li, J. Lowengrub, A. Rätz, and A. Voight, `‘Solving PDEs in Complex Geometries: A Diffuse Domain Approach,’' Commun. Math. Sci., 7, p81-107, 2009.

Given a signed distance, this class implements in the domain mask and surface functions from the above reference. For the domain mask,

\[ \varphi(d) = \frac{1}{2}\left( 1 - \tanh\left( \frac{3d}{\varepsilon} \right) \right) \]

where $d$ is the signed distance. The normalized surface function is

\[ B(\varphi) = \frac{36}{\varepsilon} \varphi^2 (1-\varphi)^2. \]

The constant $36/\varepsilon$ is chosen to fulfill

\[ \int_{-\infty}^\infty B(s) \, ds = 1 \]

This class assumes the domain mask is uniformly 0 or 1 outside signed distances $ |8 \epsilon| $ since the switching function becomes 0/1 to machine precision at these levels. Specifically, for this function the parameter $ \epsilon $ is an effective measure of the full width of the surface layer since

\[ \int_{-\epsilon/2}^{\epsilon/2} B(s) \, ds \doteq 0.987 \]

and

\[ \int_{-\epsilon}^{\epsilon} B(s) \, ds \doteq 0.999963 \]

Constructor & Destructor Documentation

◆ LLRVDomainMask() [1/2]

madness::LLRVDomainMask::LLRVDomainMask ( )
inlineprivate

Forbidden.

◆ LLRVDomainMask() [2/2]

madness::LLRVDomainMask::LLRVDomainMask ( double  epsilon)
inline

Constructor for the domain mask.

Parameters
[in]epsilonThe effective width of the surface

◆ ~LLRVDomainMask()

virtual madness::LLRVDomainMask::~LLRVDomainMask ( )
inlinevirtual

Member Function Documentation

◆ dmask()

double madness::LLRVDomainMask::dmask ( double  d) const
inlinevirtual

Derivative of characteristic function with respect to the normal distance.

Parameters
[in]dThe signed distance
Returns
The derivative

Implements madness::DomainMaskInterface.

References d(), and epsilon.

Referenced by dsurface().

◆ dsurface()

double madness::LLRVDomainMask::dsurface ( double  d) const
inlinevirtual

Value of d(surface)/ddistance.

Parameters
[in]dThe signed distance
Returns
The derivative of the surface function

Implements madness::DomainMaskInterface.

References d(), dmask(), epsilon, and mask().

◆ mask()

double madness::LLRVDomainMask::mask ( double  d) const
inlinevirtual

Value of characteristic function at normal distance d from the surface.

Parameters
[in]dThe signed distance. Negative is inside,'' positive isoutside.''
Returns
The domain mask

Implements madness::DomainMaskInterface.

References d(), and epsilon.

Referenced by dsurface(), and surface().

◆ surface()

double madness::LLRVDomainMask::surface ( double  d) const
inlinevirtual

Value of surface function at distance d normal to surface.

Parameters
[in]dThe signed distance
Returns
The value of the surface function

Implements madness::DomainMaskInterface.

References d(), epsilon, and mask().

Member Data Documentation

◆ epsilon

const double madness::LLRVDomainMask::epsilon
protected

The width of the transition region.

Referenced by dmask(), dsurface(), mask(), and surface().


The documentation for this class was generated from the following file: