MADNESS 0.10.1
Public Types | Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
madness::CompositeFactory< T, NDIM, MDIM > Class Template Reference

Factory for facile setup of a CompositeFunctorInterface and its FuncImpl. More...

#include <function_factory.h>

Inheritance diagram for madness::CompositeFactory< T, NDIM, MDIM >:
Inheritance graph
[legend]
Collaboration diagram for madness::CompositeFactory< T, NDIM, MDIM >:
Collaboration graph
[legend]

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)
 
CompositeFactoryg12 (const Function< T, NDIM > &f)
 g12 is the interaction potential (6D)
 
std::shared_ptr< FunctionFunctorInterface< T, NDIM > > get_functor () const
 return the functor; override this if the functor needs deferred construction
 
CompositeFactoryket (const Function< T, NDIM > &f)
 provide directly the NDIM (6D) pair function ket
 
CompositeFactoryket (const std::vector< Function< T, NDIM > > &vf)
 
CompositeFactoryparticle1 (const Function< T, MDIM > &f)
 
CompositeFactoryparticle1 (const std::vector< Function< T, MDIM > > &vf)
 
CompositeFactoryparticle2 (const Function< T, MDIM > &f)
 
CompositeFactoryparticle2 (const std::vector< Function< T, MDIM > > &vf)
 
CompositeFactoryself ()
 
CompositeFactoryV_for_particle1 (const Function< T, MDIM > &f)
 a one-particle potential, acting on particle 1
 
CompositeFactoryV_for_particle2 (const Function< T, MDIM > &f)
 a one-particle potential, acting on particle 2
 
- Public Member Functions inherited from madness::FunctionFactory< T, NDIM >
 FunctionFactory (World &world)
 
virtual ~FunctionFactory ()
 
FunctionFactoryautorefine ()
 
FunctionFactorycompressed (bool value=true)
 
FunctionFactoryempty ()
 
FunctionFactoryf (T(*f)(const coordT &))
 
FunctionFactoryfence (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
 
template<typename opT >
std::enable_if< notstd::is_base_of< FunctionFunctorInterface< T, NDIM >, opT >::value, FunctionFactory & >::type functor (const opT &op)
 pass in a functor that is not derived from FunctionFunctorInterface
 
FunctionFactoryfunctor (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > &f)
 
int get_k () const
 
double get_thresh () const
 
Worldget_world () const
 
FunctionFactoryinitial_level (int initial_level)
 
virtual FunctionFactoryis_on_demand ()
 
virtual FunctionFactoryk (int k)
 
FunctionFactorymax_refine_level (int max_refine_level)
 
FunctionFactoryno_functor ()
 
FunctionFactorynoautorefine ()
 
FunctionFactorynofence ()
 
FunctionFactorynorefine (bool norefine=true)
 
FunctionFactorynotruncate_on_project ()
 
FunctionFactorypmap (const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap)
 
FunctionFactoryrefine (bool refine=true)
 
FunctionFactoryself ()
 implement this in all derived classes for correct chaining
 
FunctionFactoryspecial_level (int special_level)
 
FunctionFactoryspecial_points (std::vector< Vector< double, NDIM > > &special_points)
 
virtual FunctionFactorythresh (double thresh)
 
FunctionFactorytruncate_mode (int truncate_mode)
 
FunctionFactorytruncate_on_project ()
 

Public Attributes

std::shared_ptr< FunctionImpl< T, NDIM > > _g12
 supposedly a interaction potential
 
std::vector< implT_ptr_hidim_ket
 
std::vector< std::shared_ptr< FunctionImpl< T, MDIM > > > _particle1
 supposedly particle 1
 
std::vector< std::shared_ptr< FunctionImpl< T, MDIM > > > _particle2
 supposedly particle 2
 
std::shared_ptr< FunctionImpl< T, MDIM > > _v1
 supposedly a potential for particle 1
 
std::shared_ptr< FunctionImpl< T, MDIM > > _v2
 supposedly a potential for particle 2
 

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
 

Detailed Description

template<typename T, std::size_t NDIM, std::size_t MDIM>
class madness::CompositeFactory< T, NDIM, MDIM >

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.

Member Typedef Documentation

◆ implT_ptr_hidim

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef std::shared_ptr<FunctionImpl<T, NDIM> > madness::CompositeFactory< T, NDIM, MDIM >::implT_ptr_hidim

◆ implT_ptr_lodim

template<typename T , std::size_t NDIM, std::size_t MDIM>
typedef std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::implT_ptr_lodim

Constructor & Destructor Documentation

◆ CompositeFactory()

template<typename T , std::size_t NDIM, std::size_t MDIM>
madness::CompositeFactory< T, NDIM, MDIM >::CompositeFactory ( World world)
inline

References madness::on_demand.

Member Function Documentation

◆ g12()

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::g12 ( const Function< T, NDIM > &  f)
inline

◆ get_functor()

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr< FunctionFunctorInterface< T, NDIM > > madness::CompositeFactory< T, NDIM, MDIM >::get_functor ( ) const
inlinevirtual

◆ ket() [1/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::ket ( const Function< T, NDIM > &  f)
inline

◆ ket() [2/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::ket ( const std::vector< Function< T, NDIM > > &  vf)
inline

◆ particle1() [1/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::particle1 ( const Function< T, MDIM > &  f)
inline

◆ particle1() [2/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::particle1 ( const std::vector< Function< T, MDIM > > &  vf)
inline

provide particle 1, used with particle 2 to set up a pair function by direct product

References madness::CompositeFactory< T, NDIM, MDIM >::_particle1, madness::f, and madness::CompositeFactory< T, NDIM, MDIM >::self().

◆ particle2() [1/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::particle2 ( const Function< T, MDIM > &  f)
inline

◆ particle2() [2/2]

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::particle2 ( const std::vector< Function< T, MDIM > > &  vf)
inline

provide particle 2, used with particle 1 to set up a pair function by direct product

References madness::CompositeFactory< T, NDIM, MDIM >::_particle2, madness::f, and madness::CompositeFactory< T, NDIM, MDIM >::self().

◆ self()

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::self ( )
inline

◆ V_for_particle1()

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle1 ( const Function< T, MDIM > &  f)
inline

◆ V_for_particle2()

template<typename T , std::size_t NDIM, std::size_t MDIM>
CompositeFactory & madness::CompositeFactory< T, NDIM, MDIM >::V_for_particle2 ( const Function< T, MDIM > &  f)
inline

Friends And Related Symbol Documentation

◆ CompositeFunctorInterface< T, NDIM, MDIM >

template<typename T , std::size_t NDIM, std::size_t MDIM>
friend class CompositeFunctorInterface< T, NDIM, MDIM >
friend

Member Data Documentation

◆ _func

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<CompositeFunctorInterface<T, NDIM, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_func
private

◆ _g12

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<FunctionImpl<T, NDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_g12

◆ _ket

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<implT_ptr_hidim> madness::CompositeFactory< T, NDIM, MDIM >::_ket

◆ _particle1

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<std::shared_ptr<FunctionImpl<T, MDIM> > > madness::CompositeFactory< T, NDIM, MDIM >::_particle1

◆ _particle2

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::vector<std::shared_ptr<FunctionImpl<T, MDIM> > > madness::CompositeFactory< T, NDIM, MDIM >::_particle2

◆ _v1

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_v1

◆ _v2

template<typename T , std::size_t NDIM, std::size_t MDIM>
std::shared_ptr<FunctionImpl<T, MDIM> > madness::CompositeFactory< T, NDIM, MDIM >::_v2

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