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

#include <displacements.h>

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

Public Types

using Displacement = Key< NDIM >
 
using Periodicity = array_of_bools< NDIM >
 
using Point = Key< NDIM >
 
using PointPattern = Vector< std::optional< Translation >, NDIM >
 
using Reach = StandardDisplacementsReach< NDIM >
 

Public Member Functions

 BoxSurfaceDisplacementValidator (const array_of_bools< NDIM > &is_infinite_domain, const array_of_bools< NDIM > &is_lattice_summed, std::optional< Reach > reach={})
 
const array_of_bools< NDIM > & is_lattice_summed () const
 
bool operator() (const Level level, const PointPattern &dest, std::optional< Displacement > &displacement) const
 Apply filter to a displacement ending up at a point or a group of points (point pattern)
 
const std::optional< Reach > & reach () const
 

Private Attributes

Tensor< double > cell_width_
 reach_->cell_width as a Tensor, for Key::real_distsq_bc
 
std::array< ExtraDomainPolicy, NDIM > domain_policies_
 
array_of_bools< NDIM > is_lattice_summed_
 
std::optional< Reach > reach_
 

Detailed Description

template<size_t NDIM>
class madness::BoxSurfaceDisplacementValidator< NDIM >

Filters the surface displacements produced by BoxSurfaceDisplacementRange: drops the destinations outside of the domain, maps the destinations along lattice-summed axes into the simulation cell, and drops the displacements already processed as standard (short-range) displacements, as described by StandardDisplacementsReach.

Member Typedef Documentation

◆ Displacement

template<size_t NDIM>
using madness::BoxSurfaceDisplacementValidator< NDIM >::Displacement = Key<NDIM>

◆ Periodicity

template<size_t NDIM>
using madness::BoxSurfaceDisplacementValidator< NDIM >::Periodicity = array_of_bools<NDIM>

◆ Point

template<size_t NDIM>
using madness::BoxSurfaceDisplacementValidator< NDIM >::Point = Key<NDIM>

◆ PointPattern

template<size_t NDIM>
using madness::BoxSurfaceDisplacementValidator< NDIM >::PointPattern = Vector<std::optional<Translation>, NDIM>

◆ Reach

Constructor & Destructor Documentation

◆ BoxSurfaceDisplacementValidator()

template<size_t NDIM>
madness::BoxSurfaceDisplacementValidator< NDIM >::BoxSurfaceDisplacementValidator ( const array_of_bools< NDIM > &  is_infinite_domain,
const array_of_bools< NDIM > &  is_lattice_summed,
std::optional< Reach >  reach = {} 
)
inline
Parameters
is_infinite_domainwhether the domain along each axis is finite (simulation cell) or infinite (the entire axis); if true for a given axis then any destination coordinate is valid, else only values in [0,2^n) are valid
is_lattice_summedif true for a given axis, displacement to x and x+2^n are equivalent, hence will be canonicalized to end up in the simulation cell. Periodic axes imply infinite domain, whatever was passed to is_infinite_domain.
reachthe real-space extent of the standard displacements that have been processed; surface displacements within it are filtered out as duplicates. Omit if no standard displacements have been processed (nothing is filtered on that account).

Member Function Documentation

◆ is_lattice_summed()

template<size_t NDIM>
const array_of_bools< NDIM > & madness::BoxSurfaceDisplacementValidator< NDIM >::is_lattice_summed ( ) const
inline
Returns
which axes are lattice summed

References madness::BoxSurfaceDisplacementValidator< NDIM >::is_lattice_summed_.

◆ operator()()

template<size_t NDIM>
bool madness::BoxSurfaceDisplacementValidator< NDIM >::operator() ( const Level  level,
const PointPattern &  dest,
std::optional< Displacement > &  displacement 
) const
inline

Apply filter to a displacement ending up at a point or a group of points (point pattern)

Parameters
levelthe tree level
destthe target point (when all elements are nonnull) or point pattern (when only some are). The latter is useful to skip the entire surface layer. The point coordinates are only used to determine whether we end up in or out of the domain.
displacementthe optional displacement; if given then will check if it's among the standard displacement and whether it was used as part of the standard displacement set; if it has not been used and the operator is lattice summed, the displacement will be adjusted to end up in the simulation cell. Primary use case for omitting displacement is if dest is not equivalent to a point.
Returns
true if the displacement is to be used

References std::abs(), madness::array_of_bools< N >::any(), madness::Displacements< NDIM >::bmax_default(), madness::BoxSurfaceDisplacementValidator< NDIM >::cell_width_, d, madness::Discard, madness::displacement(), madness::BoxSurfaceDisplacementValidator< NDIM >::domain_policies_, madness::BoxSurfaceDisplacementValidator< NDIM >::is_lattice_summed_, MADNESS_ASSERT, mask, NDIM, madness::BoxSurfaceDisplacementValidator< NDIM >::reach_, and madness::Translate.

◆ reach()

template<size_t NDIM>
const std::optional< Reach > & madness::BoxSurfaceDisplacementValidator< NDIM >::reach ( ) const
inline
Returns
the real-space extent of the standard displacements this filters out as duplicates; null if none

References madness::BoxSurfaceDisplacementValidator< NDIM >::reach_.

Member Data Documentation

◆ cell_width_

template<size_t NDIM>
Tensor<double> madness::BoxSurfaceDisplacementValidator< NDIM >::cell_width_
private

◆ domain_policies_

template<size_t NDIM>
std::array<ExtraDomainPolicy, NDIM> madness::BoxSurfaceDisplacementValidator< NDIM >::domain_policies_
private

◆ is_lattice_summed_

template<size_t NDIM>
array_of_bools<NDIM> madness::BoxSurfaceDisplacementValidator< NDIM >::is_lattice_summed_
private

◆ reach_

template<size_t NDIM>
std::optional<Reach> madness::BoxSurfaceDisplacementValidator< NDIM >::reach_
private

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