MADNESS 0.10.1
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 >:
Collaboration diagram for madness::CompositeFunctorInterface< T, NDIM, MDIM >:

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
bool check_redundant () const
 return true if all constituent functions are in redundant tree state
void make_redundant (const bool fence)
T operator() (const coordT &x) const
 return value at point x; fairly inefficient
bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values?
void replicate_low_dim_functions (const bool fence)
 replicate low-dimensional functions over all ranks of this world
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 > &, T *, int) const
virtual void operator() (const Vector< double *, 2 > &, T *, int) const
virtual void operator() (const Vector< double *, 3 > &, T *, int) const
virtual void operator() (const Vector< double *, 4 > &, T *, int) const
virtual void operator() (const Vector< double *, 5 > &, T *, int) const
virtual void operator() (const Vector< double *, 6 > &, T *, int) const
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

Public Attributes

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

Private Types

typedef Vector< double, NDIM > coordT
 Type of vector holding coordinates.
typedef FunctionImpl< T, MDIM > implL
typedef FunctionImpl< T, NDIM > implT
typedef std::shared_ptr< implL > pimplL
typedef std::shared_ptr< implT > pimplT

Private Attributes

World & world

Additional Inherited Members

Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< T > coeffT
typedef Key< NDIM > keyT
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

constructor takes its Factory

References impl_eri, impl_ket_vector, impl_m1, impl_m2, impl_p1_vector, impl_p2_vector, MADNESS_CHECK_THROW, and world.

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

return true if all constituent functions are in redundant tree state

References madness::FunctionDefaults< NDIM >::k, impl_eri, impl_ket_vector, impl_m1, impl_m2, impl_p1_vector, impl_p2_vector, and MADNESS_ASSERT.

◆ 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, and madness::print().

◆ 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

replicate low-dimensional functions over all ranks of this world

References impl_m1, impl_m2, impl_p1_vector, impl_p2_vector, and world.

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

supposedly 1/r12

Referenced by CompositeFunctorInterface(), check_redundant(), and make_redundant().

◆ 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

various MRA functions of NDIM dimensionality

supposedly the pair function

Referenced by CompositeFunctorInterface(), check_redundant(), and make_redundant().

◆ impl_m1

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

various MRA functions of MDIM dimensionality (e.g. 3, if NDIM==6)

supposedly 1/r1

Referenced by CompositeFunctorInterface(), check_redundant(), make_redundant(), and replicate_low_dim_functions().

◆ 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: