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 | Filter = std::function< bool(Level, const PointPattern &, std::optional< Displacement > &)> |
this callable filters out points and/or displacements; note that the displacement is optional (this use case supports filtering based on point pattern onlu) and non-const to make it possible for the filter function to update the displacement (e.g. to map it back to the simulation cell) | |
using | Point = Key< NDIM > |
using | PointPattern = Vector< std::optional< Translation >, 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_periodic, Filter filter={}) | |
Constructs a box with different sizes 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_periodic () const |
const Displacement & | probing_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 | |
Point | center_ |
Center point of the box. | |
Filter | filter_ |
optional filter function | |
Hollowness | hollowness_ |
does box contain non-surface points along each dimension? | |
Periodicity | is_periodic_ |
which dimensions are periodic? | |
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 | |
Friends | |
class | Iterator |
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.
|
private |
|
private |
using madness::BoxSurfaceDisplacementRange< NDIM >::Displacement = Key<NDIM> |
using madness::BoxSurfaceDisplacementRange< NDIM >::Filter = std::function<bool(Level, const PointPattern&, std::optional<Displacement>&)> |
this callable filters out points and/or displacements; note that the displacement is optional (this use case supports filtering based on point pattern onlu) and non-const to make it possible for the filter function to update the displacement (e.g. to map it back to the simulation cell)
|
private |
|
private |
using madness::BoxSurfaceDisplacementRange< NDIM >::Point = Key<NDIM> |
using madness::BoxSurfaceDisplacementRange< NDIM >::PointPattern = Vector<std::optional<Translation>, NDIM> |
|
private |
|
inlineexplicit |
Constructs a box with different sizes for each dimension.
center | Center of the box |
box_radius | Box radius in each dimension |
surface_thickness | Surface thickness in each dimension |
is_periodic | whether each dimension is periodic; along periodic range-restricted dimensions only one side of the box is iterated over. |
filter | Optional 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) |
box_radius[d]>0 && surface_thickness[d]<=box_radius[d]
|
inline |
Returns an iterator to the beginning of the surface points.
References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Begin.
Referenced by test_gconv().
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::box_radius_.
|
inline |
|
inline |
Returns an iterator to the end of the surface points.
References madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::End.
Referenced by test_gconv().
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::is_periodic_.
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::probing_displacement_.
|
inline |
References madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness_.
|
friend |
|
private |
box bounds in each dimension
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Iterator(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::next_surface_layer(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim().
|
private |
halved size of the box in each dimension
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Iterator(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance(), and madness::BoxSurfaceDisplacementRange< NDIM >::box_radius().
|
private |
|
private |
|
private |
does box contain non-surface points along each dimension?
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::next_surface_layer(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim().
|
private |
which dimensions are periodic?
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::is_periodic(), and madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim().
|
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().
|
private |
surface thickness in each dimension
Referenced by madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::Iterator(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::advance(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::next_surface_layer(), madness::BoxSurfaceDisplacementRange< NDIM >::Iterator::reset_along_dim(), and madness::BoxSurfaceDisplacementRange< NDIM >::surface_thickness().