|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Parameterized doctest-based unit tests for UnstructuredMesh index conversion and adjacency Global2Local / Local2Global methods. More...
Go to the source code of this file.
Classes | |
| struct | MeshConfig |
Macros | |
| #define | DOCTEST_CONFIG_IMPLEMENT |
| #define | FOR_EACH_MESH_CONFIG(body) |
Functions | |
| int | main (int argc, char **argv) |
| TEST_CASE ("Mesh setup: every rank has cells and nodes") | |
| TEST_CASE ("Mesh setup: multi-rank produces ghosts") | |
| TEST_CASE ("Mesh setup: periodic state matches configuration") | |
| TEST_CASE ("Ball2: mixed 3D element types") | |
| TEST_CASE ("NodeIndex: Global2Local round-trip on father nodes") | |
| TEST_CASE ("NodeIndex: Global2Local round-trip on ghost nodes") | |
| TEST_CASE ("NodeIndex: _NoSon round-trip on father nodes") | |
| TEST_CASE ("NodeIndex: _NoSon returns negative for non-local global") | |
| TEST_CASE ("NodeIndex: Global2Local returns negative for unknown global") | |
| TEST_CASE ("CellIndex: Global2Local round-trip on father cells") | |
| TEST_CASE ("CellIndex: Global2Local round-trip on ghost cells") | |
| TEST_CASE ("CellIndex: _NoSon round-trip on father cells") | |
| TEST_CASE ("CellIndex: _NoSon returns negative for non-local global") | |
| TEST_CASE ("BndIndex: Global2Local round-trip on father bnds") | |
| TEST_CASE ("BndIndex: _NoSon round-trip on father bnds") | |
| TEST_CASE ("UnInitIndex pass-through for all 12 conversion methods") | |
| TEST_CASE ("Local2Global: negative local index decodes via -1-x encoding") | |
| TEST_CASE ("AdjPrimary: cell2node local indices are in valid range") | |
| TEST_CASE ("AdjPrimary: cell2cell local entries are valid or not-found") | |
| TEST_CASE ("AdjPrimary: bnd2cell owner cell is a local father cell") | |
| TEST_CASE ("AdjPrimary: bnd2node local indices are in valid range") | |
| TEST_CASE ("AdjPrimary: Local2Global then Global2Local is identity") | |
| TEST_CASE ("AdjPrimary: three consecutive round-trips are stable") | |
| TEST_CASE ("AdjPrimaryForBnd: round-trip on cell2node only") | |
Parameterized doctest-based unit tests for UnstructuredMesh index conversion and adjacency Global2Local / Local2Global methods.
Tests run against 4 mesh configurations (same as test_MeshPipeline): [0] UniformSquare_10 – 2D, 100 quad cells, non-periodic [1] IV10_10 – 2D, 100 quad cells, periodic (isentropic vortex) [2] NACA0012_H2 – 2D, 20816 unstructured quad cells, non-periodic [3] IV10U_10 – 2D, 322 unstructured tri cells, periodic
Each mesh is partitioned with Metis, ghost layers built, then exercises:
All meshes are pre-built in main() and destroyed together after tests. This avoids an OpenMPI resource exhaustion observed when building/destroying 20+ meshes in a single process at np=8.
Run under mpirun with 1, 2, 4, and 8 ranks.
Definition in file test_MeshIndexConversion.cpp.
| #define DOCTEST_CONFIG_IMPLEMENT |
Definition at line 27 of file test_MeshIndexConversion.cpp.
| #define FOR_EACH_MESH_CONFIG | ( | body | ) |
Definition at line 177 of file test_MeshIndexConversion.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 189 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: bnd2cell owner cell is a local father cell" | ) |
Definition at line 548 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: bnd2node local indices are in valid range" | ) |
Definition at line 561 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: cell2cell local entries are valid or not-found" | ) |
Definition at line 533 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: cell2node local indices are in valid range" | ) |
Definition at line 518 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: Local2Global then Global2Local is identity" | ) |
Definition at line 579 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimary: three consecutive round-trips are stable" | ) |
Definition at line 613 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "AdjPrimaryForBnd: round-trip on cell2node only" | ) |
Definition at line 632 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "Ball2: mixed 3D element types" | ) |
Definition at line 245 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "BndIndex: _NoSon round-trip on father bnds" | ) |
Definition at line 467 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "BndIndex: Global2Local round-trip on father bnds" | ) |
Definition at line 455 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "CellIndex: _NoSon returns negative for non-local global" | ) |
Definition at line 441 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "CellIndex: _NoSon round-trip on father cells" | ) |
Definition at line 429 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "CellIndex: Global2Local round-trip on father cells" | ) |
Definition at line 402 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "CellIndex: Global2Local round-trip on ghost cells" | ) |
Definition at line 414 of file test_MeshIndexConversion.cpp.
Definition at line 503 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "Mesh setup: every rank has cells and nodes" | ) |
Definition at line 217 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "Mesh setup: multi-rank produces ghosts" | ) |
Definition at line 226 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "Mesh setup: periodic state matches configuration" | ) |
Definition at line 236 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "NodeIndex: _NoSon returns negative for non-local global" | ) |
Definition at line 378 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "NodeIndex: _NoSon round-trip on father nodes" | ) |
Definition at line 366 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "NodeIndex: Global2Local returns negative for unknown global" | ) |
Definition at line 389 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "NodeIndex: Global2Local round-trip on father nodes" | ) |
Definition at line 340 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "NodeIndex: Global2Local round-trip on ghost nodes" | ) |
Definition at line 352 of file test_MeshIndexConversion.cpp.
| TEST_CASE | ( | "UnInitIndex pass-through for all 12 conversion methods" | ) |
Definition at line 482 of file test_MeshIndexConversion.cpp.