MADNESS
0.10.1
|
Factory for facile setup of a CompositeFunctorInterface and its FuncImpl. More...
#include <function_factory.h>
Public Types | |
typedef std::shared_ptr< FunctionImpl< T, NDIM > > | implT_ptr_hidim |
typedef std::shared_ptr< FunctionImpl< T, MDIM > > | implT_ptr_lodim |
Public Member Functions | |
CompositeFactory (World &world) | |
CompositeFactory & | g12 (const Function< T, NDIM > &f) |
g12 is the interaction potential (6D) More... | |
std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | get_functor () const |
return the functor; override this if the functor needs deferred construction More... | |
CompositeFactory & | ket (const Function< T, NDIM > &f) |
provide directly the NDIM (6D) pair function ket More... | |
CompositeFactory & | ket (const std::vector< Function< T, NDIM >> &vf) |
CompositeFactory & | particle1 (const Function< T, MDIM > &f) |
CompositeFactory & | particle1 (const std::vector< Function< T, MDIM >> &vf) |
CompositeFactory & | particle2 (const Function< T, MDIM > &f) |
CompositeFactory & | particle2 (const std::vector< Function< T, MDIM >> &vf) |
CompositeFactory & | self () |
CompositeFactory & | V_for_particle1 (const Function< T, MDIM > &f) |
a one-particle potential, acting on particle 1 More... | |
CompositeFactory & | V_for_particle2 (const Function< T, MDIM > &f) |
a one-particle potential, acting on particle 2 More... | |
Public Member Functions inherited from madness::FunctionFactory< T, NDIM > | |
FunctionFactory (World &world) | |
virtual | ~FunctionFactory () |
FunctionFactory & | autorefine () |
FunctionFactory & | compressed (bool value=true) |
FunctionFactory & | empty () |
FunctionFactory & | f (T(*f)(const coordT &)) |
FunctionFactory & | fence (bool fence=true) |
template<typename opT > | |
std::enable_if< std::is_base_of< FunctionFunctorInterface< T, NDIM >, opT >::value, FunctionFactory & >::type | functor (const opT &op) |
pass in a functor that is derived from FunctionFunctorInterface More... | |
template<typename opT > | |
std::enable_if< not std::is_base_of< FunctionFunctorInterface< T, NDIM >, opT >::value, FunctionFactory & >::type | functor (const opT &op) |
pass in a functor that is not derived from FunctionFunctorInterface More... | |
FunctionFactory & | functor (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > &f) |
int | get_k () const |
double | get_thresh () const |
World & | get_world () const |
FunctionFactory & | initial_level (int initial_level) |
virtual FunctionFactory & | is_on_demand () |
virtual FunctionFactory & | k (int k) |
FunctionFactory & | max_refine_level (int max_refine_level) |
FunctionFactory & | no_functor () |
FunctionFactory & | noautorefine () |
FunctionFactory & | nofence () |
FunctionFactory & | norefine (bool norefine=true) |
FunctionFactory & | notruncate_on_project () |
FunctionFactory & | pmap (const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap) |
FunctionFactory & | refine (bool refine=true) |
FunctionFactory & | self () |
implement this in all derived classes for correct chaining More... | |
FunctionFactory & | special_level (int special_level) |
FunctionFactory & | special_points (std::vector< Vector< double, NDIM > > &special_points) |
virtual FunctionFactory & | thresh (double thresh) |
FunctionFactory & | truncate_mode (int truncate_mode) |
FunctionFactory & | truncate_on_project () |
Public Attributes | |
std::shared_ptr< FunctionImpl< T, NDIM > > | _g12 |
supposedly a interaction potential More... | |
std::vector< implT_ptr_hidim > | _ket |
std::vector< std::shared_ptr< FunctionImpl< T, MDIM > > > | _particle1 |
supposedly particle 1 More... | |
std::vector< std::shared_ptr< FunctionImpl< T, MDIM > > > | _particle2 |
supposedly particle 2 More... | |
std::shared_ptr< FunctionImpl< T, MDIM > > | _v1 |
supposedly a potential for particle 1 More... | |
std::shared_ptr< FunctionImpl< T, MDIM > > | _v2 |
supposedly a potential for particle 2 More... | |
Private Attributes | |
std::shared_ptr< CompositeFunctorInterface< T, NDIM, MDIM > > | _func |
Friends | |
class | CompositeFunctorInterface< T, NDIM, MDIM > |
Additional Inherited Members | |
Protected Attributes inherited from madness::FunctionFactory< T, NDIM > | |
bool | _autorefine |
bool | _empty |
bool | _fence |
int | _initial_level = FunctionDefaults<NDIM>::get_initial_level() |
int | _k |
int | _max_refine_level |
std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > | _pmap |
bool | _refine |
int | _special_level = FunctionDefaults<NDIM>::get_special_level() |
std::vector< Vector< double, NDIM > > | _special_points |
double | _thresh |
TreeState | _tree_state |
int | _truncate_mode |
bool | _truncate_on_project |
World & | _world |
Factory for facile setup of a CompositeFunctorInterface and its FuncImpl.
for the concept of a Factory see base class FunctionFactory here we need to provide two different dimensions, since the main purpose of this is to set up a pair function (6D), consisting of orbitals (3D), and also one- and two-electron potentials
This Factory constructs a FuncImpl, and also the functor to it.
NOTE: pass in only copies of functions, since use in here will corrupt the tree structure and functions will not pass the VERIFY test after this.
typedef std::shared_ptr<FunctionImpl<T, NDIM> > madness::CompositeFactory< T, NDIM, MDIM >::implT_ptr_hidim |
typedef std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::implT_ptr_lodim |
|
inline |
References madness::on_demand.
|
inline |
g12 is the interaction potential (6D)
References madness::CompositeFactory< T, NDIM, MDIM >::_g12, and madness::FunctionFactory< T, NDIM >::f().
Referenced by apply_U_mix(), compute_energy(), compute_R2f2_psi(), madness::CCPairFunction< T, NDIM >::convert_to_pure_no_op_inplace(), madness::CCPairFunction< T, NDIM >::inner_internal(), main(), madness::MP2::make_Uphi0(), madness::CCPairFunction< T, NDIM >::op_pure_to_pure(), reconstruct_psi(), solve(), test_adaptive_tree(), test_Kcommutator(), test_multiply(), test_U_el(), and test_vector_composite().
|
inlinevirtual |
return the functor; override this if the functor needs deferred construction
Reimplemented from madness::FunctionFactory< T, NDIM >.
References madness::CompositeFactory< T, NDIM, MDIM >::_func, madness::CompositeFactory< T, NDIM, MDIM >::_g12, madness::CompositeFactory< T, NDIM, MDIM >::_ket, madness::CompositeFactory< T, NDIM, MDIM >::_particle1, madness::CompositeFactory< T, NDIM, MDIM >::_particle2, madness::CompositeFactory< T, NDIM, MDIM >::_v1, and madness::CompositeFactory< T, NDIM, MDIM >::_v2.
|
inline |
provide directly the NDIM (6D) pair function ket
References madness::CompositeFactory< T, NDIM, MDIM >::_ket, and madness::FunctionFactory< T, NDIM >::f().
Referenced by apply_U_mix(), apply_U_ncf(), apply_V(), compute_energy(), compute_R2f2_psi(), madness::CCPairFunction< T, NDIM >::convert_to_pure_no_op_inplace(), madness::CCPairFunction< T, NDIM >::inner_internal(), main(), madness::CCPairFunction< T, NDIM >::op_pure_to_pure(), reconstruct_psi(), solve(), test_adaptive_tree(), test_compress(), test_multiply(), test_recursive_application(), test_U_el(), and test_vector_composite().
|
inline |
|
inline |
provide particle 1, used with particle 2 to set up a pair function by direct product
References madness::CompositeFactory< T, NDIM, MDIM >::_particle1, and madness::FunctionFactory< T, NDIM >::f().
Referenced by compute_energy(), madness::CCPairFunction< T, NDIM >::convert_to_pure_no_op_inplace(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::CCPairFunction< T, NDIM >::inner_internal(), madness::MP2::make_Uphi0(), madness::CCPairFunction< T, NDIM >::make_xy_u(), test_Kcommutator(), test_multiply(), test_tight_diffuse(), and test_vector_composite().
|
inline |
provide particle 1, used with particle 2 to set up a pair function by direct product
References madness::CompositeFactory< T, NDIM, MDIM >::_particle1, and madness::FunctionFactory< T, NDIM >::f().
|
inline |
provide particle 2, used with particle 1 to set up a pair function by direct product
References madness::CompositeFactory< T, NDIM, MDIM >::_particle2, and madness::FunctionFactory< T, NDIM >::f().
Referenced by compute_energy(), madness::CCPairFunction< T, NDIM >::convert_to_pure_no_op_inplace(), madness::StrongOrthogonalityProjector< T, NDIM >::get_vectors_for_outer_product(), madness::CCPairFunction< T, NDIM >::inner_internal(), madness::MP2::make_Uphi0(), madness::CCPairFunction< T, NDIM >::make_xy_u(), test_Kcommutator(), test_multiply(), test_tight_diffuse(), and test_vector_composite().
|
inline |
provide particle 2, used with particle 1 to set up a pair function by direct product
References madness::CompositeFactory< T, NDIM, MDIM >::_particle2, and madness::FunctionFactory< T, NDIM >::f().
|
inline |
|
inline |
a one-particle potential, acting on particle 1
References madness::CompositeFactory< T, NDIM, MDIM >::_v1, and madness::FunctionFactory< T, NDIM >::f().
Referenced by apply_U_mix(), apply_U_ncf(), apply_V(), compute_energy(), compute_R2f2_psi(), main(), reconstruct_psi(), solve(), test_adaptive_tree(), test_compress(), test_multiply(), and test_recursive_application().
|
inline |
a one-particle potential, acting on particle 2
References madness::CompositeFactory< T, NDIM, MDIM >::_v2, and madness::FunctionFactory< T, NDIM >::f().
Referenced by apply_U_mix(), apply_U_ncf(), apply_V(), compute_energy(), compute_R2f2_psi(), main(), reconstruct_psi(), solve(), test_adaptive_tree(), and test_compress().
|
friend |
|
private |
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::get_functor().
std::shared_ptr<FunctionImpl<T, NDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_g12 |
supposedly a interaction potential
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::g12(), and madness::CompositeFactory< T, NDIM, MDIM >::get_functor().
std::vector<implT_ptr_hidim> madness::CompositeFactory< T, NDIM, MDIM >::_ket |
std::vector<std::shared_ptr<FunctionImpl<T, MDIM> > > madness::CompositeFactory< T, NDIM, MDIM >::_particle1 |
supposedly particle 1
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::get_functor(), and madness::CompositeFactory< T, NDIM, MDIM >::particle1().
std::vector<std::shared_ptr<FunctionImpl<T, MDIM> > > madness::CompositeFactory< T, NDIM, MDIM >::_particle2 |
supposedly particle 2
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::get_functor(), and madness::CompositeFactory< T, NDIM, MDIM >::particle2().
std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_v1 |
supposedly a potential for particle 1
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::get_functor(), and madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1().
std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_v2 |
supposedly a potential for particle 2
Referenced by madness::CompositeFactory< T, NDIM, MDIM >::get_functor(), and madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2().