MADNESS  version 0.9
Public Member Functions | Static Public Attributes | List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for madness::DomainMaskSDFFunctor< NDIM >:
Collaboration graph
[legend]

Public Member Functions

 DomainMaskSDFFunctor (std::shared_ptr< DomainMaskInterface > mask, std::shared_ptr< SignedDFInterface< NDIM > > sdf)
 Constructor for mask/sdf functor. More...
 
 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.) More...
 
double operator() (const Vector< double, NDIM > &x) const
 Uses the functor interface to make a MADNESS function. More...
 
void setMaskFunction (int _mswitch)
 Toggles which function from DomainMaskInterface to use when making the MADNESS function. More...
 
virtual ~DomainMaskSDFFunctor ()
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< double, NDIM >
virtual bool screened (const Vector< double, NDIM > &c1, const Vector< double, NDIM > &c2) const
 Can we screen this function based on the bounding box information? More...
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()? More...
 
virtual void operator() (const Vector< double *, 1 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, double *fvals, int npts) const
 
virtual std::vector< Vector
< double, NDIM > > 
special_points () const
 Override this to return list of special points to be refined more deeply. More...
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6) More...
 
virtual ~FunctionFunctorInterface ()
 
virtual coeffT coeff (const keyT &) const
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 

Static Public Attributes

static const int MASK = 1
 Use the mask() function in mask. More...
 
static const int MASK_COMPLEMENT = 2
 Get the complement of mask() More...
 
static const int DMASK = 3
 Use the dmask() function in mask. More...
 
static const int SURFACE = 4
 Use the surface() function in mask. More...
 
static const int DSURFACE = 5
 Use the dsurface() function in mask. More...
 

Additional Inherited Members

- Public Types inherited from madness::FunctionFunctorInterface< double, NDIM >
typedef GenTensor< double > coeffT
 
typedef Key< NDIMkeyT
 

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 functor defaults to the domain mask; however, member functions can toggle between the other options.

Constructor & Destructor Documentation

Constructor for mask/sdf functor.

Parameters
maskPointer to the domain mask
sdfPointer to the signed distance function
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 madness::error().

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

Member Function Documentation

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

Uses the functor interface to make a MADNESS function.

Parameters
xPoint to compute value
Returns
Value of the desired function

Implements madness::FunctionFunctorInterface< double, NDIM >.

References madness::error().

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 madness::error().

Member Data Documentation

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

Use the dmask() function in mask.

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

Use the dsurface() function in mask.

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

Use the mask() function in mask.

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

Get the complement of mask()

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

Use the surface() function in mask.


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