|
DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
|
Unit tests for ghost chain types, compilation, and BFS evaluation. More...
#include "doctest.h"#include "SyntheticMeshBuilders.hpp"#include "Geom/Mesh/MeshConnectivity.hpp"#include <string>#include <vector>#include <set>#include <algorithm>#include <unordered_set>Go to the source code of this file.
Classes | |
| struct | SyntheticTiledGrid |
Macros | |
| #define | DOCTEST_CONFIG_IMPLEMENT |
Functions | |
| TEST_CASE ("GhostChain: defaultPrimary compiles") | |
| TEST_CASE ("GhostChain: prefix merging") | |
| TEST_CASE ("GhostChain: invalid chain detection") | |
| TEST_CASE ("GhostChain: checkAvailable") | |
| TEST_CASE ("GhostChain: dump") | |
| TEST_CASE ("GhostChain: face ghost chain") | |
| TEST_CASE ("GhostChain: AdjKind equality and hash") | |
| TEST_CASE ("GhostChain: entityDepth") | |
| TEST_CASE ("GhostChain: adjKindName") | |
| TEST_CASE ("evaluateGhostTree: performance benchmark") | |
| TEST_CASE ("evaluateGhostTree: single hop cell2cell") | |
| TEST_CASE ("evaluateGhostTree: two-hop cell2cell2node with manual ghost") | |
| TEST_CASE ("evaluateGhostTree: 2-ring cell chain") | |
| TEST_CASE ("evaluateGhostTree: union of multiple chains") | |
| TEST_CASE ("evaluateGhostTree: np=1 produces no ghosts") | |
| TEST_CASE ("evaluateGhostTree: doubly-periodic tiled grid") | |
| TEST_CASE ("evaluateGhostTree: small periodic tiled grid") | |
| int | main (int argc, char **argv) |
Unit tests for ghost chain types, compilation, and BFS evaluation.
Tests:
Running: cmake –build build -t geom_test_mesh_connectivity_ghost -j8 ctest –test-dir build -R geom_mesh_connectivity_ghost –output-on-failure
Running benchmark only: mpirun -np 2 ./build/test/cpp/geom_test_mesh_connectivity_ghost -tc="*performance*" mpirun -np 4 ./build/test/cpp/geom_test_mesh_connectivity_ghost -tc="*performance*"
The benchmark generates synthetic NxN quad grids (N=100,500,1000), verifies exact ghost cell counts against analytical expectations, and prints timing for 1-hop (cell2cell) and 2-hop (cell2cell + cell2node) ghost evaluation.
Definition in file test_MeshConnectivity_Ghost.cpp.
| #define DOCTEST_CONFIG_IMPLEMENT |
Definition at line 36 of file test_MeshConnectivity_Ghost.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1050 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: 2-ring cell chain" | ) |
Definition at line 781 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: doubly-periodic tiled grid" | ) |
Generate a doubly-periodic NxN-per-rank tiled grid.
Tiled rectangular grid with optional periodic wrapping in both directions. 2D rank decomposition per sqrt(np); falls back to 1×np when not factorable.
Definition at line 937 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | ) |
Definition at line 909 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: performance benchmark" | ) |
Definition at line 573 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: single hop cell2cell" | ) |
Definition at line 642 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: small periodic tiled grid" | ) |
Definition at line 999 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: two-hop cell2cell2node with manual ghost" | ) |
Definition at line 692 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "evaluateGhostTree: union of multiple chains" | ) |
Definition at line 824 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: AdjKind equality and hash" | ) |
Definition at line 300 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: adjKindName" | ) |
Definition at line 334 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: checkAvailable" | ) |
Definition at line 245 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: defaultPrimary compiles" | ) |
Definition at line 112 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: dump" | ) |
Definition at line 265 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: entityDepth" | ) |
Definition at line 319 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: face ghost chain" | ) |
Definition at line 277 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: invalid chain detection" | ) |
Definition at line 218 of file test_MeshConnectivity_Ghost.cpp.
| TEST_CASE | ( | "GhostChain: prefix merging" | ) |
Definition at line 190 of file test_MeshConnectivity_Ghost.cpp.