MADNESS 0.10.1
Public Types | Public Member Functions | Public Attributes | List of all members
madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM > Struct Template Reference

given a ket and the 1- and 2-electron potentials, construct the function V phi More...

#include <funcimpl.h>

Collaboration diagram for madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >:
Collaboration graph
[legend]

Public Types

typedef CoeffTracker< T, LDIM > ctL
 
typedef CoeffTracker< T, NDIMctT
 
typedef Vphi_op_NS< opT, LDIM > this_type
 

Public Member Functions

 Vphi_op_NS ()
 
 Vphi_op_NS (implT *result, const opT &leaf_op, const ctT &iaket, const ctL &iap1, const ctL &iap2, const ctL &iav1, const ctL &iav2, const implT *eri)
 
void accumulate_into_result (const Key< NDIM > &key, const coeffT &coeff) const
 
Future< this_typeactivate () const
 
double compute_error_from_inaccurate_refinement (const keyT &key, const tensorT &ceri) const
 the error is computed from the d coefficients of the constituent functions
 
std::pair< bool, coeffTcontinue_recursion (const std::vector< bool > child_is_leaf, const tensorT &coeffs, const keyT &key) const
 loop over all children and either insert their sum coeffs or continue the recursion
 
tensorT eri_coeffs (const keyT &key) const
 
this_type forward_ctor (implT *result1, const opT &leaf_op, const ctT &iaket1, const ctL &iap11, const ctL &iap21, const ctL &iav11, const ctL &iav21, const implT *eri1)
 
bool have_eri () const
 
bool have_ket () const
 
bool have_v1 () const
 
bool have_v2 () const
 
this_type make_child (const keyT &child) const
 
std::pair< coeffT, double > make_sum_coeffs (const keyT &key) const
 make the sum coeffs for key
 
std::pair< bool, coeffToperator() (const Key< NDIM > &key) const
 make and insert the coefficients into result's tree
 
bool randomize () const
 
template<typename Archive >
void serialize (const Archive &ar)
 serialize this (needed for use in recursive_op)
 

Public Attributes

const implTeri
 2-particle potential, must be on-demand
 
ctT iaket
 the ket of a pair function (exclusive with p1, p2)
 
ctL iap1
 
ctL iap2
 the particles 1 and 2 (exclusive with ket)
 
ctL iav1
 
ctL iav2
 potentials for particles 1 and 2
 
opT leaf_op
 deciding if a given FunctionNode will be a leaf node
 
implTresult
 where to construct Vphi, no need to track parents
 

Detailed Description

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
struct madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >

given a ket and the 1- and 2-electron potentials, construct the function V phi

small memory footstep version of Vphi_op: use the NS form to have information about parent and children to determine if a box is a leaf. This will require compression of the constituent functions, which will lead to more memory usage there, but will avoid oversampling of the result function.

Member Typedef Documentation

◆ ctL

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
typedef CoeffTracker<T,LDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::ctL

◆ ctT

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
typedef CoeffTracker<T,NDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::ctT

◆ this_type

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
typedef Vphi_op_NS<opT,LDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::this_type

Constructor & Destructor Documentation

◆ Vphi_op_NS() [1/2]

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::Vphi_op_NS ( )
inline

◆ Vphi_op_NS() [2/2]

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::Vphi_op_NS ( implT result,
const opT &  leaf_op,
const ctT iaket,
const ctL iap1,
const ctL iap2,
const ctL iav1,
const ctL iav2,
const implT eri 
)
inline

Member Function Documentation

◆ accumulate_into_result()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
void madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::accumulate_into_result ( const Key< NDIM > &  key,
const coeffT coeff 
) const
inline

◆ activate()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
Future< this_type > madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate ( ) const
inline

◆ compute_error_from_inaccurate_refinement()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
double madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement ( const keyT key,
const tensorT ceri 
) const
inline

the error is computed from the d coefficients of the constituent functions

