31 std::vector<uint32_t>
key;
32 std::vector<std::array<int8_t, 3>>
lattice;
52 using Point = std::array<rtype, N_DIM>;
53 using Cell = std::array<int64_t, N_DIM>;
67 std::map<Cell, std::vector<std::pair<uint32_t, Point>>> grid;
82 const std::vector<Mesh::BoundaryFace> & boundary_faces,
83 const std::vector<Mesh::PeriodicPair> & pairs);
Points on a grid of spacing h. A point within the tolerance of a query lies in one of the 3^N_DIM gri...
Definition periodic.h:50
void insert(uint32_t id, const Point &x)
Definition periodic.h:61
static Cell neighbor(const Cell &c, int m)
Neighbor m of cell c, m in [0, N_NEIGHBORS) (c itself included).
Definition periodic.cpp:107
static constexpr int N_NEIGHBORS
Definition periodic.h:54
PeriodicGrid(rtype spacing)
Definition periodic.h:56
std::array< int64_t, N_DIM > Cell
Definition periodic.h:53
uint32_t find(const Point &y, uint32_t &match) const
Number of points within the tolerance of y; match is the last one's id.
Definition periodic.cpp:116
std::array< rtype, N_DIM > Point
Definition periodic.h:52
Cell cell_of(const Point &x) const
Definition periodic.cpp:101
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
float rtype
Definition common_typedef.h:39
#define N_DIM
Definition common_typedef.h:28
std::string periodic_point_string(const std::array< rtype, N_DIM > &x)
"(x, y[, z])", for error messages.
Definition periodic.cpp:134
std::vector< size_t > periodic_directions(const std::vector< Mesh::PeriodicPair > &pairs, PeriodicNodes &result)
Check the pairs (zones used once, nonzero translations, at most three distinct ones) and fill result....
Definition periodic.cpp:69
PeriodicNodes match_periodic_nodes(const std::vector< std::array< rtype, N_DIM > > &nodes, const std::vector< Mesh::BoundaryFace > &boundary_faces, const std::vector< Mesh::PeriodicPair > &pairs)
Match the nodes of zone_b of every pair to the nodes of zone_a translated by the pair's translation (...
Definition periodic.cpp:140
rtype periodic_tolerance(rtype h)
Matching tolerance of a pair whose zones' shortest edge is h.
Definition periodic.cpp:99
Periodic classes of the mesh nodes: the translation of each lattice direction, and per node its key (...
Definition periodic.h:28
std::vector< std::array< int8_t, 3 > > lattice
Definition periodic.h:32
std::vector< std::array< rtype, N_DIM > > translations
Definition periodic.h:30
std::vector< std::string > zones
Definition periodic.h:29
std::vector< uint32_t > key
Definition periodic.h:31
std::array< double, N_DIM > Point
Point in space.
Definition synthetic_inflow.h:34
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810