MADNESS  0.10.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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 >:
Inheritance graph
[legend]
Collaboration diagram for madness::TwoElectronInterface< T, NDIM >:
Collaboration graph
[legend]

Public Types

typedef GenTensor< TcoeffT
 
- Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< TcoeffT
 
typedef Key< NDIMkeyT
 
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 More...
 
coeffT coeff (const Key< NDIM > &key) const
 return the coefficients of the function in 6D (x1,y1,z1, x2,y2,z2) More...
 
T operator() (const Vector< double, NDIM > &x) const
 You should implement this to return f(x) More...
 
bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< T, NDIM >
 FunctionFunctorInterface ()
 
virtual ~FunctionFunctorInterface ()
 
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
 

Protected Member Functions

virtual GFit< double, LDIMfit (const double eps) const =0
 derived classes must implement this – cf GFit.h More...
 
void initialize (const double eps)
 initialize the Gaussian fit; uses the virtual function fit() to fit More...
 
Tensor< double > make_coeff (const Key< NDIM > &key) const
 make the coefficients from the 1d convolution More...
 
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) More...
 

Protected Attributes

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

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

constructor: cf the Coulomb kernel

Parameters
[in]lothe smallest length scale to be resolved
[in]epsthe accuracy threshold

References madness::BC_PERIODIC, d(), madness::FunctionDefaults< NDIM >::get_cell_width(), madness::TwoElectronInterface< T, NDIM >::hi, MADNESS_ASSERT, NDIM, and madness::Tensor< T >::normf().

Member Function Documentation

◆ coeff()

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

◆ 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::TwoElectronInterface< T, NDIM >::k, and NDIM.

Referenced by madness::TwoElectronInterface< T, NDIM >::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, madness::print(), and T().

◆ 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

◆ k

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

◆ LDIM

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

◆ lo

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

the smallest length scale that needs to be represented

◆ ops

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

◆ rank

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

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