the result is h_n = P_n(f g), computed as h_n \approx Pn(f_n g_n) its error is therefore h_n = (f g)_n = ((Pn(f) + Qn(f)) (Pn(g) + Qn(g)) = Pn(fn gn) + Qn(fn gn) + Pn(f) Qn(g) + Qn(f) Pn(g) + Qn(f) Pn(g) the first term is what we compute, the second term is estimated by tnorm (in another function), the third to last terms are estimated in this function by e.g.: Qn(f)Pn(g) < ||Qn(f)|| ||Pn(g)||

References madness::Key< NDIM >::break_apart(), madness::FunctionImpl< T, NDIM >::cdata, madness::CoeffTracker< T, NDIM >::coeff(), madness::copy(), d, madness::CoeffTracker< T, NDIM >::dnorm(), madness::error(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_eri(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_ket(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v1(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v2(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iaket, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap1, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap2, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav1, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav2, madness::GenTensor< T >::normf(), madness::Tensor< T >::normf(), PROFILE_BLOCK, and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result.

Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs().

◆ continue_recursion()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
std::pair< bool, coeffT > madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion ( const std::vector< bool >  child_is_leaf,
const tensorT coeffs,
const keyT key 
) const
inline

loop over all children and either insert their sum coeffs or continue the recursion

Parameters
[in]child_is_leaffor each child: is it a leaf?
[in]coeffscoefficient tensor with 2^N sum coeffs (=unfiltered NS coeffs)
[in]keythe key for the NS coeffs (=parent key of the children)
Returns
to avoid recursion outside this return: std::pair<is_leaf,coeff> = true,coeffT()

References madness::FunctionImpl< T, NDIM >::child_patch(), madness::FunctionImpl< T, NDIM >::coeffs, madness::copy(), madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::FunctionImpl< T, NDIM >::get_tensor_args(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::WorldContainer< keyT, valueT, hashfunT >::owner(), p(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result, and madness::WorldObject< Derived >::task().

Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()().

◆ eri_coeffs()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
tensorT madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs ( const keyT key) const
inline

◆ forward_ctor()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::forward_ctor ( implT result1,
const opT &  leaf_op,
const ctT iaket1,
const ctL iap11,
const ctL iap21,
const ctL iav11,
const ctL iav21,
const implT eri1 
)
inline

◆ have_eri()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_eri ( ) const
inline

◆ have_ket()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_ket ( ) const
inline

◆ have_v1()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v1 ( ) const
inline

◆ have_v2()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v2 ( ) const
inline

◆ make_child()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child ( const keyT child) const
inline

◆ make_sum_coeffs()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
std::pair< coeffT, double > madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs ( const keyT key) const
inline

make the sum coeffs for key

References madness::Key< NDIM >::break_apart(), madness::FunctionImpl< T, NDIM >::cdata, madness::CoeffTracker< T, NDIM >::coeff(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::copy(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::error, madness::error(), madness::GenTensor< T >::full_tensor_copy(), madness::GenTensor< T >::get_tensor(), madness::FunctionImpl< T, NDIM >::get_tensor_args(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_eri(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v1(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v2(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iaket, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap1, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap2, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav1, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav2, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::outer(), PROFILE_BLOCK, madness::GenTensor< T >::reduce_rank(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result, and madness::TensorArgs::thresh.

Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()().

◆ operator()()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
std::pair< bool, coeffT > madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator() ( const Key< NDIM > &  key) const
inline

◆ randomize()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::randomize ( ) const
inline

◆ serialize()

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
template<typename Archive >
void madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize ( const Archive &  ar)
inline

Member Data Documentation

◆ eri

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
const implT* madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri

◆ iaket

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
ctT madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iaket

◆ iap1

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap1

◆ iap2

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap2

◆ iav1

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav1

◆ iav2

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav2

◆ leaf_op

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
opT madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::leaf_op

deciding if a given FunctionNode will be a leaf node

◆ result

template<typename T , std::size_t NDIM>
template<typename opT , size_t LDIM>
implT* madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result

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