MADNESS 0.10.1
madness::DomainMaskSDFFunctor< NDIM > Class Template Reference

Framework for combining a signed distance function (sdf) with a domain mask to produce MADNESS functions. More...

#include <sdf_domainmask.h>

Inheritance diagram for madness::DomainMaskSDFFunctor< NDIM >:
Collaboration diagram for madness::DomainMaskSDFFunctor< NDIM >:

Public Member Functions

 DomainMaskSDFFunctor (std::shared_ptr< DomainMaskInterface > mask, std::shared_ptr< SignedDFInterface< NDIM > > sdf)
 Constructor for mask/sdf functor.
 DomainMaskSDFFunctor (std::shared_ptr< DomainMaskInterface > mask, std::shared_ptr< SignedDFInterface< NDIM > > sdf, int _mswitch)
 Constructor for mask/sdf function specifying the desired function (mask, surface, etc.).
virtual ~DomainMaskSDFFunctor ()
double operator() (const Vector< double, NDIM > &x) const
 Uses the functor interface to make a MADNESS function.
void setMaskFunction (int _mswitch)
 Toggles which function from DomainMaskInterface to use when making the MADNESS function.
Public Member Functions inherited from madness::FunctionFunctorInterface< double, NDIM >
 FunctionFunctorInterface ()
virtual ~FunctionFunctorInterface ()
virtual coeffT coeff (const keyT &) const
virtual void operator() (const Vector< double *, 1 > &, double *, int) const
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values?
virtual bool screened (const Vector< double, NDIM > &, const Vector< double, NDIM > &) const
 Can we screen this function based on the bounding box information?
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale
virtual Level special_level () const
 Override this to change the minimum level of refinement at special points (default is 6).
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply.
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()?
virtual coeffT values (const keyT &, const Tensor< double > &) const

Static Public Attributes

static const int DMASK
 Use the dmask() function in mask.
static const int DSURFACE
 Use the dsurface() function in mask.
static const int MASK
 Use the mask() function in mask.
static const int MASK_COMPLEMENT
 Get the complement of mask().
static const int SURFACE
 Use the surface() function in mask.

Private Member Functions

 DomainMaskSDFFunctor ()
 Bury the default constructor.

Private Attributes

std::shared_ptr< DomainMaskInterface > mask
 The domain mask to use.
int mswitch
 Which masking function to use (mask, surface, etc.).
std::shared_ptr< SignedDFInterface< NDIM > > sdf
 The signed distance function.

Additional Inherited Members

Public Types inherited from madness::FunctionFunctorInterface< double, NDIM >
typedef GenTensor< double > coeffT
typedef Key< NDIM > keyT
typedef double value_type
Public Attributes inherited from madness::FunctionFunctorInterface< double, NDIM >
Level special_level_

Detailed Description

template<std::size_t NDIM>
class madness::DomainMaskSDFFunctor< NDIM >

Framework for combining a signed distance function (sdf) with a domain mask to produce MADNESS functions.

This interface provides functor functionality to produce MADNESS functions for

  • the domain mask (given the sdf)
  • the derivative of the domain mask
  • the surface (given the sdf)
  • the normal derivative of the surface layer

The functor defaults to the domain mask; however, member functions can toggle between the other options.

Constructor & Destructor Documentation

◆ DomainMaskSDFFunctor() [1/3]

template<std::size_t NDIM>
madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor ( )
inlineprivate

Bury the default constructor.

◆ DomainMaskSDFFunctor() [2/3]

template<std::size_t NDIM>
madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor ( std::shared_ptr< DomainMaskInterface > mask,
std::shared_ptr< SignedDFInterface< NDIM > > sdf )
inline

Constructor for mask/sdf functor.

Parameters
maskPointer to the domain mask
sdfPointer to the signed distance function

References MASK, mask, mswitch, and sdf.

◆ DomainMaskSDFFunctor() [3/3]

template<std::size_t NDIM>
madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor ( std::shared_ptr< DomainMaskInterface > mask,
std::shared_ptr< SignedDFInterface< NDIM > > sdf,
int _mswitch )
inline

Constructor for mask/sdf function specifying the desired function (mask, surface, etc.).

Parameters
maskPointer to the domain mask
sdfPointer to the signed distance function
[in]_mswitchWhich function to use (MASK, DMASK, SURFACE, DSURFACE, or MASK_COMPLEMENT)

References DMASK, DSURFACE, madness::error(), MASK, mask, MASK_COMPLEMENT, mswitch, sdf, and SURFACE.

◆ ~DomainMaskSDFFunctor()

template<std::size_t NDIM>
virtual madness::DomainMaskSDFFunctor< NDIM >::~DomainMaskSDFFunctor ( )
inlinevirtual

Member Function Documentation

◆ operator()()

template<std::size_t NDIM>
double madness::DomainMaskSDFFunctor< NDIM >::operator() ( const Vector< double, NDIM > & x) const
inline

Uses the functor interface to make a MADNESS function.

Parameters
xPoint to compute value
Returns
Value of the desired function

References DMASK, DSURFACE, madness::error(), MASK, mask, MASK_COMPLEMENT, mswitch, sdf, and SURFACE.

◆ setMaskFunction()

template<std::size_t NDIM>
void madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction ( int _mswitch)
inline

Toggles which function from DomainMaskInterface to use when making the MADNESS function.

Parameters
_mswitchThe function to use (should be MASK, DMASK, SURFACE, DSURFACE, or MASK_COMPLEMENT)

References DMASK, DSURFACE, madness::error(), MASK, MASK_COMPLEMENT, mswitch, and SURFACE.

Referenced by main().

Member Data Documentation

◆ DMASK

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::DMASK
static

Use the dmask() function in mask.

Referenced by DomainMaskSDFFunctor(), operator()(), and setMaskFunction().

◆ DSURFACE

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::DSURFACE
static

Use the dsurface() function in mask.

Referenced by DomainMaskSDFFunctor(), operator()(), and setMaskFunction().

◆ MASK

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::MASK
static

Use the mask() function in mask.

Referenced by DomainMaskSDFFunctor(), DomainMaskSDFFunctor(), operator()(), and setMaskFunction().

◆ mask

template<std::size_t NDIM>
std::shared_ptr<DomainMaskInterface> madness::DomainMaskSDFFunctor< NDIM >::mask
private

The domain mask to use.

Referenced by DomainMaskSDFFunctor(), DomainMaskSDFFunctor(), and operator()().

◆ MASK_COMPLEMENT

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT
static

Get the complement of mask().

Referenced by DomainMaskSDFFunctor(), operator()(), and setMaskFunction().

◆ mswitch

template<std::size_t NDIM>
int madness::DomainMaskSDFFunctor< NDIM >::mswitch
private

Which masking function to use (mask, surface, etc.).

Referenced by DomainMaskSDFFunctor(), DomainMaskSDFFunctor(), operator()(), and setMaskFunction().

◆ sdf

template<std::size_t NDIM>
std::shared_ptr<SignedDFInterface<NDIM> > madness::DomainMaskSDFFunctor< NDIM >::sdf
private

The signed distance function.

Referenced by DomainMaskSDFFunctor(), DomainMaskSDFFunctor(), and operator()().

◆ SURFACE

template<std::size_t NDIM>
const int madness::DomainMaskSDFFunctor< NDIM >::SURFACE
static

Use the surface() function in mask.

Referenced by DomainMaskSDFFunctor(), main(), operator()(), and setMaskFunction().


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