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

#include <displacements.h>

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

Classes

class  Iterator
 Iterator class for lazy generation of surface points. More...
 

Public Types

using Displacement = Key< NDIM >
 
using Point = Key< NDIM >
 
using PointPattern = Vector< std::optional< Translation >, NDIM >
 
using Validator = std::function< bool(Level, const PointPattern &, std::optional< Displacement > &)>
 

Public Member Functions

 BoxSurfaceDisplacementRange (const Key< NDIM > &center, const std::array< std::optional< std::int64_t >, NDIM > &box_radius, const std::array< std::optional< std::int64_t >, NDIM > &surface_thickness, const array_of_bools< NDIM > &is_lattice_summed, Validator validator={})
 Constructs a box with different radii and thicknesses for each dimension.
 
auto begin () const
 Returns an iterator to the beginning of the surface points.
 
const std::array< std::optional< int64_t >, NDIM > & box_radius () const
 
const Key< NDIM > & center () const
 
auto end () const
 Returns an iterator to the end of the surface points.
 
const array_of_bools< NDIM > & is_lattice_summed () const
 
const Displacementprobing_displacement () const
 
const std::array< std::optional< int64_t >, NDIM > & surface_thickness () const
 

Private Types

using Box = std::array< std::pair< Translation, Translation >, NDIM >
 
using BoxRadius = std::array< std::optional< Translation >, NDIM >
 
using Hollowness = std::array< bool, NDIM >
 
using Periodicity = array_of_bools< NDIM >
 
using SurfaceThickness = std::array< std::optional< Translation >, NDIM >
 

Private Attributes

Box box_
 box bounds in each dimension.
 
BoxRadius box_radius_
 halved size of the box in each dimension, in half-SimulationCells.
 
Point center_
 Center point of the box.
 
Hollowness hollowness_
 does box contain non-surface points along each dimension?
 
Periodicity is_lattice_summed_
 which dimensions are lattice summed?
 
Displacement probing_displacement_
 displacement to a nearby point on the surface; it may not be able to pass the filter, but is sufficiently representative of the surface displacements to allow screening with isotropic kernels
 
SurfaceThickness surface_thickness_
 surface thickness in each dimension, measured in boxes. Real-space surface size is thus n-dependent.
 
Validator validator_
 optional validator function
 

Friends

class Iterator
 

Detailed Description

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

Generates points at the finite-thickness surface of an N-dimensional box [C1-L1,C1+L1]x...x[CN-LN,CN+LN] centered at point {C1,...CN} in Z^N. For finite thickness T={T1,...,TN} point {x1,...,xN} is at the surface face perpendicular to axis i xi>=Ci-Li-Ti and xi<=Ci-Li+Ti OR xi>=Ci+Li-Ti and xi<=Ci+Li+Ti. For dimensions with unlimited size the point coordinates are limited to [0,2^n], with n being the level of the box. N.B. "points" are really boxes in the standard MADNESS sense, which we'll call "primitive boxes" to disambiguate from box as the product of intervals mentioned above,

Member Typedef Documentation

◆ Box

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Box = std::array<std::pair<Translation, Translation>, NDIM>
private

◆ BoxRadius

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::BoxRadius = std::array<std::optional<Translation>, NDIM>
private

◆ Displacement

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Displacement = Key<NDIM>

◆ Hollowness

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Hollowness = std::array<bool, NDIM>
private

◆ Periodicity

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Periodicity = array_of_bools<NDIM>
private

◆ Point

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Point = Key<NDIM>

◆ PointPattern

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

◆ SurfaceThickness

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::SurfaceThickness = std::array<std::optional<Translation>, NDIM>
private

◆ Validator

template<std::size_t NDIM>
using madness::BoxSurfaceDisplacementRange< NDIM >::Validator = std::function<bool(Level, const PointPattern&, std::optional<Displacement>&)>

this callable returns whether a given primitive box (or hyperface if only one coordinate is provided) can be filtered out. if screening a primitive box, the corresponding displacement should be provided both for further screening and for the displacement to be updated, if displacements are translated to connect two cells in the box. the validator should normally be a BoxSurfaceDisplacementFilter object. anything else is probably a hack.

Constructor & Destructor Documentation

◆ BoxSurfaceDisplacementRange()

