MADNESS
0.10.1
|
FunctionFactory implements the named-parameter idiom for Function. More...
#include <function_factory.h>
Public Member Functions | |
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) |
virtual std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | get_functor () const |
return the functor; override this if the functor needs deferred construction More... | |
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 () |
Protected Attributes | |
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 |
Private Types | |
typedef Vector< double, NDIM > | coordT |
Type of vector holding coordinates. More... | |
Private Attributes | |
std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | _functor |
Friends | |
class | FunctionImpl< T, NDIM > |
FunctionFactory implements the named-parameter idiom for Function.
C++ does not provide named arguments (as does, e.g., Python). This class provides something very close. Create functions as follows
where the methods of function factory, which specify the non-default arguments eventually passed to the Function
constructor, can be used in any order.
Need to add a general functor for initial projection with a standard interface.
|
private |
Type of vector holding coordinates.
|
inline |
|
inlinevirtual |
|
inline |
References madness::FunctionFactory< T, NDIM >::_autorefine.
|
inline |
References madness::FunctionFactory< T, NDIM >::_tree_state, madness::compressed, and madness::reconstructed.
Referenced by molresponseExchange(), and madness::sum().
|
inline |
References madness::FunctionFactory< T, NDIM >::_empty.
Referenced by madness::apply(), madness::hartree_product(), madness::innerXX(), and madness::project().
|
inline |
References madness::FunctionFactory< T, NDIM >::functor().
Referenced by cplxfunc0(), cplxfunc1(), cplxfunc2(), madness::FunctionFactory< T, NDIM >::functor(), madness::CompositeFactory< T, NDIM, MDIM >::g12(), data< T, NDIM >::initialize(), madness::CompositeFactory< T, NDIM, MDIM >::ket(), main(), madness::smooth< T, NDIM >::make_inv_mask(), madness::LRFunctorF12< T, NDIM, LDIM >::norm2(), madness::CompositeFactory< T, NDIM, MDIM >::particle1(), madness::CompositeFactory< T, NDIM, MDIM >::particle2(), realfunc0(), realfunc1(), realfunc2(), test_add(), test_hartree_product(), test_he(), test_he_potential(), test_hf_be(), test_hf_h2(), test_hf_he(), test_hydro(), test_per(), test_periodic(), test_periodic1(), test_periodic2(), test_periodic_bsh(), test_projector_outer(), test_swap_particles(), test_vector_composite(), test_xc2(), testNavierStokes(), testPeriodicCoulomb3d(), madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1(), and madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2().
|
inline |
References madness::FunctionFactory< T, NDIM >::_fence.
Referenced by madness::apply().
|
inline |
pass in a functor that is derived from FunctionFunctorInterface
similar to the first version of functor, but easy-to-use FunctionFunctorInterface must be a public base of opT
References madness::FunctionFactory< T, NDIM >::_functor, and op().
|
inline |
pass in a functor that is not derived from FunctionFunctorInterface
similar to the first version of functor, but easy-to-use
References madness::FunctionFactory< T, NDIM >::_functor, and op().
|
inline |
References madness::FunctionFactory< T, NDIM >::_functor, and madness::FunctionFactory< T, NDIM >::f().
Referenced by dnuclear_anchor_test(), madness::exchange_anchor_test(), exchange_anchor_test(), madness::FunctionFactory< T, NDIM >::f(), nuclear_anchor_test(), madness::InitParameters::readnw(), test_add(), test_apply_push_1d(), test_arithmetic(), test_asymmetric(), test_basic(), test_bsh(), test_combined_operators(), test_construction_optimization(), test_conv(), test_converged_function(), test_convergence(), test_coulomb(), test_cross(), test_diff(), madness::test_exchange(), test_exchange(), test_fock(), test_full_rank_functor(), test_hermiticity(), test_hf_he(), test_inner(), test_io(), test_kinetic(), test_lowrank_function(), test_math(), test_matrix_mul_sparse(), test_molecular_grid(), test_multi_to_multi_op(), test_op(), test_operator_apply(), test_plot(), test_proj(), test_projector(), test_Q12_projector(), test_rot(), test_transform(), test_unaryop(), and test_XCOperator().
|
inlinevirtual |
return the functor; override this if the functor needs deferred construction
Reimplemented in madness::TwoElectronFactory< T, NDIM >, and madness::CompositeFactory< T, NDIM, MDIM >.
References madness::FunctionFactory< T, NDIM >::_functor.
|
inline |
References madness::FunctionFactory< T, NDIM >::_k.
|
inline |
References madness::FunctionFactory< T, NDIM >::_thresh.
|
inline |
References madness::FunctionFactory< T, NDIM >::_world.
|
inline |
References madness::FunctionFactory< T, NDIM >::_initial_level.
Referenced by main(), test_conv(), test_coulomb(), test_hf_be(), test_hydro(), and test_per().
|
inlinevirtual |
References madness::FunctionFactory< T, NDIM >::_tree_state, and madness::on_demand.
Referenced by test_vector_composite().
|
inlinevirtual |
|
inline |
|
inline |
References madness::FunctionFactory< T, NDIM >::_functor.
|
inline |
References madness::FunctionFactory< T, NDIM >::_autorefine.
|
inline |
References madness::FunctionFactory< T, NDIM >::_fence.
Referenced by madness::innerXX().
|
inline |
References madness::FunctionFactory< T, NDIM >::_refine.
Referenced by test_conv(), and test_per().
|
inline |
|
inline |
References madness::FunctionFactory< T, NDIM >::_pmap.
|
inline |
References madness::FunctionFactory< T, NDIM >::_refine.
|
inline |
implement this in all derived classes for correct chaining
|
inline |
|
inline |
References madness::FunctionFactory< T, NDIM >::_special_points.
Referenced by main().
|
inlinevirtual |
Reimplemented in madness::TwoElectronFactory< T, NDIM >.
References madness::FunctionFactory< T, NDIM >::_thresh.
Referenced by madness::apply(), madness::exchange_anchor_test(), exchange_anchor_test(), madness::hartree_product(), madness::innerXX(), madness::MP2::make_Uphi0(), madness::project(), madness::Function< T, NDIM >::project_out(), test_coulomb(), madness::test_exchange(), test_exchange(), test_he(), test_hf_be(), and test_hydro().
|
inline |
|
inline |
References madness::FunctionFactory< T, NDIM >::_truncate_on_project.
Referenced by dnuclear_anchor_test(), madness::exchange_anchor_test(), exchange_anchor_test(), nuclear_anchor_test(), test_asymmetric(), test_coulomb(), madness::test_exchange(), test_exchange(), test_fock(), test_hermiticity(), test_kinetic(), and testNavierStokes().
|
friend |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::initial_level().
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::get_k(), and madness::FunctionFactory< T, NDIM >::k().
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::max_refine_level().
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::pmap().
|
protected |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::special_level().
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::special_points().
|
protected |
|
protected |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::truncate_mode().
|
protected |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::get_world().