MADNESS  0.10.1
Public Types | Public Member Functions | Public Attributes | List of all members
madness::ElementaryInterface< T, NDIM > Class Template Reference

ElementaryInterface (formerly FunctorInterfaceWrapper) interfaces a c-function. More...

#include <function_interface.h>

Inheritance diagram for madness::ElementaryInterface< T, NDIM >:
Inheritance graph
[legend]
Collaboration diagram for madness::ElementaryInterface< T, NDIM >:
Collaboration graph
[legend]

Public Types

typedef GenTensor< TcoeffT
 
typedef Vector< double, NDIMcoordT
 Type of vector holding coordinates. More...
 
- Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< TcoeffT
 
typedef Key< NDIMkeyT
 
typedef T value_type
 

Public Member Functions

 ElementaryInterface (T(*f)(const coordT &))
 
T operator() (const coordT &x) const
 You should implement this to return f(x) More...
 
coeffT values (const Key< NDIM > &key, const Tensor< double > &quad_x) const
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< T, NDIM >
 FunctionFunctorInterface ()
 
virtual ~FunctionFunctorInterface ()
 
virtual coeffT coeff (const keyT &) const
 
virtual void operator() (const Vector< double *, 1 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, T *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...
 

Public Attributes

T(* f )(const coordT &)
 
- Public Attributes inherited from madness::FunctionFunctorInterface< T, NDIM >
Level special_level_
 

Detailed Description

template<typename T, std::size_t NDIM>
class madness::ElementaryInterface< T, NDIM >

ElementaryInterface (formerly FunctorInterfaceWrapper) interfaces a c-function.

hard-code your favorite function and interface it with this; Does only provide function values, no MRA coefficients. Care must be taken if the function we refer to is a singular function, and a on-demand function at the same time, since direct computation of coefficients via mraimpl::project might suffer from inaccurate quadrature.

Member Typedef Documentation

◆ coeffT

template<typename T , std::size_t NDIM>
typedef GenTensor<T> madness::ElementaryInterface< T, NDIM >::coeffT

◆ coordT

template<typename T , std::size_t NDIM>
typedef Vector<double, NDIM> madness::ElementaryInterface< T, NDIM >::coordT

Type of vector holding coordinates.

Constructor & Destructor Documentation

◆ ElementaryInterface()

template<typename T , std::size_t NDIM>
madness::ElementaryInterface< T, NDIM >::ElementaryInterface ( T(*)(const coordT &)  f)
inline

Member Function Documentation

◆ operator()()

template<typename T , std::size_t NDIM>
T madness::ElementaryInterface< T, NDIM >::operator() ( const coordT x) const
inlinevirtual

You should implement this to return f(x)

Implements madness::FunctionFunctorInterface< T, NDIM >.

References madness::ElementaryInterface< T, NDIM >::f.

◆ values()

template<typename T , std::size_t NDIM>
coeffT madness::ElementaryInterface< T, NDIM >::values ( const Key< NDIM > &  key,
const Tensor< double > &  quad_x 
) const
inlinevirtual

Member Data Documentation

◆ f

template<typename T , std::size_t NDIM>
T(* madness::ElementaryInterface< T, NDIM >::f) (const coordT &)

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