MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
madness::Displacements< NDIM > Class Template Reference

Holds displacements for applying operators to avoid replicating for all operators. More...

#include <displacements.h>

Collaboration diagram for madness::Displacements< NDIM >:
Collaboration graph
[legend]

Public Member Functions

 Displacements ()
 
const std::vector< Key< NDIM > > & get_disp ()
 return the standard displacements appropriate for operators w/o lattice summation
 
const std::vector< Key< NDIM > > & get_disp (Level n, const array_of_bools< NDIM > &kernel_lattice_sum_axes)
 

Static Public Member Functions

static int bmax_default ()
 
static void reset_periodic_axes (const array_of_bools< NDIM > &new_periodic_axes)
 rebuilds periodic displacements so that they are optimal for the given set of periodic axes
 

Static Private Member Functions

static bool cmp_keys (const Key< NDIM > &a, const Key< NDIM > &b)
 
static bool cmp_keys_periodic (const Key< NDIM > &a, const Key< NDIM > &b)
 
static void make_disp (int bmax)
 
static void make_disp_periodic (int bmax, Level n)
 

Static Private Attributes

static std::vector< Key< NDIM > > disp
 standard displacements to be used with standard kernels (range-unrestricted, no lattice sum)
 
static std::vector< Key< NDIM > > disp_periodic [64]
 displacements to be used with lattice-summed kernels
 
static array_of_bools< NDIMperiodic_axes {false}
 along which axes lattice summation is performed?
 

Detailed Description

template<std::size_t NDIM>
class madness::Displacements< NDIM >

Holds displacements for applying operators to avoid replicating for all operators.

Constructor & Destructor Documentation

◆ Displacements()

template<std::size_t NDIM>
madness::Displacements< NDIM >::Displacements ( )
inline

first time this is called displacements are generated. if boundary conditions are not periodic, the periodic displacements are generated for all axes. This allows to support application of operators with boundary conditions periodic along any axis (including all). If need to use periodic boundary conditions for some axes only, make sure to set the boundary conditions appropriately before the first call to this

References madness::Displacements< NDIM >::bmax_default(), madness::Displacements< NDIM >::disp, madness::Displacements< NDIM >::disp_periodic, MADNESS_PRAGMA_CLANG, madness::Displacements< NDIM >::make_disp(), NDIM, madness::pop(), and madness::Displacements< NDIM >::reset_periodic_axes().

Member Function Documentation

◆ bmax_default()

template<std::size_t NDIM>
static int madness::Displacements< NDIM >::bmax_default ( )
inlinestatic

◆ cmp_keys()

template<std::size_t NDIM>
static bool madness::Displacements< NDIM >::cmp_keys ( const Key< NDIM > &  a,
const Key< NDIM > &  b 
)
inlinestaticprivate

References a, and b.

Referenced by madness::Displacements< NDIM >::make_disp().

◆ cmp_keys_periodic()

template<std::size_t NDIM>
static bool madness::Displacements< NDIM >::cmp_keys_periodic ( const Key< NDIM > &  a,
const Key< NDIM > &  b 
)
inlinestaticprivate

◆ get_disp() [1/2]

template<std::size_t NDIM>
const std::vector< Key< NDIM > > & madness::Displacements< NDIM >::get_disp ( )
inline

return the standard displacements appropriate for operators w/o lattice summation

References madness::Displacements< NDIM >::disp, MADNESS_PRAGMA_CLANG, and madness::pop().

◆ get_disp() [2/2]

template<std::size_t NDIM>
const std::vector< Key< NDIM > > & madness::Displacements< NDIM >::get_disp ( Level  n,
const array_of_bools< NDIM > &  kernel_lattice_sum_axes 
)
inline

◆ make_disp()

template<std::size_t NDIM>
static void madness::Displacements< NDIM >::make_disp ( int  bmax)
inlinestaticprivate

◆ make_disp_periodic()

template<std::size_t NDIM>
static void madness::Displacements< NDIM >::make_disp_periodic ( int  bmax,
Level  n 
)
inlinestaticprivate

◆ reset_periodic_axes()

template<std::size_t NDIM>
static void madness::Displacements< NDIM >::reset_periodic_axes ( const array_of_bools< NDIM > &  new_periodic_axes)
inlinestatic

rebuilds periodic displacements so that they are optimal for the given set of periodic axes

this must be done while no references to prior periodic displacements are outstanding (i.e. no operator application tasks in flight)

Parameters
new_periodic_axesthe new periodic axes

References madness::array_of_bools< N >::any(), madness::Displacements< NDIM >::bmax_default(), MADNESS_ASSERT, MADNESS_PRAGMA_CLANG, madness::Displacements< NDIM >::make_disp_periodic(), madness::Displacements< NDIM >::periodic_axes, and madness::pop().

Referenced by madness::Displacements< NDIM >::Displacements().

Member Data Documentation

◆ disp

template<std::size_t NDIM>
std::vector< Key< NDIM > > madness::Displacements< NDIM >::disp
staticprivate

standard displacements to be used with standard kernels (range-unrestricted, no lattice sum)

Referenced by madness::Displacements< NDIM >::Displacements(), madness::Displacements< NDIM >::get_disp(), madness::Displacements< NDIM >::get_disp(), and madness::Displacements< NDIM >::make_disp().

◆ disp_periodic

template<std::size_t NDIM>
std::vector< Key< NDIM > > madness::Displacements< NDIM >::disp_periodic
staticprivate

◆ periodic_axes

template<std::size_t NDIM>
array_of_bools< NDIM > madness::Displacements< NDIM >::periodic_axes {false}
staticprivate

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