MADNESS 0.10.1
madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM > Struct Template Reference

#include <funcimpl.h>

Collaboration diagram for madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >:

Public Types

typedef CoeffTracker< T, LDIM > ctL
typedef CoeffTracker< T, NDIM > ctT
typedef Vphi_ij_u_op_NS< opT, LDIM > this_type

Public Member Functions

 Vphi_ij_u_op_NS ()
 Vphi_ij_u_op_NS (implT *result, const opT &leaf_op, const ctT &iau, const ctL &iai, const ctL &iaj, const implT *eri, double target_precision, int oversampling=1)
void accumulate_into_result (const keyT &key, const coeffT &coeff) const
Future< this_type > activate () const
double compute_error_from_inaccurate_refinement (const keyT &key, const Key< LDIM > &key1, const Key< LDIM > &key2) const
 error from inaccurate refinement: cross terms of (snorm,dnorm) for u*[i]*[j]
std::pair< bool, coeffT > continue_recursion (const std::vector< bool > child_is_leaf, const tensorT &coeffs, const keyT &key) const
tensorT eri_coeffs (const keyT &key) const
 get ERI coefficients at key (same logic as Vphi_op_NS::eri_coeffs)
this_type forward_ctor (implT *result1, const opT &leaf_op1, const ctT &iau1, const ctL &iai1, const ctL &iaj1, const implT *eri1, double target_precision1, int oversampling1)
bool have_eri () const
bool have_i () const
bool have_j () const
void leaf_action (const keyT &key, const coeffT &coeff) const
this_type make_child (const keyT &child) const
std::pair< coeffT, double > make_sum_coeffs (const keyT &key) const
std::pair< bool, coeffT > operator() (const keyT &key) const
bool randomize () const
template<typename Archive>
void serialize (const Archive &ar)

Public Attributes

const implT * eri
 exact ERI g(1,2), on-demand, optional (null → function mode)
ctL iai
 i(1), NS form, optional (null impl → skip particle-1 multiply)
ctL iaj
 j(2), NS form, optional (null impl → skip particle-2 multiply)
ctT iau
 u(1,2), NS form, required
opT leaf_op
int oversampling
 pointwise_multiplier oversampling (k+oversampling grid)
implT * result
 output function (function mode) or accumulation handle (inner mode)
double target_precision
 leaf threshold used for the post-screening truncation

Detailed Description

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

adaptive multiplication of u(1,2) by optional orbitals i(1) and/or j(2), with optional contraction against an exact ERI g(1,2) Modes (controlled by which pointers are non-null):

  • function mode (eri==null): builds result = u * [i(1)] * [j(2)] into *result
  • inner mode (eri!=null): computes <eri | u * [i(1)] * [j(2)]>, accumulates scalar at result->cdata.key0

Error control: d-norm cross terms (inaccurate refinement, from CoeffTracker::dnorm) plus tnorm error from each pointwise_multiplier application. Replaces multiply_op<LDIM> (adds d-norm error) and do_inner_local_on_demand (adds inaccurate-refinement error and adaptive NS-form traversal).

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_ij_u_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_ij_u_op_NS< opT, LDIM >::ctT

◆ this_type

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

Constructor & Destructor Documentation

◆ Vphi_ij_u_op_NS() [1/2]

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

