Peano
Loading...
Searching...
No Matches
exagrype::ccz4::tests::GammaDriverTest Class Reference

Checks of the two variants of the Gamma driver in the CCZ4 kernels. More...

#include <GammaDriverTest.h>

Inheritance diagram for exagrype::ccz4::tests::GammaDriverTest:
Collaboration diagram for exagrype::ccz4::tests::GammaDriverTest:

Public Member Functions

 GammaDriverTest ()
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 testSourceOfBothVariants ()
void testNonconservativeProductOfBothVariants ()
void testFrozenShift ()

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

Checks of the two variants of the Gamma driver in the CCZ4 kernels.

CCZ4b picks the shifting shift (1) or the non-shifting shift (0), see exagrype::ccz4::ncpFirstOrder(). The kernels of the two variants must differ in exactly those terms in which the equations differ. The test evaluates the kernels for both variants on a perturbed flat spacetime with a shift and compares the difference of the results with these terms:

  • The source of the shifting shift holds the advection term \( \beta^k B_k^i \) of the shift and its derivative \( B_j^k B_k^i \) in the equation of \( B_j^i \). The second-order source holds neither, as the numerical scheme advects the shift.
  • The non-conservative product of the non-shifting shift holds the advection of Ghat in the equation of b, as the equation of b needs the complete time derivative of Ghat, whereas the kernels leave the advection of Ghat itself to the numerical scheme.
  • All other entries are the same for both variants.

It also checks that a shift which does not evolve (CCZ4s=0) switches off the equations of the shift, of b and of the derivatives of the shift for both variants.

The rationale behind the terms is written down in src/exagrype/ccz4/adrs/0002-ccz4b-selects-the-shifting-or-the-non-shifting-shift.md.

Definition at line 44 of file GammaDriverTest.h.

Constructor & Destructor Documentation

◆ GammaDriverTest()

exagrype::ccz4::tests::GammaDriverTest::GammaDriverTest ( )

Member Function Documentation

◆ run()

virtual void exagrype::ccz4::tests::GammaDriverTest::run ( )
overridevirtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

◆ testFrozenShift()

void exagrype::ccz4::tests::GammaDriverTest::testFrozenShift ( )
private

◆ testNonconservativeProductOfBothVariants()

void exagrype::ccz4::tests::GammaDriverTest::testNonconservativeProductOfBothVariants ( )
private

◆ testSourceOfBothVariants()

void exagrype::ccz4::tests::GammaDriverTest::testSourceOfBothVariants ( )
private

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