|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Axis-aligned periodic metric parameterised by a compile-time axis bitmask. More...
#include <periodicity.hpp>
Public Types | |
Type aliases | |
| using | value_type = Scalar |
| using | OurVector3 = Vector3<Scalar> |
| using | OurMatrix3 = Matrix3<Scalar> |
| using | OurPoint = Point<Scalar> |
Public Member Functions | |
Constructors | |
| constexpr | OrthorhombicMetric ()=default |
| constexpr | OrthorhombicMetric (const OurVector3 &cell_widths) |
| Construct from cell widths. | |
| void | set_cell_widths (const OurVector3 &cell_widths) |
Metric operations | |
| template<ValidPointType PointT> | |
| constexpr OurPoint | to_fractional (const PointT &p) const |
| template<ValidPointType PointT> | |
| constexpr OurPoint | from_fractional (const PointT &frac) const |
| template<ValidVector3Type Vector3T> | |
| constexpr OurVector3 | frac_minimum_image (const Vector3T &fv) const |
| Minimum-image displacement in fractional coordinates. | |
| template<ValidVector3Type Vector3T> | |
| constexpr OurVector3 | frac_wrap_to_unit_cell (const Vector3T &fv) const |
| template<ValidPointType PointT1, ValidPointType PointT2> | |
| constexpr OurVector3 | sep (const PointT1 &p1, const PointT2 &p2) const |
| Minimum-image displacement vector from p1 to p2. | |
| template<ValidPointType PointT> | |
| constexpr OurPoint | wrap (const PointT &p) const |
| constexpr OurMatrix3 | direct_lattice_vectors () const |
| Lattice vectors as columns of a diagonal matrix. Non-periodic entries appear as 1 by convention. | |
| template<ValidPointType PointT, typename Integer> | |
| constexpr OurPoint | shift_image (const PointT &p, const Vector3< Integer > &n) const |
Periodicity queries | |
| constexpr bool | is_periodic (unsigned dim) const |
| constexpr unsigned | num_periodic_dimensions () const |
| template<unsigned dim> | |
| static constexpr bool | is_periodic () |
| PeriodicAxes | Bitmask of periodic axes. Combine AXIS_X (0b001), AXIS_Y (0b010), AXIS_Z (0b100) with | for multi-axis periodicity. |
| Scalar | Floating-point scalar type. |
Cell widths for non-periodic axes are set to 1 internally and never participate in wrapping or distance calculations. All branching on PeriodicAxes is resolved at compile time via if constexpr, so unused axes impose zero runtime cost.
| using mundy::OrthorhombicMetric< PeriodicAxes, Scalar >::value_type = Scalar |
| using mundy::OrthorhombicMetric< PeriodicAxes, Scalar >::OurVector3 = Vector3<Scalar> |
| using mundy::OrthorhombicMetric< PeriodicAxes, Scalar >::OurMatrix3 = Matrix3<Scalar> |
| using mundy::OrthorhombicMetric< PeriodicAxes, Scalar >::OurPoint = Point<Scalar> |
|
constexprdefault |
|
inlineexplicitconstexpr |
cell_widths entries for non-periodic axes are ignored (those axes are treated as having width 1). Only the widths of periodic axes must be positive.
|
inline |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Maps each periodic component to [-0.5, 0.5) by subtracting round(). Non-periodic components are passed through unchanged.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |