MADNESS 0.10.1
madness::Convolution1D< Q > Class Template Referenceabstract

Provides the common functionality/interface of all 1D convolutions. More...

#include <convolution1d.h>

Inheritance diagram for madness::Convolution1D< Q >:
Collaboration diagram for madness::Convolution1D< Q >:

Public Types

typedef Q opT
 The apply function uses this to infer resultT=opT*inputT.

Public Member Functions

 Convolution1D (int k, int npt, int maxR, double bloch_k=0.0, KernelRange rng={}, LatticeImages images=LatticeImages::all)
virtual ~Convolution1D ()
bool get_issmall (Level n, Translation lx) const
const Tensor< Q > & get_rnlp (Level n, Translation lx) const
bool includes_image (int R) const
virtual bool issmall (Level n, Translation lx) const =0
bool lattice_summed () const
const ConvolutionData1D< Q > * mod_nonstandard (const Key< 2 > &op_key) const
 Returns a pointer to the cached modified make_nonstandard form of the operator.
virtual Level natural_level () const
 Returns the level for projection.
const ConvolutionData1D< Q > * nonstandard (Level n, Translation lx) const
 Returns a pointer to the cached make_nonstandard form of the operator.
Q phase (double R) const
bool range_restricted () const
const Tensor< Q > & rnlij (Level n, Translation lx, bool do_transpose=false) const
 Computes the transition matrix elements for the convolution for n,l.
virtual Tensor< Q > rnlp (Level n, Translation lx) const =0
 Compute the projection of the operator onto the double order polynomials.
bool rnlp_is_zero (Level n, Translation l) const

Public Attributes

double bloch_k
 k in exp(i k R) Bloch phase factor folded into lattice sum
Tensor< double > c
Tensor< double > hg
Tensor< double > hgT
Tensor< double > hgT2k
LatticeImages images
 which of the translations R = -maxR..maxR are summed
int k
 Wavelet order.
int maxR
 Number of lattice translations for sum.
SimpleCache< ConvolutionData1D< Q >, 2 > mod_ns_cache
int npt
 Number of quadrature points (is this used?).
SimpleCache< ConvolutionData1D< Q >, 1 > ns_cache
Tensor< double > quad_w
Tensor< double > quad_x
KernelRange range
 if range is nonnull, kernel range limited to to range (in simulation cell units), useful for finite-range convolutions with periodic functions
SimpleCache< Tensor< Q >, 1 > rnlij_cache
SimpleCache< Tensor< Q >, 1 > rnlp_cache

Detailed Description

template<typename Q>
class madness::Convolution1D< Q >

Provides the common functionality/interface of all 1D convolutions.

interface for 1 term and for 1 dimension; the actual data are kept in ConvolutionData1D Derived classes must implement rnlp, issmall, natural_level

Member Typedef Documentation

◆ opT

template<typename Q>
typedef Q madness::Convolution1D< Q >::opT

The apply function uses this to infer resultT=opT*inputT.

Constructor & Destructor Documentation

◆ ~Convolution1D()

template<typename Q>
virtual madness::Convolution1D< Q >::~Convolution1D ( )
inlinevirtual

◆ Convolution1D()

template<typename Q>
madness::Convolution1D< Q >::Convolution1D ( int k,
int npt,
int maxR,
double bloch_k = 0.0,
KernelRange rng = {},
LatticeImages images = LatticeImages::all )
inline

Member Function Documentation

◆ get_issmall()

template<typename Q>
bool madness::Convolution1D< Q >::get_issmall ( Level n,
Translation lx ) const
inline
Returns
true if the block of [r^n_l]_ij is expected to be small
Note
unlike issmall(), this handles periodicity and range restriction

Referenced by madness::Convolution1D< double_complex >::get_rnlp(), and madness::Convolution1D< double_complex >::nonstandard().

◆ get_rnlp()

◆ includes_image()

template<typename Q>
bool madness::Convolution1D< Q >::includes_image ( int R) const
inline
Returns
true if image R takes part in the lattice sum, see LatticeImages

Referenced by madness::Convolution1D< double_complex >::get_issmall(), and madness::Convolution1D< double_complex >::get_rnlp().

◆ issmall()

template<typename Q>
virtual bool madness::Convolution1D< Q >::issmall ( Level n,
Translation lx ) const
pure virtual
Returns
true if the block of [r^n_l]_ij is expected to be small

Implemented in madness::GaussianConvolution1D< Q >, and madness::GenericConvolution1D< Q, opT >.

Referenced by madness::Convolution1D< double_complex >::get_issmall().

◆ lattice_summed()

template<typename Q>
bool madness::Convolution1D< Q >::lattice_summed ( ) const
inline
Returns
true if the kernel is lattice-summed along this axis, whatever images it includes (LatticeImages::home_only too); the images summed are R = -maxR..maxR for which includes_image(R)

Referenced by madness::Convolution1D< double_complex >::get_issmall(), and madness::Convolution1D< double_complex >::get_rnlp().

