DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
test_Reconstruction3D.cpp File Reference

Regression tests for CFV VariationalReconstruction<3> (3D). More...

#include "doctest.h"
#include "CFV/VariationalReconstruction.hpp"
#include <array>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <functional>
#include <nlohmann/json.hpp>
Include dependency graph for test_Reconstruction3D.cpp:

Go to the source code of this file.

Classes

struct  Test3DCase
 

Macros

#define DOCTEST_CONFIG_IMPLEMENT
 

Typedefs

using tVR = CFV::VariationalReconstruction< g_dim >
 
using ScalarFunc3D = std::function< DNDS::real(const tPoint &)>
 

Enumerations

enum class  RecMethod3D { GaussGreen , VFV_P1_HQM , VFV_P2_HQM }
 

Functions

int main (int argc, char **argv)
 
 TEST_CASE ("3D: constant exactness with GaussGreen")
 
 TEST_CASE ("3D: constant exactness with VFV_P1_HQM")
 
 TEST_CASE ("3D: constant exactness with VFV_P2_HQM")
 
 TEST_CASE ("3D: golden-value regression for smooth functions")
 
 TEST_CASE ("3D: VFV P1 HQM converges on sinCos3D")
 
 TEST_CASE ("3D: VFV P2 HQM error < P1 on sinCos3D")
 
if(g_mpi.rank==0) std CHECK (globalVol==doctest::Approx(1.0).epsilon(1e-10))
 

Variables

DNDS::real globalVol = vr->GetGlobalVol()
 

Detailed Description

Regression tests for CFV VariationalReconstruction<3> (3D).

Exercises the full 3D VR pipeline on a periodic hex mesh:

  • Mesh reading, partitioning, ghost building
  • VR construction: metrics, base+weight, rec coeff
  • Polynomial exactness: constant (P0) for all methods
  • Iterative VFV convergence and error measurement

Uses the Uniform32_3D_Periodic.cgns mesh (32^3 = 32768 hex cells, periodic on [0,1]^3).

Golden values are acquired on first run and must be captured manually. The test verifies the 3D template instantiation works end-to-end.

Definition in file test_Reconstruction3D.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT

#define DOCTEST_CONFIG_IMPLEMENT

Definition at line 18 of file test_Reconstruction3D.cpp.

Typedef Documentation

◆ ScalarFunc3D

using ScalarFunc3D = std::function<DNDS::real(const tPoint &)>

Definition at line 152 of file test_Reconstruction3D.cpp.

◆ tVR

using tVR = CFV::VariationalReconstruction<g_dim>

Definition at line 35 of file test_Reconstruction3D.cpp.

Enumeration Type Documentation

◆ RecMethod3D

enum class RecMethod3D
strong
Enumerator
GaussGreen 
VFV_P1_HQM 
VFV_P2_HQM 

Definition at line 91 of file test_Reconstruction3D.cpp.

Function Documentation

◆ CHECK()

if(g_mpi.rank==0) std CHECK ( globalVol  = =doctest::Approx(1.0).epsilon(1e-10))
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 291 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [1/6]

TEST_CASE ( "3D: constant exactness with GaussGreen"  )

Definition at line 337 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/6]

TEST_CASE ( "3D: constant exactness with VFV_P1_HQM"  )

Definition at line 347 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [3/6]

TEST_CASE ( "3D: constant exactness with VFV_P2_HQM"  )

Definition at line 357 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [4/6]

TEST_CASE ( "3D: golden-value regression for smooth functions"  )

Definition at line 413 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [5/6]

TEST_CASE ( "3D: VFV P1 HQM converges on sinCos3D"  )

Definition at line 444 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [6/6]

TEST_CASE ( )

Definition at line 509 of file test_Reconstruction3D.cpp.

Here is the call graph for this function:

Variable Documentation

◆ globalVol

DNDS::real globalVol = vr->GetGlobalVol()

Definition at line 532 of file test_Reconstruction3D.cpp.