Peano
Loading...
Searching...
No Matches
exahype2::fv::tests::InterpolationRestrictionTest Class Reference

#include <InterpolationRestrictionTest.h>

Inheritance diagram for exahype2::fv::tests::InterpolationRestrictionTest:
Collaboration diagram for exahype2::fv::tests::InterpolationRestrictionTest:

Public Member Functions

 InterpolationRestrictionTest ()
 
virtual void run ()
 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 testPiecewiseConstantInterpolationWithTensorProduct1 ()
 
void testPiecewiseConstantInterpolationWithTensorProduct2 ()
 
void testInjectionExtrapolationRestrictionWithTensorProduct ()
 
void testAverageRestrictionWithTensorProduct ()
 Simple averaging.
 

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 18 of file InterpolationRestrictionTest.h.

Constructor & Destructor Documentation

◆ InterpolationRestrictionTest()

exahype2::fv::tests::InterpolationRestrictionTest::InterpolationRestrictionTest ( )

Definition at line 14 of file InterpolationRestrictionTest.cpp.

Member Function Documentation

◆ run()

void exahype2::fv::tests::InterpolationRestrictionTest::run ( )
virtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

Definition at line 19 of file InterpolationRestrictionTest.cpp.

References testMethod.

◆ testAverageRestrictionWithTensorProduct()

void exahype2::fv::tests::InterpolationRestrictionTest::testAverageRestrictionWithTensorProduct ( )
private

Simple averaging.

I test a patch size of 5, work with an overlap of 3 and assume that we have two unknowns per finite differences point.

The tangential restriction matrix thus is a 5 times 15 matrix, as we take the five volumes that are tangential to a face in one direction. We assume that the normal points in the x-direction and we speak about the right face of a cell, i.e. the face index equals Dimensions.

As we restrict, the right half of the fine grid face (inside) has to be restricted to the right half of the coarse grid face (outside).

Definition at line 151 of file InterpolationRestrictionTest.cpp.

References toolbox::blockstructured::restrictInnerHalfOfHaloLayer_AoS_tensor_product(), peano4::datamanagement::FaceMarker::select(), peano4::grid::GridTraversalEvent::setRelativePositionToFather(), and validateNumericalEqualsWithParams6.

Here is the call graph for this function:

◆ testInjectionExtrapolationRestrictionWithTensorProduct()

void exahype2::fv::tests::InterpolationRestrictionTest::testInjectionExtrapolationRestrictionWithTensorProduct ( )
private
   Simple test that Han and me set up for FD4 with SSInfall. We use the
   following operators:

static constexpr double TangentialRestrictionMatrix1d[] = { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ,0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0};

static constexpr double NormalRestrictionMatrix1d[] = { 0.0, 0.0, 0.0, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.0, 0.0, 0.0, 0.0, -2.0, 3.0, 0.0, 0.0, 0.0, 0.0, -5.0, 6.0};

 This is some kind of injection along the normal, and averaging along
 the normal with some extrapolation. These operators did yield zero or
 negative densities in the Euler SSInfall setup with a patch size of 5:

assertion in file observers/TimeStep2exahype2_solvers_rkfd_actionsets_DynamicAMR0.cpp, line 265 failed: coarseGridFacesSelfSimilarInfallFD4QUpdate(marker.getSelectedFaceNumber()).value[i*5+0] > 0.0 parameter coarseGridFacesSelfSimilarInfallFD4QUpdate(marker.getSelectedFaceNumber()).value[i*5+0]: 0.00000000000000000000e+00 parameter i: 2 parameter marker.toString(): (x=[0.185185,0.185185,0.37037],h=[0.037037,0.037037,0.037037],select=5,is-cell-local=1,is-face-local=1,has-face-been-refined=0,will-face-be-refined=0,rel-pos=[0,0,2]) benchmark-plot-3-no-opt-asserts-FD4-5: observers/TimeStep2exahype2_solvers_rkfd_actionsets_DynamicAMR0.cpp:265: void benchmarks::exahype2::euler::sphericalaccretionupscaling::observers::TimeStep2exahype2_solvers_rkfd_actionsets_DynamicAMR0::destroyHangingFace(const peano4::datamanagement::FaceMarker &, benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QOld &, benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QNew &, benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QUpdate &, benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4FaceLabel &, peano4::datamanagement::FaceEnumerator<benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QOld>, peano4::datamanagement::FaceEnumerator<benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QNew>, peano4::datamanagement::FaceEnumerator<benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4QUpdate>, peano4::datamanagement::FaceEnumerator<benchmarks::exahype2::euler::sphericalaccretionupscaling::facedata::SelfSimilarInfallFD4FaceLabel>, benchmarks::exahype2::euler::sphericalaccretionupscaling::celldata::SelfSimilarInfallFD4Q &, benchmarks::exahype2::euler::sphericalaccretionupscaling::celldata::SelfSimilarInfallFD4QRhsEstimates &, benchmarks::exahype2::euler::sphericalaccretionupscaling::celldata::SelfSimilarInfallFD4CellLabel &): Assertion ‘false’ failed. Aborted (core dumped)

Definition at line 363 of file InterpolationRestrictionTest.cpp.

References toolbox::blockstructured::restrictInnerHalfOfHaloLayer_AoS_tensor_product(), peano4::datamanagement::FaceMarker::select(), peano4::grid::GridTraversalEvent::setRelativePositionToFather(), validateNumericalEquals, and validateNumericalEqualsWithParams6.

Here is the call graph for this function:

◆ testPiecewiseConstantInterpolationWithTensorProduct1()

void exahype2::fv::tests::InterpolationRestrictionTest::testPiecewiseConstantInterpolationWithTensorProduct1 ( )
private

◆ testPiecewiseConstantInterpolationWithTensorProduct2()

void exahype2::fv::tests::InterpolationRestrictionTest::testPiecewiseConstantInterpolationWithTensorProduct2 ( )
private

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