Peano
Loading...
Searching...
No Matches
exahype2::dg::tests::RiemannTest Class Reference

#include <RiemannTest.h>

Inheritance diagram for exahype2::dg::tests::RiemannTest:
Collaboration diagram for exahype2::dg::tests::RiemannTest:

Public Member Functions

 RiemannTest ()
 
virtual ~RiemannTest ()=default
 
virtual void run () override
 This routine is triggered by the TestCaseCollection.
 
- Public Member Functions inherited from tarch::tests::TestCase
 TestCase (const std::string &testCaseName)
 Constructor.
 
virtual ~TestCase ()
 Destructor.
 
int getNumberOfErrors () const
 
std::string getTestCaseName () const
 

Private Member Functions

void testProjectVolumetricDataOntoFacesForConstantSolutionOrder3 ()
 Testing projection to faces by creating fully constant cell and ensuring that the projected values are also the same constant.
 
void testProjectVolumetricDataOntoFacesForConstantSolutionOrder0 ()
 Projection that's used if DG degenerates to a Finite Volumes scheme for the Euler equation, i.e.
 

Additional Inherited Members

- Protected Member Functions inherited from tarch::tests::TestCase
 TestCase ()=delete
 
- Protected Attributes inherited from tarch::tests::TestCase
const std::string _testCaseName
 Name of the test case.
 
int _errors
 Error counter.
 
bool _error
 Indicate within macro if one specific validation failed.
 

Detailed Description

Definition at line 21 of file RiemannTest.h.

Constructor & Destructor Documentation

◆ RiemannTest()

exahype2::dg::tests::RiemannTest::RiemannTest ( )

Definition at line 7 of file RiemannTest.cpp.

◆ ~RiemannTest()

virtual exahype2::dg::tests::RiemannTest::~RiemannTest ( )
virtualdefault

Member Function Documentation

◆ run()

void exahype2::dg::tests::RiemannTest::run ( )
overridevirtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

Definition at line 11 of file RiemannTest.cpp.

References testMethod.

◆ testProjectVolumetricDataOntoFacesForConstantSolutionOrder0()

void exahype2::dg::tests::RiemannTest::testProjectVolumetricDataOntoFacesForConstantSolutionOrder0 ( )
private

Projection that's used if DG degenerates to a Finite Volumes scheme for the Euler equation, i.e.

for 5 unknowns.

Definition at line 144 of file RiemannTest.cpp.

References exahype2::dg::tests::BasisFunctionValuesLeftP0, exahype2::dg::projectVolumetricDataOntoFaces(), and validateNumericalEquals.

Here is the call graph for this function:

◆ testProjectVolumetricDataOntoFacesForConstantSolutionOrder3()

void exahype2::dg::tests::RiemannTest::testProjectVolumetricDataOntoFacesForConstantSolutionOrder3 ( )
private

Testing projection to faces by creating fully constant cell and ensuring that the projected values are also the same constant.

We construct a cell patch which hosts one unknown and one auxiliary variable per degree of freedom. The unknown is set to 1 and the auxiliary variable to -1. We then project onto the 2d faces and look at their values. All is hard-coded to order 3, i.e. we need four quadrature points per coordinate axis.

For the left face of the cell, we have

    ... | ...         ... | ...
    4,5 | 6,7    ->   0,0 | 1,-1
    0,1 | 2,3         0,0 | 1,-1

where the comma separate the unknown from the auxiliary variable. For the right face, we have the same enumeration, but the values are mirrored along the vertical line.

For the bottom face, we have the enumeration

     8,9   10,11  12,13  14,15
    --------------------------
     0,1    2,3    4,5    6,7

which translates into values

    1,-1   1,-1   1,-1   1,-1
    --------------------------
     0,0    0,0    0,0    0,0

In a 3d setup, both patterns are repeated in the z-direction, so the same pattern restarts at index 16.

The 3d case means, that the 4*4*2=32 first entries of the left size are all 0. The remainig entries then exhibit the 1,-1 pattern.

Definition at line 16 of file RiemannTest.cpp.

References exahype2::dg::tests::BasisFunctionValuesLeftP3, exahype2::dg::getNodesPerCell(), exahype2::dg::projectVolumetricDataOntoFaces(), validateEquals, and validateNumericalEquals.

Here is the call graph for this function:

The documentation for this class was generated from the following files: