Peano
Loading...
Searching...
No Matches
toolbox::blockstructured::tests::InterpolationTest Class Reference

#include <InterpolationTest.h>

Inheritance diagram for toolbox::blockstructured::tests::InterpolationTest:
Collaboration diagram for toolbox::blockstructured::tests::InterpolationTest:

Public Member Functions

 InterpolationTest ()
 Cosntructor.
 
virtual ~InterpolationTest ()=default
 Destructor, empty.
 
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 testRestrictHaloLayer_AoS_averaging ()
 
void testRestrictCellForBreakingDam ()
 
void testInterpolateCellDataAssociatedToVolumesIntoOverlappingCell_linear ()
 Trivial interpolation test for constant data.
 
void testHangingFacesForAnyOverlap ()
 Interpolate onto hanging faces and restrict from them for overlaps of one, two and three.
 
void testCellInterpolation ()
 Interpolate a coarse patch into its 3^d children.
 

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 17 of file InterpolationTest.h.

Constructor & Destructor Documentation

◆ InterpolationTest()

toolbox::blockstructured::tests::InterpolationTest::InterpolationTest ( )

Cosntructor.

◆ ~InterpolationTest()

virtual toolbox::blockstructured::tests::InterpolationTest::~InterpolationTest ( )
virtualdefault

Destructor, empty.

Member Function Documentation

◆ run()

virtual void toolbox::blockstructured::tests::InterpolationTest::run ( )
overridevirtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

◆ testCellInterpolation()

void toolbox::blockstructured::tests::InterpolationTest::testCellInterpolation ( )
private

Interpolate a coarse patch into its 3^d children.

The piecewise constant interpolation has to copy the value of the coarse volume which contains a fine volume's centre. The d-linear interpolation has to reproduce a linear field, except next to the boundary of the coarse patch, where it extrapolates constantly.

◆ testHangingFacesForAnyOverlap()

void toolbox::blockstructured::tests::InterpolationTest::testHangingFacesForAnyOverlap ( )
private

Interpolate onto hanging faces and restrict from them for overlaps of one, two and three.

  • Both interpolation schemes have to reproduce a constant coarse face on both halves of the hanging face.
  • The linear interpolation has to reproduce a field which is linear along the face, except next to the ends of the face, where it extrapolates constantly.
  • Restricting a constant fine face over all 3^(d-1) subfaces has to yield this constant on the fine half of the coarse face and leave the other half untouched.

◆ testInterpolateCellDataAssociatedToVolumesIntoOverlappingCell_linear()

void toolbox::blockstructured::tests::InterpolationTest::testInterpolateCellDataAssociatedToVolumesIntoOverlappingCell_linear ( )
private

Trivial interpolation test for constant data.

◆ testRestrictCellForBreakingDam()

void toolbox::blockstructured::tests::InterpolationTest::testRestrictCellForBreakingDam ( )
private

◆ testRestrictHaloLayer_AoS_averaging()

void toolbox::blockstructured::tests::InterpolationTest::testRestrictHaloLayer_AoS_averaging ( )
private
   Tests this averaging

   The test results from a real test with the Euler equations and four
   unknowns per coordinate axis. The input is as follows:

parameter tarch::la::DynamicMatrix::vectorToString(fineGridFaceEulerQUpdate.value,4*2*5): (entries=40,
{
 0.100047, 0.000933957, 0,0,0.00493399,
 0.100045, 0.000870917, 0,0,0.0045799,
 0.100039, 0.000801622, 0,0,0.00422816,
 0.100045, 0.00081321,  0,0,0.0042177,
 0.100047, 0.000933957, 0,0,0.00493399,
 0.100045, 0.000870917, 2.71051e-20,0,0.0045799,
 0.100039, 0.000801622, 0,0,0.00422816,
 0.100045,0.00081321,0,0,0.0042177
})


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