MADNESS 0.10.1
madness::Leaf_op< T, NDIM, opT, specialboxT > Class Template Reference

#include <leafop.h>

Inheritance diagram for madness::Leaf_op< T, NDIM, opT, specialboxT >:
Collaboration diagram for madness::Leaf_op< T, NDIM, opT, specialboxT >:

Public Member Functions

 Leaf_op ()
 Leaf_op (const FunctionImpl< T, NDIM > *const tmp)
 Leaf_op (const FunctionImpl< T, NDIM > *const tmp, const opT *const ope, specialboxT &sb)
 Leaf_op (const FunctionImpl< T, NDIM > *const tmp, specialboxT &sb)
 Leaf_op (const Leaf_op &other)
virtual ~Leaf_op ()
bool compare_to_parent (const Key< NDIM > &key, const GenTensor< T > &coeff, const GenTensor< T > &parent) const
bool do_pre_screening () const override
 pre or post screening (see if this is the general_leaf_op or the leaf_op_other)
virtual std::string name () const
bool post_screening (const Key< NDIM > &key, const GenTensor< T > &coeff) const override
bool pre_screening (const Key< NDIM > &key) const override
virtual void sanity () const
 make sanity check
template<typename Archive>
void serialize (Archive &ar)
bool special_refinement_needed (const Key< NDIM > &key) const override
Public Member Functions inherited from madness::LeafOpBase< T, NDIM >
virtual ~LeafOpBase ()=default

Public Attributes

const FunctionImpl< T, NDIM > * f
 the function which the operators use (in most cases this function is also the function that will be constructed)
const opT * op
 the operator which is used for screening (null pointer means no screening)
specialboxT specialbox

Constructor & Destructor Documentation

◆ Leaf_op() [1/5]

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
madness::Leaf_op< T, NDIM, opT, specialboxT >::Leaf_op ( )
inline

References f, op, and specialbox.

Referenced by Leaf_op().

◆ Leaf_op() [2/5]

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
madness::Leaf_op< T, NDIM, opT, specialboxT >::Leaf_op ( const FunctionImpl< T, NDIM > *const tmp)
inline

References f, op, and specialbox.

◆ Leaf_op() [3/5]

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
madness::Leaf_op< T, NDIM, opT, specialboxT >::Leaf_op ( const FunctionImpl< T, NDIM > *const tmp,
specialboxT & sb )
inline

References f, op, and specialbox.

◆ Leaf_op() [4/5]

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
madness::Leaf_op< T, NDIM, opT, specialboxT >::Leaf_op ( const FunctionImpl< T, NDIM > *const tmp,
const opT *const ope,
specialboxT & sb )
inline

References f, op, and specialbox.

◆ Leaf_op() [5/5]

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
madness::Leaf_op< T, NDIM, opT, specialboxT >::Leaf_op ( const Leaf_op< T, NDIM, opT, specialboxT > & other)
inline

References Leaf_op(), f, op, and specialbox.

◆ ~Leaf_op()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
virtual madness::Leaf_op< T, NDIM, opT, specialboxT >::~Leaf_op ( )
inlinevirtual

Member Function Documentation

◆ compare_to_parent()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
bool madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent ( const Key< NDIM > & key,
const GenTensor< T > & coeff,
const GenTensor< T > & parent ) const
inline

determines if a node is well represented compared to the parents

Parameters
[in]keythe FunctionNode which we want to determine if it's a leaf node
[in]coeffthe coeffs of key
[in]parentthe coeffs of key's parent node
Returns
is the FunctionNode of key a leaf node?

References madness::FunctionImpl< T, NDIM >::get_thresh(), madness::GenTensor< T >::has_no_data(), madness::Key< NDIM >::level(), madness::GenTensor< T >::normf(), madness::GenTensor< T >::scale(), madness::FunctionImpl< T, NDIM >::truncate_tol(), and madness::FunctionImpl< T, NDIM >::upsample().

