Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
mesh.h
Go to the documentation of this file.
1
12#ifndef MESH_H
13#define MESH_H
14
15#include <array>
16#include <map>
17#include <memory>
18#include <string>
19#include <vector>
20#include <unordered_map>
21
22#include <Kokkos_Core.hpp>
23#include <toml.hpp>
24
25#include "curved.h"
26#include "zone.h"
27
38
39static const std::unordered_map<std::string, MeshType> MESH_TYPES = {
40 {"file", MeshType::FROM_FILE},
41 {"cartesian", MeshType::CARTESIAN},
42 {"cartesian_tri", MeshType::CARTESIAN_TRI},
43 {"wedge", MeshType::WEDGE},
44 {"cartesian_tet", MeshType::CARTESIAN_TET},
45 {"cartesian_prism", MeshType::CARTESIAN_PRISM},
46 {"cartesian_pyramid", MeshType::CARTESIAN_PYRAMID},
47 {"cartesian_mixed", MeshType::CARTESIAN_MIXED}
48};
49
50static const std::unordered_map<MeshType, std::string> MESH_NAMES = {
51 {MeshType::FROM_FILE, "file"},
52 {MeshType::CARTESIAN, "cartesian"},
53 {MeshType::CARTESIAN_TRI, "cartesian_tri"},
54 {MeshType::WEDGE, "wedge"},
55 {MeshType::CARTESIAN_TET, "cartesian_tet"},
56 {MeshType::CARTESIAN_PRISM, "cartesian_prism"},
57 {MeshType::CARTESIAN_PYRAMID, "cartesian_pyramid"},
58 {MeshType::CARTESIAN_MIXED, "cartesian_mixed"}
59};
60
62using Stretching = std::array<rtype, 3>;
63
64enum class CellType {
66 QUAD,
68 PYRAMID,
69 PRISM,
71};
72
73static const std::unordered_map<std::string, CellType> CELL_TYPES = {
74 {"triangle", CellType::TRIANGLE},
75 {"quad", CellType::QUAD},
76 {"tetrahedron", CellType::TETRAHEDRON},
77 {"pyramid", CellType::PYRAMID},
78 {"prism", CellType::PRISM},
79 {"hexahedron", CellType::HEXAHEDRON}
80};
81
82static const std::unordered_map<CellType, std::string> CELL_NAMES = {
83 {CellType::TRIANGLE, "triangle"},
84 {CellType::QUAD, "quad"},
85 {CellType::TETRAHEDRON, "tetrahedron"},
86 {CellType::PYRAMID, "pyramid"},
87 {CellType::PRISM, "prism"},
88 {CellType::HEXAHEDRON, "hexahedron"}
89};
90
96const std::vector<std::vector<uint8_t>> & cell_local_faces(uint32_t n_nodes);
97
104void cell_tetrahedra(const std::vector<std::array<double, 3>> & nodes,
105 std::vector<std::array<std::array<double, 3>, 4>> & tets);
106
107
108struct MeshBlock;
109struct PeriodicNodes;
110
111class Mesh {
112 public:
116 Mesh();
117
121 ~Mesh();
122
128 std::string zone_a, zone_b;
129 std::array<rtype, N_DIM> translation;
130 };
131
136 void init(const toml::value & input);
137
143 static std::vector<PeriodicPair> periodic_pairs(const toml::value & input);
144
148 MeshType get_type() const;
149
153 void set_type(MeshType type);
154
159 uint32_t n_face_zones() const;
160
165 std::vector<FaceZone> * face_zones();
166
171 FaceZone * get_face_zone(const std::string& name);
172
179
186
193
201
209
217
223
232 std::vector<uint32_t> & neighbors) const;
233
238
243
247 void compute_face_areas();
248
253
258
264 void compute_geometry();
265
274 void make_axisymmetric();
275
279 void h_cell_tetrahedra(uint32_t i_cell, std::vector<std::array<std::array<double, 3>, 4>> & tets) const;
280
286
290 void copy_host_to_device();
291
295 void copy_device_to_host();
296
305 void init_cart(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly);
306
317
328 const std::vector<PeriodicPair> & periodic = {}, const Stretching & stretching = {});
329
335 std::vector<uint32_t> nodes;
336 std::string zone;
337 };
338
347 void init_from_connectivity(const std::vector<std::array<rtype, N_DIM>> & nodes,
348 const std::vector<std::vector<uint32_t>> & cells,
349 const std::vector<BoundaryFace> & boundary_faces,
350 const std::string & unlisted_zone = "unassigned",
351 const std::vector<PeriodicPair> & periodic = {});
352
358 void init_from_connectivity(const std::vector<std::array<rtype, N_DIM>> & nodes,
359 const std::vector<std::vector<uint32_t>> & cells,
360 const std::vector<BoundaryFace> & boundary_faces,
361 const std::string & unlisted_zone, const PeriodicNodes & classes);
362
366 void init_from_block(const MeshBlock & block, const std::vector<PeriodicPair> & periodic = {});
367
376
378 const std::vector<FaceZone> & h_face_zones() const { return m_face_zones; }
379
381 bool is_periodic() const { return !periodic_translations.empty(); }
382
389 return (h_cells_of_face(f, 1) == int32_t(c)) ? h_shifts(h_face_shift(f), i) : rtype(0);
390 }
391
397 void init_file(const std::string & filename, const std::vector<PeriodicPair> & periodic = {});
398
407 void init_wedge(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly);
408
417
419 // High-order boundary elements of the mesh file (global node ids), for curved::surfaces_of_mesh
420 std::vector<curved::SurfaceFace> high_order_faces;
421 // Curved geometry, or null for straight-sided meshes; it refers to this mesh
422 std::shared_ptr<const curved::Geometry> curved_geometry;
423 // Cells [0, n_owned()) are owned by this rank; the rest are halo cells
426 // Cells [0, n_reconstructed()) need face values: owned cells and halo layer 1
429 // Cells [0, n_complete()) have all their vertex neighbors: all but the outermost halo layer
432 // Distributed runs: global id of every local cell and node, and the global counts (0 otherwise)
433 std::vector<uint64_t> h_global_cell_id;
435 std::vector<uint64_t> h_global_node_id;
437 // Volume of each cell and area of each face in the flow's geometry: the
438 // revolved ones per radian in axisymmetric runs, else the same views as
439 // cell_volume and face_area
440 bool axisymmetric = false;
441 Kokkos::View<rtype *> cell_measure;
442 Kokkos::View<rtype *> face_measure;
443 Kokkos::View<rtype *>::host_mirror_type h_cell_measure;
444 Kokkos::View<rtype *>::host_mirror_type h_face_measure;
445 // Axisymmetric runs: r-weighted second central moments of each cell
446 // [xx, xy, yy] about its center (empty otherwise)
447 Kokkos::View<rtype *[3]> cell_covariance;
448 Kokkos::View<rtype *[3]>::host_mirror_type h_cell_covariance;
449 Kokkos::View<rtype *[N_DIM]> node_coords;
450 Kokkos::View<rtype *[N_DIM]> cell_coords;
451 Kokkos::View<rtype *> cell_volume;
452 Kokkos::View<rtype *> face_area;
453 Kokkos::View<rtype *[N_DIM]> face_normals;
454 Kokkos::View<rtype *[N_DIM]> face_coords;
455 Kokkos::View<uint32_t *> nodes_of_cell;
456 Kokkos::View<uint32_t *> offsets_nodes_of_cell;
457 Kokkos::View<uint32_t *> faces_of_cell;
458 Kokkos::View<uint32_t *> offsets_faces_of_cell;
459 Kokkos::View<uint32_t *> nodes_of_face;
460 Kokkos::View<uint32_t *> offsets_nodes_of_face;
461 Kokkos::View<int32_t *[2]> cells_of_face;
462 Kokkos::View<uint32_t *> cells_of_cell; // Vertex neighbors (CSR)
463 Kokkos::View<uint32_t *> offsets_cells_of_cell;
464 // Periodic translations: row 0 of shifts is zero. Cell 1 of face f, seen
465 // from cell 0, is at cell_coords(c1) + shifts(face_shift(f)); vertex
466 // neighbor k of a cell is at cell_coords(cells_of_cell(k)) + shifts(cells_of_cell_shift(k))
467 Kokkos::View<rtype *[N_DIM]> shifts;
468 Kokkos::View<uint8_t *> face_shift;
469 Kokkos::View<uint8_t *> cells_of_cell_shift;
470
471 Kokkos::View<rtype *[N_DIM]>::host_mirror_type h_node_coords;
472 Kokkos::View<rtype *[N_DIM]>::host_mirror_type h_cell_coords;
473 Kokkos::View<rtype *>::host_mirror_type h_cell_volume;
474 Kokkos::View<rtype *>::host_mirror_type h_face_area;
475 Kokkos::View<rtype *[N_DIM]>::host_mirror_type h_face_normals;
476 Kokkos::View<rtype *[N_DIM]>::host_mirror_type h_face_coords;
477 Kokkos::View<uint32_t *>::host_mirror_type h_nodes_of_cell;
478 Kokkos::View<uint32_t *>::host_mirror_type h_offsets_nodes_of_cell;
479 Kokkos::View<uint32_t *>::host_mirror_type h_faces_of_cell;
480 Kokkos::View<uint32_t *>::host_mirror_type h_offsets_faces_of_cell;
481 Kokkos::View<uint32_t *>::host_mirror_type h_nodes_of_face;
482 Kokkos::View<uint32_t *>::host_mirror_type h_offsets_nodes_of_face;
483 Kokkos::View<int32_t *[2]>::host_mirror_type h_cells_of_face;
484 Kokkos::View<uint32_t *>::host_mirror_type h_cells_of_cell;
485 Kokkos::View<uint32_t *>::host_mirror_type h_offsets_cells_of_cell;
486 Kokkos::View<rtype *[N_DIM]>::host_mirror_type h_shifts;
487 Kokkos::View<uint8_t *>::host_mirror_type h_face_shift;
488 Kokkos::View<uint8_t *>::host_mirror_type h_cells_of_cell_shift;
489
490 // Periodicity (host): the translation of each periodic pair, the zones
491 // the pairs joined, and per node its key (the lowest node id of its
492 // periodic class) and lattice offset, x_n = x_key + sum_j L_j T_j
493 // (empty for meshes without periodic pairs)
494 std::vector<std::array<rtype, N_DIM>> periodic_translations;
495 std::vector<std::string> periodic_zones;
496 std::vector<uint32_t> h_node_key;
497 std::vector<std::array<int8_t, 3>> h_node_lattice;
498 // Lattice offset of every row of shifts
499 std::vector<std::array<int8_t, 3>> shift_lattice;
500
502 uint8_t shift_index(const std::array<int8_t, 3> & lattice);
503 protected:
504 private:
505 void init_box(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly, bool triangles, bool wedge);
506 // Local cells in increasing global id: the first cell to visit a face becomes its cell 0
507 std::vector<uint32_t> cells_by_global_id() const;
512 static void orient_cells_3d(const std::vector<std::array<rtype, N_DIM>> & nodes,
513 const std::vector<std::vector<uint32_t>> & cells,
514 std::vector<uint32_t> & offsets, std::vector<uint32_t> & cell_nodes);
515
516 void allocate_and_fill(const std::vector<std::array<rtype, N_DIM>> & nodes,
517 const std::vector<uint32_t> & cell_node_offsets,
518 const std::vector<uint32_t> & cell_nodes,
519 const std::vector<uint32_t> & cell_face_offsets,
520 const std::vector<uint32_t> & cell_faces,
521 const std::vector<uint32_t> & face_node_offsets,
522 const std::vector<uint32_t> & face_nodes,
523 const std::vector<std::array<int32_t, 2>> & face_cells,
524 const std::vector<uint8_t> & face_shifts,
525 const std::vector<uint32_t> & interior,
526 const std::map<std::string, std::vector<uint32_t>> & zone_faces);
527
528 void h_neighbors_of_cell_helper(uint32_t i_cell,
530 std::vector<uint32_t> & neighbors) const;
531
533 std::vector<CellZone> m_cell_zones;
534 std::vector<FaceZone> m_face_zones;
535};
536
537#endif // MESH_H
Definition zone.h:57
Definition mesh.h:111
void h_neighbors_of_cell(uint32_t i_cell, uint8_t n_order, std::vector< uint32_t > &neighbors) const
Get neighbors of a cell up to n_order graph distance.
Definition mesh.cpp:226
Kokkos::View< uint8_t * > cells_of_cell_shift
Definition mesh.h:469
uint32_t h_n_nodes_of_cell(uint32_t i_cell) const
Get the number of nodes comprising a cell - host version.
Definition mesh.cpp:171
rtype h_face_offset(uint32_t f, uint32_t c, int i) const
Component i of the translation from face f's frame (that of its cell 0) to cell c's frame: the face s...
Definition mesh.h:388
uint32_t n_reconstructed() const
Definition mesh.h:428
Kokkos::View< rtype * >::host_mirror_type h_cell_measure
Definition mesh.h:443
std::vector< curved::SurfaceFace > high_order_faces
Definition mesh.h:420
Kokkos::View< uint32_t * > offsets_nodes_of_cell
Definition mesh.h:456
uint32_t n_complete_cells
Definition mesh.h:430
Kokkos::View< uint32_t * >::host_mirror_type h_cells_of_cell
Definition mesh.h:484
std::vector< std::array< int8_t, 3 > > h_node_lattice
Definition mesh.h:497
std::vector< FaceZone > * face_zones()
Get the face zones.
Definition mesh.cpp:139
void compute_cell_volumes()
Compute cell volumes.
Definition mesh.cpp:333
Kokkos::View< uint32_t * > offsets_cells_of_cell
Definition mesh.h:463
Mesh()
Construct a new Mesh object.
Definition mesh.cpp:28
std::vector< std::array< int8_t, 3 > > shift_lattice
Definition mesh.h:499
void init_from_connectivity(const std::vector< std::array< rtype, N_DIM > > &nodes, const std::vector< std::vector< uint32_t > > &cells, const std::vector< BoundaryFace > &boundary_faces, const std::string &unlisted_zone="unassigned", const std::vector< PeriodicPair > &periodic={})
Build the mesh from nodes, cells (any orientation) and named boundary faces. Boundary faces without a...
Definition mesh_io.cpp:42
Kokkos::View< int32_t *[2]>::host_mirror_type h_cells_of_face
Definition mesh.h:483
uint32_t n_nodes
Definition mesh.h:418
Kokkos::View< uint8_t * >::host_mirror_type h_face_shift
Definition mesh.h:487
Kokkos::View< rtype *[N_DIM]> cell_coords
Definition mesh.h:450
Kokkos::View< uint32_t * >::host_mirror_type h_offsets_nodes_of_cell
Definition mesh.h:478
Kokkos::View< rtype * > face_area
Definition mesh.h:452
uint8_t shift_index(const std::array< int8_t, 3 > &lattice)
Row of shifts for a lattice offset, added if new.
Definition mesh.cpp:432
void compute_face_normals()
Compute face normals.
Definition mesh.cpp:381
void h_cell_tetrahedra(uint32_t i_cell, std::vector< std::array< std::array< double, 3 >, 4 > > &tets) const
Tetrahedra of a 3D cell (see cell_tetrahedra).
Definition mesh_3d.cpp:95
Kokkos::View< uint8_t * > face_shift
Definition mesh.h:468
std::vector< std::string > periodic_zones
Definition mesh.h:495
uint32_t h_n_faces_of_cell(uint32_t i_cell) const
Get the number of faces comprising a cell - host version.
Definition mesh.cpp:175
uint32_t h_node_of_face(uint32_t i_face, uint32_t i_node_local) const
Get the id of the i-th node of a face - host version.
Definition mesh.cpp:191
MeshType get_type() const
Get the type of mesh.
Definition mesh.cpp:127
void init_cart(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly)
Initialize the mesh as a cartesian grid.
Definition mesh.cpp:634
bool axisymmetric
Definition mesh.h:440
Kokkos::View< uint32_t * > nodes_of_face
Definition mesh.h:459
void init_wedge(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly)
Initialize the supersonic wedge mesh.
Definition mesh.cpp:642
Kokkos::View< rtype * > face_measure
Definition mesh.h:442
uint32_t n_faces
Definition mesh.h:418
Kokkos::View< uint8_t * >::host_mirror_type h_cells_of_cell_shift
Definition mesh.h:488
uint32_t n_complete() const
Definition mesh.h:431
void compute_face_areas()
Compute face areas.
Definition mesh.cpp:370
Kokkos::View< rtype *[N_DIM]> face_normals
Definition mesh.h:453
Kokkos::View< uint32_t * >::host_mirror_type h_offsets_cells_of_cell
Definition mesh.h:485
~Mesh()
Destroy the Mesh object.
Definition mesh.cpp:32
Kokkos::View< uint32_t * > offsets_nodes_of_face
Definition mesh.h:460
Kokkos::View< uint32_t * > cells_of_cell
Definition mesh.h:462
void init(const toml::value &input)
Initialize the mesh.
Definition mesh.cpp:36
Kokkos::View< rtype *[N_DIM]>::host_mirror_type h_face_normals
Definition mesh.h:475
Kokkos::View< rtype *[N_DIM]>::host_mirror_type h_shifts
Definition mesh.h:486
Kokkos::View< uint32_t * > offsets_faces_of_cell
Definition mesh.h:458
uint32_t n_cells
Definition mesh.h:418
Kokkos::View< rtype *[N_DIM]>::host_mirror_type h_face_coords
Definition mesh.h:476
uint32_t h_n_nodes_of_face(uint32_t i_face) const
Get the number of nodes comprising a face - host version.
Definition mesh.cpp:179
void init_cart_3d(uint32_t nx, uint32_t ny, uint32_t nz, rtype Lx, rtype Ly, rtype Lz, MeshType kind, const std::vector< PeriodicPair > &periodic={}, const Stretching &stretching={})
Initialize a 3D box [0, Lx] x [0, Ly] x [0, Lz] of nx x ny x nz blocks, each a hexahedron or split in...
Definition mesh_3d.cpp:190
Kokkos::View< uint32_t * > faces_of_cell
Definition mesh.h:457
void compute_cell_centroids()
Compute cell centroids.
Definition mesh.cpp:235
Kokkos::View< rtype *[3]> cell_covariance
Definition mesh.h:447
void compute_cell_neighbors()
Build the vertex-neighbor (cells sharing a node) adjacency on the device.
Definition mesh.cpp:441
Kokkos::View< rtype * >::host_mirror_type h_face_area
Definition mesh.h:474
static std::vector< PeriodicPair > periodic_pairs(const toml::value &input)
Periodic pairs from [[periodic]] entries, and for generated meshes from [mesh] periodic: left/right f...
Definition mesh.cpp:87
std::vector< uint32_t > h_node_key
Definition mesh.h:496
void set_type(MeshType type)
Set the type of mesh.
Definition mesh.cpp:131
void compute_geometry()
Compute all derived geometry (face areas and normals, cell volumes and centroids, face centroids) and...
Definition mesh_3d.cpp:104
Kokkos::View< rtype * > cell_measure
Definition mesh.h:441
void make_axisymmetric()
Turn the planar 2D geometry into that of the solid of revolution about the x axis (y = r >= 0),...
Definition mesh.cpp:261
Kokkos::View< int32_t *[2]> cells_of_face
Definition mesh.h:461
uint32_t n_reconstructed_cells
Definition mesh.h:427
std::vector< std::array< rtype, N_DIM > > periodic_translations
Definition mesh.h:494
uint32_t h_face_of_cell(uint32_t i_cell, uint32_t i_face_local) const
Get the id of the i-th face of a cell - host version.
Definition mesh.cpp:187
void copy_device_to_host()
Copy mesh data from device to host.
Definition mesh.cpp:566
uint32_t n_owned() const
Definition mesh.h:425
Kokkos::View< rtype * > cell_volume
Definition mesh.h:451
void compute_face_centroids()
Compute the face centroids.
Definition mesh.cpp:415
Kokkos::View< rtype *[N_DIM]>::host_mirror_type h_node_coords
Definition mesh.h:471
std::vector< uint64_t > h_global_node_id
Definition mesh.h:435
uint32_t n_owned_cells
Definition mesh.h:424
Kokkos::View< rtype *[3]>::host_mirror_type h_cell_covariance
Definition mesh.h:448
Kokkos::View< rtype * >::host_mirror_type h_face_measure
Definition mesh.h:444
std::shared_ptr< const curved::Geometry > curved_geometry
Definition mesh.h:422
CellType h_cell_type(uint32_t i_cell) const
Get the type of a cell.
Definition mesh.cpp:152
uint64_t n_global_nodes
Definition mesh.h:436
void init_from_block(const MeshBlock &block, const std::vector< PeriodicPair > &periodic={})
Build the mesh from a block holding the whole mesh.
Definition mesh_io.cpp:589
Kokkos::View< rtype *[N_DIM]> node_coords
Definition mesh.h:449
uint64_t h_global_cell(uint32_t i_cell) const
Global id of local cell i_cell (i_cell itself unless distributed). Connectivity is ordered by global ...
Definition mesh.h:414
uint32_t h_node_of_cell(uint32_t i_cell, uint32_t i_node_local) const
Get the id of the i-th node of a cell - host version.
Definition mesh.cpp:183
uint64_t n_global_cells
Definition mesh.h:434
std::vector< uint64_t > h_global_cell_id
Definition mesh.h:433
uint32_t n_face_zones() const
Get the number of face zones.
Definition mesh.cpp:135
FaceZone * get_face_zone(const std::string &name)
Get face zone by name.
Definition mesh.cpp:143
bool is_periodic() const
Whether some zones were joined periodically.
Definition mesh.h:381
const std::vector< FaceZone > & h_face_zones() const
The face zones (host).
Definition mesh.h:378
Kokkos::View< rtype *[N_DIM]> shifts
Definition mesh.h:467
void copy_host_to_device()
Copy mesh data from host to device.
Definition mesh.cpp:537
Kokkos::View< rtype *[N_DIM]>::host_mirror_type h_cell_coords
Definition mesh.h:472
Kokkos::View< uint32_t * >::host_mirror_type h_nodes_of_face
Definition mesh.h:481
Kokkos::View< uint32_t * >::host_mirror_type h_offsets_nodes_of_face
Definition mesh.h:482
void apply_curved(const curved::Surfaces &surfaces)
Curve the faces on the given surfaces (see curved::Geometry): 3D area vectors of the curved faces,...
Definition curved.cpp:790
Kokkos::View< rtype * >::host_mirror_type h_cell_volume
Definition mesh.h:473
Kokkos::View< uint32_t * > nodes_of_cell
Definition mesh.h:455
void init_file(const std::string &filename, const std::vector< PeriodicPair > &periodic={})
Read a Mallard HDF5 mesh file (.h5, .hdf5), or an ASCII Gmsh mesh (format 2.2 or 4....
Definition mesh_io.cpp:579
void init_cart_tri(uint32_t nx, uint32_t ny, rtype Lx, rtype Ly)
Initialize the mesh as a cartesian grid, with each cell split into two triangles.
Definition mesh.cpp:638
Kokkos::View< uint32_t * >::host_mirror_type h_nodes_of_cell
Definition mesh.h:477
Kokkos::View< rtype *[N_DIM]> face_coords
Definition mesh.h:454
Kokkos::View< uint32_t * >::host_mirror_type h_offsets_faces_of_cell
Definition mesh.h:480
Kokkos::View< uint32_t * >::host_mirror_type h_faces_of_cell
Definition mesh.h:479
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
Curved (high-order) boundary geometry: face maps, face quadrature and cell integration rules (docs/de...
MeshType
Definition mesh.h:28
@ CARTESIAN_PRISM
@ CARTESIAN_PYRAMID
@ CARTESIAN_MIXED
CellType
Definition mesh.h:64
std::array< rtype, 3 > Stretching
Tanh stretching factor of each direction of a generated mesh, 0 for uniform spacing.
Definition mesh.h:62
const std::vector< std::vector< uint8_t > > & cell_local_faces(uint32_t n_nodes)
Local faces of a positively oriented 3D cell with n_nodes nodes (4 tetrahedron, 5 pyramid,...
Definition mesh_3d.cpp:64
void cell_tetrahedra(const std::vector< std::array< double, 3 > > &nodes, std::vector< std::array< std::array< double, 3 >, 4 > > &tets)
Decompose a 3D cell (node coordinates in Gmsh/VTK order, positively oriented) into tetrahedra: each f...
Definition mesh_3d.cpp:79
Contiguous ranges of a mesh's cells and nodes and a set of its boundary faces. Global ids are positio...
Definition mesh_block.h:35
A boundary face (2 nodes in 2D; 3 or 4 nodes in 3D) and its zone name.
Definition mesh.h:334
std::vector< uint32_t > nodes
Definition mesh.h:335
std::string zone
Definition mesh.h:336
A periodic pair of boundary zones: zone_b is zone_a translated by translation.
Definition mesh.h:127
std::array< rtype, N_DIM > translation
Definition mesh.h:129
std::string zone_b
Definition mesh.h:128
std::string zone_a
Definition mesh.h:128
Periodic classes of the mesh nodes: the translation of each lattice direction, and per node its key (...
Definition periodic.h:28
The curved boundary of a mesh, identical on every rank: the analytic shapes and every curved boundary...
Definition curved.h:65
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
Kokkos::View< uint32_t *, Space > cells
Definition teno_setup.cpp:682
Zone class declarations.