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

Integration test for the EulerEvaluator pipeline: fdt -> frhs -> fsolve. More...

#include "doctest.h"
#include "Euler/EulerSolver.hpp"
#include <fstream>
#include <iostream>
#include <iomanip>
#include <filesystem>
Include dependency graph for test_EulerEvaluator.cpp:

Go to the source code of this file.

Macros

#define DOCTEST_CONFIG_IMPLEMENT
 

Functions

template<EulerModel model>
std::array< real, 3 > runOneNewtonStep (const std::string &cfgPath)
 
 CHECK (std::isfinite(rhsDensity))
 
 CHECK (std::isfinite(rhsEnergy))
 
 CHECK (std::isfinite(incL2))
 
 CHECK (rhsDensity > 0)
 
if(g_mpi.rank==0) std CHECK (rhsDensity==doctest::Approx(goldenRhsDensity).epsilon(1e-6))
 
 CHECK (incL2==doctest::Approx(goldenIncL2).epsilon(1e-6))
 
int main (int argc, char **argv)
 

Variables

std::string cfgPath
 
if(g_mpi.rank==0) std auto [rhsDensity, rhsEnergy, incL2] = runOneNewtonStep<NS>(cfgPath)
 
real goldenRhsDensity = 1.0524823780e+01
 
real goldenIncL2 = 3.1557730986e+00
 

Detailed Description

Integration test for the EulerEvaluator pipeline: fdt -> frhs -> fsolve.

Exercises the full evaluator pipeline on three configurations:

  1. Isentropic Vortex (NS, 2D periodic, inviscid)
  2. NACA0012 (NS_SA, 2D external, viscous + SA turbulence)
  3. 3D Box (NS_3D, 3D periodic, inviscid)

For each case the test:

  • Reads the JSON config and mesh
  • Initializes the evaluator and DOF arrays
  • Runs one Newton-like iteration: EvaluateDt -> EvaluateRHS -> LUSGSMatrixInit -> LUSGSForward -> LUSGSBackward
  • Measures the L1 RHS norm (golden regression value)

This is an MPI test registered at np=1, 2, 4. Golden value sentinel: 1e300 means not yet acquired.

Definition in file test_EulerEvaluator.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT

#define DOCTEST_CONFIG_IMPLEMENT

Definition at line 21 of file test_EulerEvaluator.cpp.

Function Documentation

◆ CHECK() [1/6]

CHECK ( incL2  = =doctest::Approx(goldenIncL2).epsilon(1e-6))

◆ CHECK() [2/6]

CHECK ( rhsDensity  ,
 
)

◆ CHECK() [3/6]

if(g_mpi.rank==0) std CHECK ( rhsDensity  = =doctest::Approx(goldenRhsDensity).epsilon(1e-6))

◆ CHECK() [4/6]

CHECK ( std::isfinite(incL2)  )

◆ CHECK() [5/6]

CHECK ( std::isfinite(rhsDensity)  )

◆ CHECK() [6/6]

CHECK ( std::isfinite(rhsEnergy)  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 335 of file test_EulerEvaluator.cpp.

Here is the call graph for this function:

◆ runOneNewtonStep()

template<EulerModel model>
std::array< real, 3 > runOneNewtonStep ( const std::string &  cfgPath)

Definition at line 122 of file test_EulerEvaluator.cpp.

Here is the call graph for this function:

Variable Documentation

◆ auto

if (g_mpi.rank == 0) std auto[rhsDensity, rhsEnergy, incL2] = runOneNewtonStep<NS>(cfgPath)

Definition at line 243 of file test_EulerEvaluator.cpp.

◆ cfgPath

std::string cfgPath
Initial value:
= writeTempConfig<NS>(
root + "/cases/euler/euler_config_IV.json", "iv_test",
{{"vfvSettings", {{"maxOrder", 1}, {"intOrder", 3}}},
{"dataIOControl", {{"meshDirectBisect", 0},
{"meshFile", root + "/data/mesh/IV10_10.cgns"}}}})

Definition at line 234 of file test_EulerEvaluator.cpp.

◆ goldenIncL2

real goldenIncL2 = 3.1557730986e+00

Definition at line 252 of file test_EulerEvaluator.cpp.

◆ goldenRhsDensity

real goldenRhsDensity = 1.0524823780e+01

Definition at line 251 of file test_EulerEvaluator.cpp.