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

Unit tests for Riemann solvers in Gas.hpp. More...

#include "doctest.h"
#include "Euler/Gas.hpp"
#include <Eigen/Dense>
#include <cmath>
#include <iostream>
#include <iomanip>
Include dependency graph for test_RiemannSolvers.cpp:

Go to the source code of this file.

Classes

struct  SodTestCase
 
struct  GoldenFluxCase
 

Macros

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
 

Functions

 TEST_CASE ("Roe consistency: identical states give exact flux")
 
 TEST_CASE ("HLLC consistency: identical states give exact flux")
 
 TEST_CASE ("HLLEP consistency: identical states give exact flux")
 
Eigen::Vector3d n (1.0, 0.0, 0.0)
 
 for (auto rs :{Roe_M1, Roe_M3, Roe_M4, Roe_M5, Roe_M6, Roe_M7, Roe_M8})
 
 TEST_CASE ("Roe symmetry: F(UL,UR,n) = -F(UR,UL,-n)")
 
 TEST_CASE ("Sod shock tube: flux is finite and bounded")
 
 TEST_CASE ("Golden flux values for mixed-state test vector")
 
 for (auto rs :{Roe, HLLC, HLLEP})
 
 TEST_CASE ("Roe consistency: diagonal normal")
 

Variables

auto Fexact = exactNormalFlux(U, n)
 

Detailed Description

Unit tests for Riemann solvers in Gas.hpp.

Tests cover:

  • Consistency: F(UL, UR) with UL==UR equals the exact physical flux
  • Roe flux: default eigScheme=0, plus variants 1-8
  • HLLC flux: consistency and symmetry
  • HLLEP flux: consistency
  • InviscidFlux_IdealGas_Dispatcher: runtime dispatch
  • Symmetry: F(UL,UR,n) = -F(UR,UL,-n) for all solvers
  • Sod shock tube: UL != UR produces finite, bounded flux
  • Golden values for specific test vectors

All functions are pure (no MPI, no mesh). Serial doctest.

Definition in file test_RiemannSolvers.cpp.

Macro Definition Documentation

◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

Definition at line 18 of file test_RiemannSolvers.cpp.

Function Documentation

◆ for() [1/2]

for ( auto rs :{Roe, HLLC, HLLEP}  )

Definition at line 303 of file test_RiemannSolvers.cpp.

◆ for() [2/2]

for ( auto rs :{Roe_M1, Roe_M3, Roe_M4, Roe_M5, Roe_M6, Roe_M7, Roe_M8}  )

Definition at line 138 of file test_RiemannSolvers.cpp.

◆ n()

Eigen::Vector3d n ( 1.  0,
0.  0,
0.  0 
)
Initial value:
{
auto U = prim2cons(1.0, 0.0, 0.0, 0.0, 1.0)

◆ TEST_CASE() [1/7]

TEST_CASE ( "Golden flux values for mixed-state test vector"  )

Definition at line 269 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [2/7]

TEST_CASE ( "HLLC consistency: identical states give exact flux"  )

Definition at line 101 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [3/7]

TEST_CASE ( "HLLEP consistency: identical states give exact flux"  )

Definition at line 116 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [4/7]

TEST_CASE ( "Roe consistency: diagonal normal"  )

Definition at line 342 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [5/7]

TEST_CASE ( "Roe consistency: identical states give exact flux"  )

Definition at line 85 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [6/7]

TEST_CASE ( )

Definition at line 154 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

◆ TEST_CASE() [7/7]

TEST_CASE ( "Sod shock tube: flux is finite and bounded"  )

Definition at line 212 of file test_RiemannSolvers.cpp.

Here is the call graph for this function:

Variable Documentation

◆ Fexact

auto Fexact = exactNormalFlux(U, n)

Definition at line 135 of file test_RiemannSolvers.cpp.