◆ mod_nonstandard()

template<typename Q>
const ConvolutionData1D< Q > * madness::Convolution1D< Q >::mod_nonstandard ( const Key< 2 > & op_key) const
inline

Returns a pointer to the cached modified make_nonstandard form of the operator.

Parameters
[in]op_keyholds the scale and the source and target translations
Returns
a pointer to the cached modified make_nonstandard form of the operator

◆ natural_level()

template<typename Q>
virtual Level madness::Convolution1D< Q >::natural_level ( ) const
inlinevirtual

◆ nonstandard()

template<typename Q>
const ConvolutionData1D< Q > * madness::Convolution1D< Q >::nonstandard ( Level n,
Translation lx ) const
inline

Returns a pointer to the cached make_nonstandard form of the operator.

◆ phase()

template<typename Q>
Q madness::Convolution1D< Q >::phase ( double R) const
inline

◆ range_restricted()

◆ rnlij()

template<typename Q>
const Tensor< Q > & madness::Convolution1D< Q >::rnlij ( Level n,
Translation lx,
bool do_transpose = false ) const
inline

Computes the transition matrix elements for the convolution for n,l.

Returns the tensor

r(i,j) = int(K(x-y) phi[n0](x) phi[nl](y), x=0..1, y=0..1)
Kernels< TDA, ClosedShell > K
Definition test_es_build_subworld.cpp:40

This is computed from the matrix elements over the correlation function which in turn are computed from the matrix elements over the double order legendre polynomials.

Note
if this->range_restricted()==true, θ(D/2 - |x-y|) K(x-y) is used as the kernel

Referenced by madness::Convolution1D< double_complex >::mod_nonstandard(), madness::Convolution1D< double_complex >::nonstandard(), and madness::test_rnlij_rangelimited().

◆ rnlp()

template<typename Q>
virtual Tensor< Q > madness::Convolution1D< Q >::rnlp ( Level n,
Translation lx ) const
pure virtual

Compute the projection of the operator onto the double order polynomials.

Implemented in madness::GaussianConvolution1D< Q >, and madness::GenericConvolution1D< Q, opT >.

Referenced by madness::Convolution1D< double_complex >::get_rnlp().

◆ rnlp_is_zero()

template<typename Q>
bool madness::Convolution1D< Q >::rnlp_is_zero ( Level n,
Translation l ) const
inline
Returns
true if [r^n_l] is zero due to range restriction

Referenced by madness::Convolution1D< double_complex >::get_issmall(), and madness::GaussianConvolution1D< Q >::rnlp().

Member Data Documentation

◆ bloch_k

template<typename Q>
double madness::Convolution1D< Q >::bloch_k

k in exp(i k R) Bloch phase factor folded into lattice sum

Referenced by madness::GaussianConvolution1D< Q >::GaussianConvolution1D(), and madness::GenericConvolution1D< Q, opT >::GenericConvolution1D().

◆ c

template<typename Q>
Tensor<double> madness::Convolution1D< Q >::c

◆ hg

template<typename Q>
Tensor<double> madness::Convolution1D< Q >::hg

◆ hgT

template<typename Q>
Tensor<double> madness::Convolution1D< Q >::hgT

◆ hgT2k

template<typename Q>
Tensor<double> madness::Convolution1D< Q >::hgT2k

◆ images

template<typename Q>
LatticeImages madness::Convolution1D< Q >::images

which of the translations R = -maxR..maxR are summed

◆ k

◆ maxR

template<typename Q>
int madness::Convolution1D< Q >::maxR

Number of lattice translations for sum.

Referenced by madness::GenericConvolution1D< Q, opT >::GenericConvolution1D().

◆ mod_ns_cache

template<typename Q>
SimpleCache<ConvolutionData1D<Q>, 2> madness::Convolution1D< Q >::mod_ns_cache
mutable

◆ npt

template<typename Q>
int madness::Convolution1D< Q >::npt

Number of quadrature points (is this used?).

Referenced by madness::GaussianConvolution1D< Q >::rnlp(), and madness::GenericConvolution1D< Q, opT >::rnlp().

◆ ns_cache

template<typename Q>
SimpleCache<ConvolutionData1D<Q>, 1> madness::Convolution1D< Q >::ns_cache
mutable

◆ quad_w

template<typename Q>
Tensor<double> madness::Convolution1D< Q >::quad_w

◆ quad_x

◆ range

template<typename Q>
KernelRange madness::Convolution1D< Q >::range

if range is nonnull, kernel range limited to to range (in simulation cell units), useful for finite-range convolutions with periodic functions

Referenced by madness::GaussianConvolution1D< Q >::rnlp().

◆ rnlij_cache

template<typename Q>
SimpleCache<Tensor<Q>, 1> madness::Convolution1D< Q >::rnlij_cache
mutable

◆ rnlp_cache

template<typename Q>
SimpleCache<Tensor<Q>, 1> madness::Convolution1D< Q >::rnlp_cache
mutable

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