MADNESS 0.10.1
madness::TwoElectronInterface< T, NDIM > Class Template Referenceabstract

base class to compute the wavelet coefficients for an isotropic 2e-operator More...

#include <function_interface.h>

Inheritance diagram for madness::TwoElectronInterface< T, NDIM >:
Collaboration diagram for madness::TwoElectronInterface< T, NDIM >:

Public Types

typedef GenTensor< T > coeffT
Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< T > coeffT
typedef Key< NDIM > keyT
typedef T value_type

Public Member Functions

 TwoElectronInterface (double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int kk=FunctionDefaults< NDIM >::get_k())
 constructor: cf the Coulomb kernel
coeffT coeff (const Key< NDIM > &key) const
 return the coefficients of the function in 6D (x1,y1,z1, x2,y2,z2)
T operator() (const Vector< double, NDIM > &) const
 You should implement this to return f(x).
bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values?
Public Member Functions inherited from madness::FunctionFunctorInterface< T, NDIM >
 FunctionFunctorInterface ()
virtual ~FunctionFunctorInterface ()
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

Protected Member Functions

virtual GFit< double, LDIM > fit (const double eps) const =0
 derived classes must implement this – cf GFit.h
void initialize (const double eps)
 initialize the Gaussian fit; uses the virtual function fit() to fit
Tensor< double > make_coeff (const Key< NDIM > &key) const
 make the coefficients from the 1d convolution
Tensor< double > map_coeff (const Tensor< double > &c) const
 the dimensions are a bit confused (x1,x2, y1,y2, z1,z2) -> (x1,y1,z1, x2,y2,z2)

Protected Attributes

double hi
 the largest length scale that needs to be represented
int k
 the wavelet order
double lo
 the smallest length scale that needs to be represented
std::vector< ConvolutionND< double, NDIM > > ops
 storing the coefficients
int rank
 the number of terms in the Gaussian quadrature

Static Protected Attributes

static constexpr std::size_t LDIM =NDIM/2

Additional Inherited Members

Public Attributes inherited from madness::FunctionFunctorInterface< T, NDIM >
Level special_level_

Detailed Description

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

base class to compute the wavelet coefficients for an isotropic 2e-operator

all classes that derive from this base class use the Gaussian fitting procedure that has been developed for the BSH operator. We simply reuse the wavelet coefficients that we get from there to avoid evaluating the functions themselves, since the quadrature of singular functions is imprecise and slow.

Member Typedef Documentation

◆ coeffT

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

Constructor & Destructor Documentation

◆ TwoElectronInterface()

template<typename T, std::size_t NDIM>
madness::TwoElectronInterface< T, NDIM >::TwoElectronInterface ( double lo,
double eps,
const BoundaryConditions< NDIM > & bc = FunctionDefaults<NDIM>::get_bc(),
int kk = FunctionDefaults<NDIM>::get_k() )
inline

Member Function Documentation

◆ coeff()

template<typename T, std::size_t NDIM>
coeffT madness::TwoElectronInterface< T, NDIM >::coeff ( const Key< NDIM > & key) const
inlinevirtual

return the coefficients of the function in 6D (x1,y1,z1, x2,y2,z2)

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

References c, madness::FunctionDefaults< NDIM >::get_thresh(), make_coeff(), map_coeff(), and madness::TT_FULL.

Referenced by initialize().

◆ fit()

template<typename T, std::size_t NDIM>
virtual GFit< double, LDIM > madness::TwoElectronInterface< T, NDIM >::fit ( const double eps) const
protectedpure virtual

◆ initialize()

template<typename T, std::size_t NDIM>
void madness::TwoElectronInterface< T, NDIM >::initialize ( const double eps)
inlineprotected

◆ make_coeff()

template<typename T, std::size_t NDIM>
Tensor< double > madness::TwoElectronInterface< T, NDIM >::make_coeff ( const Key< NDIM > & key) const
inlineprotected

◆ map_coeff()

template<typename T, std::size_t NDIM>
Tensor< double > madness::TwoElectronInterface< T, NDIM >::map_coeff ( const Tensor< double > & c) const
inlineprotected

the dimensions are a bit confused (x1,x2, y1,y2, z1,z2) -> (x1,y1,z1, x2,y2,z2)

References c, madness::copy(), madness::GaussianConvolution1DCache< double >::map, k, and NDIM.

Referenced by coeff().

◆ operator()()

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

You should implement this to return f(x).

Implements madness::FunctionFunctorInterface< T, NDIM >.

References MADNESS_ASSERT, and madness::print().

◆ provides_coeff()

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

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

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

Member Data Documentation

◆ hi

template<typename T, std::size_t NDIM>
double madness::TwoElectronInterface< T, NDIM >::hi
protected

the largest length scale that needs to be represented

Referenced by TwoElectronInterface().

◆ k

template<typename T, std::size_t NDIM>
int madness::TwoElectronInterface< T, NDIM >::k
protected

the wavelet order

Referenced by TwoElectronInterface(), initialize(), make_coeff(), and map_coeff().

◆ LDIM

template<typename T, std::size_t NDIM>
std::size_t madness::TwoElectronInterface< T, NDIM >::LDIM =NDIM/2
staticconstexprprotected

Referenced by initialize().

◆ lo

template<typename T, std::size_t NDIM>
double madness::TwoElectronInterface< T, NDIM >::lo
protected

the smallest length scale that needs to be represented

Referenced by madness::GeneralTwoElectronInterface< T, NDIM >::GeneralTwoElectronInterface(), and TwoElectronInterface().

◆ ops

template<typename T, std::size_t NDIM>
std::vector< ConvolutionND<double,NDIM> > madness::TwoElectronInterface< T, NDIM >::ops
mutableprotected

storing the coefficients

Referenced by initialize(), and make_coeff().

◆ rank

template<typename T, std::size_t NDIM>
int madness::TwoElectronInterface< T, NDIM >::rank
protected

the number of terms in the Gaussian quadrature

Referenced by TwoElectronInterface(), initialize(), and make_coeff().


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