MADNESS 0.10.1
|
FunctionFactory implements the named-parameter idiom for Function. More...
#include <function_factory.h>
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. | |
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.
Type of vector holding coordinates.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
References madness::f, madness::FunctionFactory< T, NDIM >::functor(), and madness::FunctionFactory< T, NDIM >::self().
Referenced by cplxfunc0(), cplxfunc1(), cplxfunc2(), main(), and test_add().
|
inline |
|
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, op(), and madness::FunctionFactory< T, NDIM >::self().
|
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, madness::nonlinear_vector_solver(), op(), and madness::FunctionFactory< T, NDIM >::self().
|
inline |
References madness::FunctionFactory< T, NDIM >::_functor, madness::f, and madness::FunctionFactory< T, NDIM >::self().
Referenced by madness::PotentialManager::core_projection(), madness::FunctionFactory< T, NDIM >::f(), madness::PotentialManager::make_nuclear_potential(), madness::InitParameters::readnw(), and madness::LowRankFunctionFactory< T, NDIM, LDIM >::Yformer().
|
inlinevirtual |
return the functor; override this if the functor needs deferred construction
Reimplemented in madness::CompositeFactory< T, NDIM, MDIM >, and madness::TwoElectronFactory< T, NDIM >.
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 |
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
implement this in all derived classes for correct chaining
Referenced by madness::FunctionFactory< T, NDIM >::autorefine(), madness::FunctionFactory< T, NDIM >::compressed(), madness::FunctionFactory< T, NDIM >::empty(), madness::FunctionFactory< T, NDIM >::f(), madness::FunctionFactory< T, NDIM >::fence(), madness::FunctionFactory< T, NDIM >::functor(), madness::FunctionFactory< T, NDIM >::functor(), madness::FunctionFactory< T, NDIM >::initial_level(), madness::FunctionFactory< T, NDIM >::is_on_demand(), madness::FunctionFactory< T, NDIM >::k(), madness::FunctionFactory< T, NDIM >::max_refine_level(), madness::FunctionFactory< T, NDIM >::no_functor(), madness::FunctionFactory< T, NDIM >::noautorefine(), madness::FunctionFactory< T, NDIM >::nofence(), madness::FunctionFactory< T, NDIM >::norefine(), madness::FunctionFactory< T, NDIM >::notruncate_on_project(), madness::FunctionFactory< T, NDIM >::pmap(), madness::FunctionFactory< T, NDIM >::refine(), madness::FunctionFactory< T, NDIM >::special_level(), madness::FunctionFactory< T, NDIM >::special_points(), madness::FunctionFactory< T, NDIM >::thresh(), madness::FunctionFactory< T, NDIM >::treestate(), madness::FunctionFactory< T, NDIM >::truncate_mode(), and madness::FunctionFactory< T, NDIM >::truncate_on_project().
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in madness::TwoElectronFactory< T, NDIM >.
References madness::FunctionFactory< T, NDIM >::_thresh, madness::FunctionFactory< T, NDIM >::self(), and thresh.
Referenced by madness::apply(), madness::MP2::guess_mp1_3(), madness::hartree_product(), madness::hartree_product(), madness::PotentialManager::make_nuclear_potential(), and madness::Function< T, NDIM >::project_out().
|
inline |
|
inline |
|
inline |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::empty().
|
private |
|
protected |
Referenced by madness::FunctionFactory< T, NDIM >::initial_level().
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 |
Referenced by madness::FunctionFactory< T, NDIM >::special_level().
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().