utility for generating HCP crystal lattices
More...
#include <shammath/include/shammath/crystalLattice.hpp>
|
| using | Tscal = shambase::VecComponent< Tvec > |
| |
|
| static constexpr Tvec | generator (Tscal dr, std::array< i32, dim > coord) noexcept |
| | generate a HCP lattice centered on (0,0,0)
|
| |
| static constexpr bool | can_make_periodic_box (std::array< i32, dim > coord_min, std::array< i32, dim > coord_max) |
| | check if the given lattice coordinates bounds can make a periodic box
|
| |
| static constexpr CoordRange< Tvec > | get_periodic_box (Tscal dr, std::array< i32, dim > coord_min, std::array< i32, dim > coord_max) |
| | Get the periodic box corresponding to integer lattice coordinates this function will throw if the coordinates asked cannot make a periodic lattice.
|
| |
| static constexpr std::pair< std::array< i32, dim >, std::array< i32, dim > > | get_box_index_bounds (Tscal dr, Tvec box_min, Tvec box_max) |
| |
| static constexpr std::pair< std::array< i32, dim >, std::array< i32, dim > > | nearest_periodic_box_indices (std::array< i32, dim > coord_min, std::array< i32, dim > coord_max) |
| | get the nearest integer triplets bound that gives a periodic box
|
| |
template<class Tvec>
class shammath::LatticeHCP< Tvec >
utility for generating HCP crystal lattices
- Template Parameters
-
Definition at line 52 of file crystalLattice.hpp.
◆ Tscal
◆ can_make_periodic_box()
template<class Tvec >
| static constexpr bool shammath::LatticeHCP< Tvec >::can_make_periodic_box |
( |
std::array< i32, dim > |
coord_min, |
|
|
std::array< i32, dim > |
coord_max |
|
) |
| |
|
inlinestaticconstexpr |
check if the given lattice coordinates bounds can make a periodic box
- Parameters
-
| coord_min | integer triplet for the minimal coordinates on the lattice |
| coord_max | integer triplet for the maximal coordinates on the lattice |
- Returns
- true
-
false
Definition at line 90 of file crystalLattice.hpp.
◆ generator()
template<class Tvec >
|
|
inlinestaticconstexprnoexcept |
generate a HCP lattice centered on (0,0,0)
- Parameters
-
- Returns
- constexpr Tvec
Definition at line 68 of file crystalLattice.hpp.
◆ get_box_index_bounds()
template<class Tvec >
| static constexpr std::pair< std::array< i32, dim >, std::array< i32, dim > > shammath::LatticeHCP< Tvec >::get_box_index_bounds |
( |
Tscal |
dr, |
|
|
Tvec |
box_min, |
|
|
Tvec |
box_max |
|
) |
| |
|
inlinestaticconstexpr |
◆ get_periodic_box()
Get the periodic box corresponding to integer lattice coordinates this function will throw if the coordinates asked cannot make a periodic lattice.
- Parameters
-
| dr | the particle spacing in the lattice |
| coord_min | integer triplet for the minimal coordinates on the lattice |
| coord_max | integer triplet for the maximal coordinates on the lattice |
- Returns
- constexpr CoordRange<Tvec> the periodic box bounds
Definition at line 116 of file crystalLattice.hpp.
◆ nearest_periodic_box_indices()
template<class Tvec >
| static constexpr std::pair< std::array< i32, dim >, std::array< i32, dim > > shammath::LatticeHCP< Tvec >::nearest_periodic_box_indices |
( |
std::array< i32, dim > |
coord_min, |
|
|
std::array< i32, dim > |
coord_max |
|
) |
| |
|
inlinestaticconstexpr |
get the nearest integer triplets bound that gives a periodic box
- Parameters
-
| coord_min | integer triplet for the minimal coordinates on the lattice |
| coord_max | integer triplet for the maximal coordinates on the lattice |
- Returns
- constexpr std::pair<std::array<i32, dim>, std::array<i32, dim>> the new bounds
Definition at line 173 of file crystalLattice.hpp.
◆ dim
The documentation for this class was generated from the following file: