MADNESS 0.10.1
|
given a ket and the 1- and 2-electron potentials, construct the function V phi More...
#include <funcimpl.h>
Public Types | |
typedef CoeffTracker< T, LDIM > | ctL |
typedef CoeffTracker< T, NDIM > | ctT |
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_type > | activate () 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, coeffT > | continue_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, coeffT > | operator() (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 implT * | eri |
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 | |
implT * | result |
where to construct Vphi, no need to track parents | |
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.
typedef CoeffTracker<T,LDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::ctL |
typedef CoeffTracker<T,NDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::ctT |
typedef Vphi_op_NS<opT,LDIM> madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::this_type |
|
inline |
|
inline |
|
inline |
References madness::FunctionNode< T, NDIM >::accumulate(), madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result, madness::FunctionImpl< T, NDIM >::targs, and madness::WorldContainer< keyT, valueT, hashfunT >::task().
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()().
|
inline |
References madness::CoeffTracker< T, NDIM >::activate(), madness::WorldTaskQueue::add(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri, 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 >::result, madness::World::taskq, madness::FunctionImpl< T, NDIM >::world, and madness::detail::wrap_mem_fn().
|
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().
|
inline |
loop over all children and either insert their sum coeffs or continue the recursion
[in] | child_is_leaf | for each child: is it a leaf? |
[in] | coeffs | coefficient tensor with 2^N sum coeffs (=unfiltered NS coeffs) |
[in] | key | the key for the NS coeffs (=parent key of the children) |
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()().
|
inline |
References madness::FunctionImpl< T, NDIM >::cdata, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs(), madness::FunctionImpl< T, NDIM >::fcube(), madness::FunctionImpl< T, NDIM >::get_functor(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_eri(), MADNESS_ASSERT, PROFILE_BLOCK, and madness::FunctionImpl< T, NDIM >::values2coeffs().
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs().
|
inline |
|
inline |
References madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri.
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs().
|
inline |
|
inline |
References madness::CoeffTracker< T, NDIM >::get_impl(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav1.
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs().
|
inline |
References madness::CoeffTracker< T, NDIM >::get_impl(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav2.
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs().
|
inline |
References madness::Key< NDIM >::break_apart(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri, 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::CoeffTracker< T, NDIM >::make_child(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result.
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion().
|
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()().
|
inline |
make and insert the coefficients into result's tree
References madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::accumulate_into_result(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), madness::error(), madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::FunctionImpl< T, NDIM >::get_initial_level(), madness::FunctionImpl< T, NDIM >::get_special_level(), madness::FunctionImpl< T, NDIM >::get_thresh(), madness::WorldContainer< keyT, valueT, hashfunT >::is_local(), madness::Key< NDIM >::level(), MADNESS_ASSERT, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), NDIM, madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result, and madness::FunctionImpl< T, NDIM >::truncate_tol().
|
inline |
|
inline |
serialize this (needed for use in recursive_op)
References madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri, 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, and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result.
const implT* madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri |
2-particle potential, must be on-demand
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::Vphi_op_NS(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::eri_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_eri(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
ctT madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iaket |
the ket of a pair function (exclusive with p1, p2)
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_ket(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap1 |
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iap2 |
the particles 1 and 2 (exclusive with ket)
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav1 |
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v1(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
ctL madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::iav2 |
potentials for particles 1 and 2
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::have_v2(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().
opT madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::leaf_op |
deciding if a given FunctionNode will be a leaf node
implT* madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::result |
where to construct Vphi, no need to track parents
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::accumulate_into_result(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()(), and madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::serialize().