◆ Vphi_ij_u_op_NS() [2/2]

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::Vphi_ij_u_op_NS ( implT * result,
const opT & leaf_op,
const ctT & iau,
const ctL & iai,
const ctL & iaj,
const implT * eri,
double target_precision,
int oversampling = 1 )
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_ij_u_op_NS< opT, LDIM >::accumulate_into_result ( const keyT & 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_ij_u_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_ij_u_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement ( const keyT & key,
const Key< LDIM > & key1,
const Key< LDIM > & key2 ) const
inline

error from inaccurate refinement: cross terms of (snorm,dnorm) for u*[i]*[j]

References have_i(), have_j(), iai, iaj, and iau.

Referenced by 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_ij_u_op_NS< opT, LDIM >::continue_recursion ( const std::vector< bool > child_is_leaf,
const tensorT & coeffs,
const keyT & key ) const
inline

◆ eri_coeffs()

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

get ERI coefficients at key (same logic as Vphi_op_NS::eri_coeffs)

References eri, have_eri(), and MADNESS_ASSERT.

Referenced by leaf_action().

◆ forward_ctor()

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::forward_ctor ( implT * result1,
const opT & leaf_op1,
const ctT & iau1,
const ctL & iai1,
const ctL & iaj1,
const implT * eri1,
double target_precision1,
int oversampling1 )
inline

Referenced by activate().

◆ have_eri()

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

References eri.

Referenced by eri_coeffs(), and leaf_action().

◆ have_i()

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

◆ have_j()

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

◆ leaf_action()

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
void madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::leaf_action ( const keyT & key,
const coeffT & coeff ) const
inline

leaf action: insert into result (function mode) or contract with ERI and accumulate scalar as the first element of a vk-shaped tensor at key0 (inner mode)

References accumulate_into_result(), eri_coeffs(), madness::Tensor< T >::flat(), madness::GenTensor< T >::full_tensor_copy(), have_eri(), L, result, and madness::TT_FULL.

Referenced by operator()().

◆ make_child()

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::Vphi_ij_u_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_ij_u_op_NS< opT, LDIM >::make_sum_coeffs ( const keyT & key) const
inline

multiplicative chain: current = u → u·i(1) → u·i(1)·j(2)

Inputs are expected in redundant tree state (cheap to construct from reconstructed, avoids the expensive compress/nonstandard round-trip). In that state CoeffTracker::coeff(key) calls parent_to_child and returns scaling-function coefficients of shape [k]^NDIM, exactly what pointwise_multiplier consumes.

Past a leaf the CoeffTracker pins key_ to the leaf, so coeff(key) interpolates the leaf's [k]^NDIM s-coeffs to the requested level — equivalent to embedding them in a [2k]^NDIM NS tensor (s-part filled, d-part zero) and unfiltering. d-norms past the leaf are zero, which falls out of CoeffTracker::dnorm.

References madness::Key< NDIM >::break_apart(), compute_error_from_inaccurate_refinement(), madness::error(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::error, madness::GenTensor< T >::full_tensor(), have_i(), have_j(), iai, iaj, iau, madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::oversampling, and oversampling.

Referenced by operator()().

◆ operator()()

◆ randomize()

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::Vphi_ij_u_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_ij_u_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_ij_u_op_NS< opT, LDIM >::eri

exact ERI g(1,2), on-demand, optional (null → function mode)

Referenced by Vphi_ij_u_op_NS(), Vphi_ij_u_op_NS(), activate(), eri_coeffs(), have_eri(), make_child(), and serialize().

◆ iai

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::iai

i(1), NS form, optional (null impl → skip particle-1 multiply)

Referenced by Vphi_ij_u_op_NS(), activate(), compute_error_from_inaccurate_refinement(), have_i(), make_child(), make_sum_coeffs(), and serialize().

◆ iaj

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
ctL madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::iaj

j(2), NS form, optional (null impl → skip particle-2 multiply)

Referenced by Vphi_ij_u_op_NS(), activate(), compute_error_from_inaccurate_refinement(), have_j(), make_child(), make_sum_coeffs(), and serialize().

◆ iau

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
ctT madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::iau

◆ leaf_op

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

◆ oversampling

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
int madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::oversampling

◆ result

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

output function (function mode) or accumulation handle (inner mode)

Referenced by Vphi_ij_u_op_NS(), Vphi_ij_u_op_NS(), accumulate_into_result(), activate(), continue_recursion(), leaf_action(), make_child(), operator()(), and serialize().

◆ target_precision

template<typename T, std::size_t NDIM>
template<typename opT, size_t LDIM>
double madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::target_precision

leaf threshold used for the post-screening truncation

Referenced by Vphi_ij_u_op_NS(), Vphi_ij_u_op_NS(), activate(), make_child(), operator()(), and serialize().


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