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

CompositeFunctorInterface implements a wrapper of holding several functions and functors. More...

#include <function_interface.h>

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

Public Member Functions

 CompositeFunctorInterface (World &world, std::vector< pimplT > ket, pimplT g12, pimplL v1, pimplL v2, std::vector< pimplL > p1, std::vector< pimplL > p2)
 constructor takes its Factory More...
 
bool check_redundant () const
 return true if all constituent functions are in redundant tree state More...
 
void make_redundant (const bool fence)
 
T operator() (const coordT &x) const
 return value at point x; fairly inefficient More...
 
bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
void replicate_low_dim_functions (const bool fence)
 replicate low-dimensional functions over all ranks of this world More...
 
- 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 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
 

Public Attributes

std::shared_ptr< implTimpl_eri
 supposedly 1/r12 More...
 
std::vector< std::shared_ptr< implT > > impl_ket_vector
 various MRA functions of NDIM dimensionality More...
 
std::shared_ptr< implLimpl_m1
 various MRA functions of MDIM dimensionality (e.g. 3, if NDIM==6) More...
 
std::shared_ptr< implLimpl_m2
 supposedly 1/r2 More...
 
std::vector< std::shared_ptr< implL > > impl_p1_vector
 supposedly orbital 1 More...
 
std::vector< std::shared_ptr< implL > > impl_p2_vector
 supposedly orbital 2 More...
 
- Public Attributes inherited from madness::FunctionFunctorInterface< T, NDIM >
Level special_level_
 

Private Types

typedef Vector< double, NDIMcoordT
 Type of vector holding coordinates. More...
 
typedef FunctionImpl< T, MDIM > implL
 
typedef FunctionImpl< T, NDIMimplT
 
typedef std::shared_ptr< implLpimplL
 
typedef std::shared_ptr< implTpimplT
 

Private Attributes

Worldworld
 

Additional Inherited Members

- Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< TcoeffT
 
typedef Key< NDIMkeyT
 
typedef T value_type
 

Detailed Description

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

CompositeFunctorInterface implements a wrapper of holding several functions and functors.

Use this to "connect" several functions and/or functors and to return their coefficients e.g. connect f1 and f2 with an addition, you can request the coefficients of any node and they will be computed on the fly and returned. Mainly useful to connect a functor with a function, if the functor is too large to be represented in MRA (e.g. 1/r12)

as of now, the operation connecting the functions/functors is simply addition. need to implement expression templates, if I only knew what that was...

Member Typedef Documentation

◆ coordT

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef Vector<double, NDIM> madness::CompositeFunctorInterface< T, NDIM, MDIM >::coordT
private

Type of vector holding coordinates.

◆ implL

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef FunctionImpl<T,MDIM> madness::CompositeFunctorInterface< T, NDIM, MDIM >::implL
private

◆ implT

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef FunctionImpl<T,NDIM> madness::CompositeFunctorInterface< T, NDIM, MDIM >::implT
private

◆ pimplL

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef std::shared_ptr<implL> madness::CompositeFunctorInterface< T, NDIM, MDIM >::pimplL
private

◆ pimplT

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef std::shared_ptr<implT> madness::CompositeFunctorInterface< T, NDIM, MDIM >::pimplT
private

Constructor & Destructor Documentation

◆ CompositeFunctorInterface()

template<typename T , std::size_t NDIM, std::size_t MDIM>
madness::CompositeFunctorInterface< T, NDIM, MDIM >::CompositeFunctorInterface ( World world,
std::vector< pimplT ket,
pimplT  g12,
pimplL  v1,
pimplL  v2,
std::vector< pimplL p1,
std::vector< pimplL p2 
)
inline

Member Function Documentation

◆ check_redundant()

template<typename T , std::size_t NDIM, std::size_t MDIM>
bool madness::CompositeFunctorInterface< T, NDIM, MDIM >::check_redundant ( ) const
inline

◆ make_redundant()

template<typename T , std::size_t NDIM, std::size_t MDIM>
void madness::CompositeFunctorInterface< T, NDIM, MDIM >::make_redundant ( const bool  fence)
inline

◆ operator()()

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

return value at point x; fairly inefficient

Implements madness::FunctionFunctorInterface< T, NDIM >.

References MADNESS_ASSERT, madness::print(), and T().

◆ provides_coeff()

template<typename T , std::size_t NDIM, std::size_t MDIM>
bool madness::CompositeFunctorInterface< T, NDIM, MDIM >::provides_coeff ( ) const
inlinevirtual

does this functor directly provide sum coefficients? or only function values?

Reimplemented from madness::FunctionFunctorInterface< T, NDIM >.

◆ replicate_low_dim_functions()

template<typename T , std::size_t NDIM, std::size_t MDIM>
void madness::CompositeFunctorInterface< T, NDIM, MDIM >::replicate_low_dim_functions ( const bool  fence)
inline

Member Data Documentation

◆ impl_eri

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<implT> madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_eri

◆ impl_ket_vector

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<std::shared_ptr<implT> > madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_ket_vector

◆ impl_m1

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<implL> madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_m1

◆ impl_m2

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<implL> madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_m2

◆ impl_p1_vector

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<std::shared_ptr<implL> > madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_p1_vector

◆ impl_p2_vector

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<std::shared_ptr<implL> > madness::CompositeFunctorInterface< T, NDIM, MDIM >::impl_p2_vector

◆ world

template<typename T , std::size_t NDIM, std::size_t MDIM>
World& madness::CompositeFunctorInterface< T, NDIM, MDIM >::world
private

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