template<std::size_t NDIM>
madness::BoxSurfaceDisplacementRange< NDIM >::BoxSurfaceDisplacementRange ( const Key< NDIM > &  center,
const std::array< std::optional< std::int64_t >, NDIM > &  box_radius,
const std::array< std::optional< std::int64_t >, NDIM > &  surface_thickness,
const array_of_bools< NDIM > &  is_lattice_summed,
Validator  validator = {} 
)
inlineexplicit

Constructs a box with different radii and thicknesses for each dimension.

Parameters
centerCenter primitive box of the box. All displacements will share the n of this arg.
box_radiusBox radius in each dimension, in half-SimulationCells. Omit for dim i to signal that the bound for dim i is simply the simulation cell.
surface_thicknessSurface thickness in each dimension, measured in number of addl. boxes on each half of the surface box proper. Omit for dim i if and only if omitted in box_radius
is_lattice_summedwhether each dimension is lattice summed; along lattice summed dimensions only one side of the box is iterated over.
validatorOptional filter function (if returns false, displacement is dropped; default: no filter); it may update the displacement to make it valid as needed (e.g. map displacement to the simulation cell)
Precondition
surface_radius[d]>0 && surface_thickness[d]<=surface_radius[d]

Member Function Documentation

◆ begin()

template<std::size_t NDIM>
auto madness::BoxSurfaceDisplacementRange< NDIM >::begin ( ) const
inline

Returns an iterator to the beginning of the surface points.

Returns
Iterator pointing to the first surface point

References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Begin.

Referenced by test_gconv().

◆ box_radius()

template<std::size_t NDIM>
const std::array< std::optional< int64_t >, NDIM > & madness::BoxSurfaceDisplacementRange< NDIM >::box_radius ( ) const
inline
Returns
the radius of the box in each dimension

References madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_.

◆ center()

template<std::size_t NDIM>
const Key< NDIM > & madness::BoxSurfaceDisplacementRange< NDIM >::center ( ) const
inline

◆ end()

template<std::size_t NDIM>
auto madness::BoxSurfaceDisplacementRange< NDIM >::end ( ) const
inline

Returns an iterator to the end of the surface points.

Returns
Iterator indicating the end of iteration

References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::End.

Referenced by test_gconv().

◆ is_lattice_summed()

template<std::size_t NDIM>
const array_of_bools< NDIM > & madness::BoxSurfaceDisplacementRange< NDIM >::is_lattice_summed ( ) const
inline
Returns
flags indicating whether each dimension is lattice summed

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

◆ probing_displacement()

template<std::size_t NDIM>
const Displacement & madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement ( ) const
inline
Returns
'probing" displacement to a nearby point on the surface; it may not necessarily be in the range of iteration (e.g., it may not be able to pass the filter) but is representative of the surface displacements for the purposes of screening

References madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement_.

◆ surface_thickness()

template<std::size_t NDIM>
const std::array< std::optional< int64_t >, NDIM > & madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness ( ) const
inline
Returns
the surface thickness in each dimension

References madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness_.

Friends And Related Symbol Documentation

◆ Iterator

template<std::size_t NDIM>
friend class Iterator
friend

Member Data Documentation

◆ box_

template<std::size_t NDIM>
Box madness::BoxSurfaceDisplacementRange< NDIM >::box_
private

◆ box_radius_

template<std::size_t NDIM>
BoxRadius madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_
private

◆ center_

template<std::size_t NDIM>
Point madness::BoxSurfaceDisplacementRange< NDIM >::center_
private

◆ hollowness_

template<std::size_t NDIM>
Hollowness madness::BoxSurfaceDisplacementRange< NDIM >::hollowness_
private

◆ is_lattice_summed_

template<std::size_t NDIM>
Periodicity madness::BoxSurfaceDisplacementRange< NDIM >::is_lattice_summed_
private

◆ probing_displacement_

template<std::size_t NDIM>
Displacement madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement_
private

displacement to a nearby point on the surface; it may not be able to pass the filter, but is sufficiently representative of the surface displacements to allow screening with isotropic kernels

Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement().

◆ surface_thickness_

template<std::size_t NDIM>
SurfaceThickness madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness_
private

◆ validator_

template<std::size_t NDIM>
Validator madness::BoxSurfaceDisplacementRange< NDIM >::validator_
private

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