|
MADNESS 0.10.1
|
#include <displacements.h>

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 = BoxSurfaceDisplacementValidator< NDIM > |
Public Member Functions | |
| BoxSurfaceDisplacementRange (const Key< NDIM > ¢er, 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, std::optional< 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. | |
| bool | face_skipped (size_t face_dimension) const |
| const array_of_bools< NDIM > & | is_lattice_summed () const |
| const Displacement & | probing_displacement (size_t face_dimension) const |
| const std::array< std::optional< Displacement >, NDIM > & | probing_displacements () const |
| void | skip_face (size_t face_dimension) |
| 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 Member Functions | |
| Displacement | compute_probing_displacement (const size_t face_dimension) const |
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? | |
| Box | initial_bounds_ |
| bounds of the boxes to be iterated over, before any face is processed: the box plus its surface thickness, or, along a lattice-summed dimension, one period ending at the top layer (so that each equivalence class of boxes appears exactly once) | |
| Periodicity | is_lattice_summed_ |
| which dimensions are lattice summed? | |
| std::array< std::optional< Displacement >, NDIM > | probing_displacements_ |
| for each finite-radius dimension, a displacement to a nearby point on the faces normal to it (the pair of hyperplanes at -radius and +radius, which lattice summation folds onto each other); it may not be able to pass the filter, but among the displacements those faces contribute it errs toward the largest norm, so that a decaying kernel can be screened with it | |
| std::array< bool, NDIM > | skip_face_ {} |
| faces excluded from iteration (see skip_face()) | |
| SurfaceThickness | surface_thickness_ |
| surface thickness in each dimension, measured in boxes. Real-space surface size is thus n-dependent. | |
| std::optional< Validator > | validator_ |
| optional filter; also the source of the reach of the standard displacements, which the probing displacements are placed outside of | |
Friends | |
| class | Iterator |
|
private |
|
private |
| using madness::BoxSurfaceDisplacementRange< NDIM >::Displacement = Key<NDIM> |
|
private |
|
private |
| using madness::BoxSurfaceDisplacementRange< NDIM >::Point = Key<NDIM> |
| using madness::BoxSurfaceDisplacementRange< NDIM >::PointPattern = Vector<std::optional<Translation>, NDIM> |
|
private |
| using madness::BoxSurfaceDisplacementRange< NDIM >::Validator = BoxSurfaceDisplacementValidator<NDIM> |
|
inlineexplicit |
Constructs a box with different radii and thicknesses for each dimension.
| center | Center primitive box of the box. All displacements will share the n of this arg. |
| box_radius | Box 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_thickness | Surface 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_summed | whether each dimension is lattice summed; along lattice summed dimensions only one side of the box is iterated over. |
| validator | Optional filter (if returns false, displacement is dropped; default: no filter); it also maps displacements along lattice-summed axes into the simulation cell, and carries the real-space reach of the standard displacements it filters out as duplicates, outside of which the probing displacements are placed. Its lattice-summation flags must match is_lattice_summed. If omitted (or if it carries no reach) nothing is known to be filtered out: the surface then reaches all the way in to center, and the probes fall back to the on-site displacement, which screens nothing. |
surface_radius[d]>0 && surface_thickness[d]<=surface_radius[d]
|
inline |
Returns an iterator to the beginning of the surface points.
References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Begin.
Referenced by main().
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_.
|
inline |
|
inlineprivate |
References madness::Displacements< NDIM >::bmax_default(), madness::BoxSurfaceDisplacementRange< NDIM >::box_, madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_, madness::BoxSurfaceDisplacementRange< NDIM >::center_, d, madness::BoxSurfaceDisplacementRange< NDIM >::is_lattice_summed_, MADNESS_ASSERT, NDIM, offset, madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness_, and madness::BoxSurfaceDisplacementRange< NDIM >::validator_.
|
inline |
Returns an iterator to the end of the surface points.
References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::End.
Referenced by main().
|
inline |
face_dimension are excluded from iteration References madness::BoxSurfaceDisplacementRange< NDIM >::skip_face_.
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::is_lattice_summed_.
|
inline |
| face_dimension | a dimension with finite radius; its faces are the pair of hyperplanes normal to it at -radius and +radius (which lattice summation folds onto each other) |
face_dimension; it may not necessarily be in the range of iteration (e.g., it may not be able to pass the filter) but, among the displacements those faces contribute, it errs toward the largest norm, so that a decaying kernel can be screened with it. One probe serves both faces since the real-space distance of a displacement depends on its magnitude along each axis only. References MADNESS_ASSERT, NDIM, and madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacements_.
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacements_.
|
inline |
Excludes the faces normal to face_dimension (both, if not lattice summed) from iteration, e.g. because their probing displacement showed their contributions to be negligible. The edge boxes they share with faces that are not skipped are still visited through those faces, i.e. a box is visited iff it lies on at least one face that is not skipped.
| face_dimension | a dimension with finite radius |
References madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_, MADNESS_ASSERT, NDIM, and madness::BoxSurfaceDisplacementRange< NDIM >::skip_face_.
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness_.
|
friend |
|
private |
|
private |
halved size of the box in each dimension, in half-SimulationCells.
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::box_radius(), madness::BoxSurfaceDisplacementRange< NDIM >::compute_probing_displacement(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::select_face(), and madness::BoxSurfaceDisplacementRange< NDIM >::skip_face().
|
private |
|
private |
does box contain non-surface points along each dimension?
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::exclude_face(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::next_surface_layer().
|
private |
bounds of the boxes to be iterated over, before any face is processed: the box plus its surface thickness, or, along a lattice-summed dimension, one period ending at the top layer (so that each equivalence class of boxes appears exactly once)
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Iterator().
|
private |
which dimensions are lattice summed?
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::compute_probing_displacement(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::exclude_face(), madness::BoxSurfaceDisplacementRange< NDIM >::is_lattice_summed(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim().
|
private |
for each finite-radius dimension, a displacement to a nearby point on the faces normal to it (the pair of hyperplanes at -radius and +radius, which lattice summation folds onto each other); it may not be able to pass the filter, but among the displacements those faces contribute it errs toward the largest norm, so that a decaying kernel can be screened with it
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement(), and madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacements().
|
private |
faces excluded from iteration (see skip_face())
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::face_skipped(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::select_face(), and madness::BoxSurfaceDisplacementRange< NDIM >::skip_face().
|
private |
surface thickness in each dimension, measured in boxes. Real-space surface size is thus n-dependent.
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::compute_probing_displacement(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::exclude_face(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::next_surface_layer(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim(), and madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness().
|
private |
optional filter; also the source of the reach of the standard displacements, which the probing displacements are placed outside of
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance_till_valid(), madness::BoxSurfaceDisplacementRange< NDIM >::compute_probing_displacement(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim().