MADNESS
0.10.1
|
Framework for combining a signed distance function (sdf) with a domain mask to produce MADNESS functions. More...
#include <sdf_domainmask.h>
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... | |
virtual | ~DomainMaskSDFFunctor () |
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... | |
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 > &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 bool | provides_coeff () const |
does this functor directly provide sum coefficients? or only function values? More... | |
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... | |
void | set_length_scale (double lo) |
adapt the special level to resolve the smallest length scale More... | |
virtual Level | special_level () |
Override this change level refinement for special points (default is 6) More... | |
virtual std::vector< Vector< double, NDIM > > | special_points () const |
Override this to return list of special points to be refined more deeply. More... | |
virtual bool | supports_vectorized () const |
Does the interface support a vectorized operator()? More... | |
virtual coeffT | values (const keyT &key, const Tensor< double > &tensor) const |
Static Public Attributes | |
static const int | DMASK = 3 |
Use the dmask() function in mask . More... | |
static const int | DSURFACE = 5 |
Use the dsurface() function in mask . More... | |
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 | SURFACE = 4 |
Use the surface() function in mask . More... | |
Private Member Functions | |
DomainMaskSDFFunctor () | |
Bury the default constructor. More... | |
Private Attributes | |
std::shared_ptr< DomainMaskInterface > | mask |
The domain mask to use. More... | |
int | mswitch |
Which masking function to use (mask, surface, etc.) More... | |
std::shared_ptr< SignedDFInterface< NDIM > > | sdf |
The signed distance function. More... | |
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_ |
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.
|
inlineprivate |
Bury the default constructor.
|
inline |
Constructor for mask/sdf functor.
mask | Pointer to the domain mask |
sdf | Pointer to the signed distance function |
|
inline |
Constructor for mask/sdf function specifying the desired function (mask, surface, etc.)
mask | Pointer to the domain mask | |
sdf | Pointer to the signed distance function | |
[in] | _mswitch | Which function to use (MASK, DMASK, SURFACE, DSURFACE, or MASK_COMPLEMENT) |
References madness::DomainMaskSDFFunctor< NDIM >::DMASK, madness::DomainMaskSDFFunctor< NDIM >::DSURFACE, madness::error(), madness::DomainMaskSDFFunctor< NDIM >::MASK, madness::DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT, madness::DomainMaskSDFFunctor< NDIM >::mswitch, and madness::DomainMaskSDFFunctor< NDIM >::SURFACE.
|
inlinevirtual |
|
inlinevirtual |
Uses the functor interface to make a MADNESS function.
x | Point to compute value |
Implements madness::FunctionFunctorInterface< double, NDIM >.
References madness::error(), madness::DomainMaskSDFFunctor< NDIM >::mask, madness::DomainMaskSDFFunctor< NDIM >::mswitch, and madness::DomainMaskSDFFunctor< NDIM >::sdf.
|
inline |
Toggles which function from DomainMaskInterface to use when making the MADNESS function.
_mswitch | The function to use (should be MASK, DMASK, SURFACE, DSURFACE, or MASK_COMPLEMENT) |
References madness::DomainMaskSDFFunctor< NDIM >::DMASK, madness::DomainMaskSDFFunctor< NDIM >::DSURFACE, madness::error(), madness::DomainMaskSDFFunctor< NDIM >::MASK, madness::DomainMaskSDFFunctor< NDIM >::MASK_COMPLEMENT, madness::DomainMaskSDFFunctor< NDIM >::mswitch, and madness::DomainMaskSDFFunctor< NDIM >::SURFACE.
Referenced by main().
|
static |
Use the dmask()
function in mask
.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().
|
static |
Use the dsurface()
function in mask
.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().
|
private |
The domain mask to use.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::operator()().
|
static |
Use the mask()
function in mask
.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().
|
static |
Get the complement of mask()
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().
|
private |
Which masking function to use (mask, surface, etc.)
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), madness::DomainMaskSDFFunctor< NDIM >::operator()(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().
|
private |
The signed distance function.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::operator()().
|
static |
Use the surface()
function in mask
.
Referenced by madness::DomainMaskSDFFunctor< NDIM >::DomainMaskSDFFunctor(), and madness::DomainMaskSDFFunctor< NDIM >::setMaskFunction().