DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
test_MeshPipeline.cpp File Reference

Parameterized doctest tests for the full mesh pipeline. More...

#include "doctest.h"
#include "Geom/Mesh/Mesh.hpp"
#include "Geom/BoundaryCondition.hpp"
#include <string>
#include <vector>
#include <array>
#include <cmath>
#include <set>
#include <fmt/core.h>
Include dependency graph for test_MeshPipeline.cpp:

Go to the source code of this file.

Classes

struct  MeshConfig
 

Macros

#define DOCTEST_CONFIG_IMPLEMENT
 
#define FOR_EACH_MESH_CONFIG(body)
 

Typedefs

using idx_pbi_t = std::pair< DNDS::index, uint8_t >
 

Functions

int main (int argc, char **argv)
 
 TEST_CASE ("Pipeline: all five states are Local")
 
 TEST_CASE ("Pipeline: global cell count matches expected")
 
 TEST_CASE ("Pipeline: global bnd count matches expected")
 
 TEST_CASE ("InterpolateFace: face count is positive")
 
 TEST_CASE ("InterpolateFace: face2cell has exactly 2 entries per face")
 
 TEST_CASE ("InterpolateFace: face2cell owner is a valid local cell")
 
 TEST_CASE ("InterpolateFace: face2node indices in valid range")
 
 TEST_CASE ("InterpolateFace: cell2face row sizes match expected face count")
 
 TEST_CASE ("InterpolateFace: cell2face entries are valid face indices")
 
 TEST_CASE ("InterpolateFace: bnd2face maps to valid faces")
 
 TEST_CASE ("InterpolateFace: face element types are valid")
 
 TEST_CASE ("InterpolateFace: DSL matches Legacy on all mesh configs")
 

Detailed Description

Parameterized doctest tests for the full mesh pipeline.

Each mesh configuration (file, dimension, periodic settings, expected counts) is tested through the complete pipeline:

  • Pipeline state tracking: every state variable checked
  • InterpolateFace: face topology, face2cell, bnd2face
  • ReorderLocalCells: cell permutation, partition starts
  • N2CB, C2F, Facial, C2CFace adjacency validation
  • ConstructBndMesh, BuildVTKConnectivity
  • Global count conservation
  • All 5 Adj round-trip inverses (on one mesh config)

Mesh configurations: [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 (airfoil) [3] IV10U_10 – 2D, 322 unstructured tri cells, periodic (isentropic vortex)

Definition in file test_MeshPipeline.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT

#define DOCTEST_CONFIG_IMPLEMENT

Definition at line 22 of file test_MeshPipeline.cpp.

◆ FOR_EACH_MESH_CONFIG

#define FOR_EACH_MESH_CONFIG (   body)
Value:
for (int _ci = 0; _ci < N_CONFIGS; _ci++) \
{ \
/* Ball2 (index 4) is only tested with np=8 */ \
if (_ci == 4 && g_mpi.size != 8) \
continue; \
CAPTURE(_ci); \
const auto &cfg = g_configs[_ci]; \
auto m = g_full[_ci]; \
SUBCASE(cfg.name) { body } \
}
Eigen::Matrix< real, 3, 3 > m
int size
Number of ranks in comm (-1 until initialised).
Definition MPI.hpp:237

Definition at line 225 of file test_MeshPipeline.cpp.

Typedef Documentation

◆ idx_pbi_t

using idx_pbi_t = std::pair<DNDS::index, uint8_t>

Definition at line 507 of file test_MeshPipeline.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 195 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [1/12]

TEST_CASE ( "InterpolateFace: bnd2face maps to valid faces"  )

Definition at line 329 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/12]

TEST_CASE ( "InterpolateFace: cell2face entries are valid face indices"  )

Definition at line 317 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [3/12]

TEST_CASE ( "InterpolateFace: cell2face row sizes match expected face count"  )

Definition at line 307 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [4/12]

TEST_CASE ( "InterpolateFace: DSL matches Legacy on all mesh configs"  )

Definition at line 416 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [5/12]

TEST_CASE ( "InterpolateFace: face count is positive"  )

Definition at line 273 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [6/12]

TEST_CASE ( "InterpolateFace: face element types are valid"  )

Definition at line 340 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [7/12]

TEST_CASE ( "InterpolateFace: face2cell has exactly 2 entries per face"  )

Definition at line 278 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [8/12]

TEST_CASE ( "InterpolateFace: face2cell owner is a valid local cell"  )

Definition at line 284 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [9/12]

TEST_CASE ( "InterpolateFace: face2node indices in valid range"  )

Definition at line 295 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [10/12]

TEST_CASE ( "Pipeline: all five states are Local"  )

Definition at line 239 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [11/12]

TEST_CASE ( "Pipeline: global bnd count matches expected"  )

Definition at line 260 of file test_MeshPipeline.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [12/12]

TEST_CASE ( "Pipeline: global cell count matches expected"  )

Definition at line 250 of file test_MeshPipeline.cpp.

Here is the call graph for this function: