|
MADNESS 0.10.1
|
a class to track where relevant (parent) coeffs are More...
#include <funcimpl.h>
Public Member Functions | |
| CoeffTracker () | |
| default ctor | |
| CoeffTracker (const CoeffTracker &other) | |
| copy ctor | |
| CoeffTracker (const CoeffTracker &other, const datumT &datum) | |
| ctor with a pair<keyT,nodeT> | |
| CoeffTracker (const implT *impl) | |
| the initial ctor making the root key | |
| Future< CoeffTracker > | activate () const |
| find the coefficients | |
| const coeffT & | coeff () const |
| const reference to the coeffs | |
| coeffT | coeff (const keyT &key) const |
| return the coefficients belonging to the passed-in key | |
| double | dnorm (const keyT &key) const |
| return the s and dnorm belonging to the passed-in key | |
| const implT * | get_impl () const |
| const reference to impl | |
| const LeafStatus & | is_leaf () const |
| const reference to is_leaf flag | |
| const keyT & | key () const |
| const reference to the key | |
| CoeffTracker | make_child (const keyT &child) const |
| make a child of this, ignoring the coeffs | |
| template<typename Archive > | |
| void | serialize (const Archive &ar) |
| serialization | |
Private Types | |
| typedef GenTensor< T > | coeffT |
| typedef std::pair< Key< NDIM >, ShallowNode< T, NDIM > > | datumT |
| typedef FunctionImpl< T, NDIM > | implT |
| typedef Key< NDIM > | keyT |
| enum | LeafStatus { no , yes , unknown } |
Private Member Functions | |
| CoeffTracker | forward_ctor (const CoeffTracker &other, const datumT &datum) const |
| taskq-compatible forwarding to the ctor | |
Private Attributes | |
| coeffT | coeff_ |
| the coefficients belonging to key | |
| double | dnorm_ =-1.0 |
| norm of d coefficients corresponding to key | |
| const implT * | impl |
| the funcimpl that has the coeffs | |
| LeafStatus | is_leaf_ |
| flag if key is a leaf node | |
| keyT | key_ |
| the current key, which must exists in impl | |
a class to track where relevant (parent) coeffs are
E.g. if a 6D function is composed of two 3D functions their coefficients must be tracked. We might need coeffs from a box that does not exist, and to avoid searching for parents we track which are their required respective boxes.
Usage: 1. make the child of a given CoeffTracker. If the parent CoeffTracker refers to a leaf node (flag is_leaf) the child will refer to the same node. Otherwise it will refer to the child node.
|
private |
|
private |
default ctor
Referenced by madness::CoeffTracker< T, NDIM >::activate(), madness::CoeffTracker< T, NDIM >::forward_ctor(), and madness::CoeffTracker< T, NDIM >::make_child().
|
inline |
the initial ctor making the root key
References madness::FunctionImpl< T, NDIM >::get_cdata(), madness::CoeffTracker< T, NDIM >::impl, and madness::CoeffTracker< T, NDIM >::key_.
|
inlineexplicit |
ctor with a pair<keyT,nodeT>
References madness::CoeffTracker< T, NDIM >::is_leaf_, madness::CoeffTracker< T, NDIM >::no, and madness::CoeffTracker< T, NDIM >::yes.
|
inline |
copy ctor
|
inline |
find the coefficients
this involves communication to a remote node
References madness::CoeffTracker< T, NDIM >::CoeffTracker(), madness::WorldTaskQueue::add(), madness::FunctionImpl< T, NDIM >::find_datum(), madness::CoeffTracker< T, NDIM >::forward_ctor(), madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::TaskAttributes::hipri(), madness::CoeffTracker< T, NDIM >::impl, madness::FunctionImpl< T, NDIM >::is_on_demand(), madness::CoeffTracker< T, NDIM >::key(), madness::CoeffTracker< T, NDIM >::key_, madness::nonlinear_vector_solver(), madness::WorldContainer< keyT, valueT, hashfunT >::owner(), p(), madness::WorldObject< Derived >::task(), madness::World::taskq, and madness::FunctionImpl< T, NDIM >::world.
Referenced by madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::activate(), madness::FunctionImpl< T, NDIM >::add_op::activate(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::activate(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::activate(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::activate(), and madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::activate().
|
inline |
const reference to the coeffs
References madness::CoeffTracker< T, NDIM >::coeff_.
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 >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), and madness::FunctionImpl< T, NDIM >::add_op::operator()().
|
inline |
return the coefficients belonging to the passed-in key
if key equals tracked key just return the coeffs, otherwise make the child coefficients.
| [in] | key | return coeffs corresponding to this key |
References madness::CoeffTracker< T, NDIM >::coeff_, madness::CoeffTracker< T, NDIM >::impl, madness::FunctionImpl< T, NDIM >::is_compressed(), madness::FunctionImpl< T, NDIM >::is_nonstandard(), madness::FunctionImpl< T, NDIM >::is_nonstandard_with_leaves(), madness::CoeffTracker< T, NDIM >::key(), madness::CoeffTracker< T, NDIM >::key_, MADNESS_ASSERT, madness::nonlinear_vector_solver(), madness::FunctionImpl< T, NDIM >::parent_to_child(), and madness::FunctionImpl< T, NDIM >::parent_to_child_NS().
|
inline |
return the s and dnorm belonging to the passed-in key
References madness::CoeffTracker< T, NDIM >::dnorm_, madness::Key< NDIM >::is_child_of(), madness::CoeffTracker< T, NDIM >::key(), madness::CoeffTracker< T, NDIM >::key_, and MADNESS_ASSERT.
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::compute_error_from_inaccurate_refinement().
|
inlineprivate |
taskq-compatible forwarding to the ctor
References madness::CoeffTracker< T, NDIM >::CoeffTracker().
Referenced by madness::CoeffTracker< T, NDIM >::activate().
|
inline |
const reference to impl
References madness::CoeffTracker< T, NDIM >::impl.
Referenced by madness::FunctionImpl< T, NDIM >::add_op::activate(), 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 >::make_sum_coeffs(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::add_op::operator()(), and madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen().
|
inline |
const reference to is_leaf flag
References madness::CoeffTracker< T, NDIM >::is_leaf_.
Referenced by madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::operator()(), and madness::FunctionImpl< T, NDIM >::add_op::operator()().
|
inline |
const reference to the key
References madness::CoeffTracker< T, NDIM >::key_.
Referenced by madness::CoeffTracker< T, NDIM >::activate(), madness::CoeffTracker< T, NDIM >::coeff(), madness::CoeffTracker< T, NDIM >::dnorm(), madness::CoeffTracker< T, NDIM >::make_child(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), and madness::FunctionImpl< T, NDIM >::add_op::operator()().
|
inline |
make a child of this, ignoring the coeffs
References madness::CoeffTracker< T, NDIM >::CoeffTracker(), madness::CoeffTracker< T, NDIM >::impl, madness::CoeffTracker< T, NDIM >::is_leaf_, madness::FunctionImpl< T, NDIM >::is_on_demand(), madness::CoeffTracker< T, NDIM >::key(), madness::CoeffTracker< T, NDIM >::key_, madness::Key< NDIM >::level(), MADNESS_ASSERT, madness::CoeffTracker< T, NDIM >::no, madness::nonlinear_vector_solver(), madness::CoeffTracker< T, NDIM >::unknown, and madness::CoeffTracker< T, NDIM >::yes.
Referenced by madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::add_op::make_child(), madness::FunctionImpl< T, NDIM >::hartree_op< LDIM, leaf_opT >::make_child(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::make_child(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::make_child(), and madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::make_child().
|
inline |
the coefficients belonging to key
Referenced by madness::CoeffTracker< T, NDIM >::coeff(), madness::CoeffTracker< T, NDIM >::coeff(), and madness::CoeffTracker< T, NDIM >::serialize().
norm of d coefficients corresponding to key
Referenced by madness::CoeffTracker< T, NDIM >::dnorm(), and madness::CoeffTracker< T, NDIM >::serialize().
the funcimpl that has the coeffs
Referenced by madness::CoeffTracker< T, NDIM >::CoeffTracker(), madness::CoeffTracker< T, NDIM >::activate(), madness::CoeffTracker< T, NDIM >::coeff(), madness::CoeffTracker< T, NDIM >::get_impl(), madness::CoeffTracker< T, NDIM >::make_child(), and madness::CoeffTracker< T, NDIM >::serialize().
|
private |
flag if key is a leaf node
Referenced by madness::CoeffTracker< T, NDIM >::CoeffTracker(), madness::CoeffTracker< T, NDIM >::is_leaf(), madness::CoeffTracker< T, NDIM >::make_child(), and madness::CoeffTracker< T, NDIM >::serialize().
the current key, which must exists in impl
Referenced by madness::CoeffTracker< T, NDIM >::CoeffTracker(), madness::CoeffTracker< T, NDIM >::activate(), madness::CoeffTracker< T, NDIM >::coeff(), madness::CoeffTracker< T, NDIM >::dnorm(), madness::CoeffTracker< T, NDIM >::key(), madness::CoeffTracker< T, NDIM >::make_child(), and madness::CoeffTracker< T, NDIM >::serialize().