MADNESS  version 0.9
Public Member Functions | Protected Attributes | List of all members

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...
 
double mask (double d) const
 Value of characteristic function at normal distance d from the surface. More...
 
double dmask (double d) const
 Derivative of characteristic function with respect to the normal distance. More...
 
double surface (double d) const
 Value of surface function at distance d normal to surface. More...
 
double dsurface (double d) const
 Value of d(surface)/ddistance. More...
 
virtual ~LLRVDomainMask ()
 
- Public Member Functions inherited from madness::DomainMaskInterface
virtual ~DomainMaskInterface ()
 

Protected Attributes

const double epsilon
 The width of the transition region. 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

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

Constructor for the domain mask.

Parameters
[in]epsilonThe effective width of the surface
virtual madness::LLRVDomainMask::~LLRVDomainMask ( )
inlinevirtual

Member Function Documentation

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 epsilon, mpfr::fabs(), and mpfr::tanh().

Referenced by 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 dmask(), epsilon, and 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 mpfr::tanh().

Referenced by dsurface(), and 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 epsilon, and mask().

Member Data Documentation

const double madness::LLRVDomainMask::epsilon
protected

The width of the transition region.

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


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