◆ do_pre_screening()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
bool madness::Leaf_op< T, NDIM, opT, specialboxT >::do_pre_screening ( ) const
inlineoverridevirtual

pre or post screening (see if this is the general_leaf_op or the leaf_op_other)

Reimplemented from madness::LeafOpBase< T, NDIM >.

Reimplemented in madness::Leaf_op_other< T, NDIM >.

◆ name()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
virtual std::string madness::Leaf_op< T, NDIM, opT, specialboxT >::name ( ) const
inlinevirtual

Reimplemented in madness::Leaf_op_other< T, NDIM >.

Referenced by sanity().

◆ post_screening()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
bool madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening ( const Key< NDIM > & key,
const GenTensor< T > & coeff ) const
inlineoverridevirtual

post-determination determination if the box will be a leaf box after the coefficients are made the function that is being constructed is the function in this class the function will use the opartor op in order to screen, if op is a NULL pointer the result is always: false

Parameters
[in]keythe key to the current box
[in]coeffCoefficients of the current box

Reimplemented from madness::LeafOpBase< T, NDIM >.

Reimplemented in madness::Leaf_op_other< T, NDIM >.

References madness::FunctionDefaults< NDIM >::thresh, madness::FunctionImpl< T, NDIM >::get_thresh(), madness::Key< NDIM >::level(), norm(), madness::GenTensor< T >::normf(), op, sanity(), source(), and madness::FunctionImpl< T, NDIM >::truncate_tol().

◆ pre_screening()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
bool madness::Leaf_op< T, NDIM, opT, specialboxT >::pre_screening ( const Key< NDIM > & key) const
inlineoverridevirtual

pre-determination the decision if the current box will be a leaf box is made from information of another function this is needed for on demand function not that the on-demand function that is being constructed is not the function in this class

Reimplemented from madness::LeafOpBase< T, NDIM >.

Reimplemented in madness::Leaf_op_other< T, NDIM >.

References MADNESS_EXCEPTION.

◆ sanity()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
virtual void madness::Leaf_op< T, NDIM, opT, specialboxT >::sanity ( ) const
inlinevirtual

make sanity check

Reimplemented in madness::Leaf_op_other< T, NDIM >.

References f, MADNESS_EXCEPTION, and name().

Referenced by post_screening().

◆ serialize()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
template<typename Archive>
void madness::Leaf_op< T, NDIM, opT, specialboxT >::serialize ( Archive & ar)
inline

◆ special_refinement_needed()

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
bool madness::Leaf_op< T, NDIM, opT, specialboxT >::special_refinement_needed ( const Key< NDIM > & key) const
inlineoverridevirtual

check if the box is a special box first check: Is one of the special points defined in the function f in the current box or a neighbour box second check: Is the box special according to the specialbox operator (see class description of Specialbox_op)

Parameters
[in]thekey of the box

Reimplemented from madness::LeafOpBase< T, NDIM >.

Reimplemented in madness::Leaf_op_other< T, NDIM >.

References f, madness::Key< NDIM >::level(), and specialbox.

Member Data Documentation

◆ f

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
const FunctionImpl<T, NDIM>* madness::Leaf_op< T, NDIM, opT, specialboxT >::f

the function which the operators use (in most cases this function is also the function that will be constructed)

Referenced by Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), sanity(), and special_refinement_needed().

◆ op

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
const opT* madness::Leaf_op< T, NDIM, opT, specialboxT >::op

the operator which is used for screening (null pointer means no screening)

Referenced by Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), and post_screening().

◆ specialbox

template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
specialboxT madness::Leaf_op< T, NDIM, opT, specialboxT >::specialbox

special box structure: has an operator which decides if a given key belongs to a special box the base class Specialbox_op<T,NDIM> just gives back false for every key the derived class Cuspybox_op<T,NDIM> is used for potentials containing cusps at coalescence points of electrons

Referenced by Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), Leaf_op(), and special_refinement_needed().


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