Peano 4
Loading...
Searching...
No Matches
peano4::grid::tests::GridControlEventTest Class Reference

The GridControlEvent is a generated type, so we don't really test this type. More...

#include <GridControlEventTest.h>

Inheritance diagram for peano4::grid::tests::GridControlEventTest:
Collaboration diagram for peano4::grid::tests::GridControlEventTest:

Public Member Functions

 GridControlEventTest ()
 
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 testMerge1 ()
 
void testMerge2 ()
 From another debugging session:
 
void testMerge3 ()
 
void testSortWithinMerge ()
 For this 3d test, I use the following setup which arises from our infall tests:
 

Static Private Attributes

static tarch::logging::Log _log
 Logging device.
 

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

The GridControlEvent is a generated type, so we don't really test this type.

We test the routines around it which are held in grid.h.

Definition at line 22 of file GridControlEventTest.h.

Constructor & Destructor Documentation

◆ GridControlEventTest()

peano4::grid::tests::GridControlEventTest::GridControlEventTest ( )

Definition at line 12 of file GridControlEventTest.cpp.

Member Function Documentation

◆ run()

void peano4::grid::tests::GridControlEventTest::run ( )
overridevirtual

This routine is triggered by the TestCaseCollection.

Implements tarch::tests::TestCase.

Definition at line 196 of file GridControlEventTest.cpp.

References testMethod.

◆ testMerge1()

void peano4::grid::tests::GridControlEventTest::testMerge1 ( )
private
  From a debugging session:

<pre>

69568402 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[-0.0333333,-0.0333333],width=[0.4,0.4],h=[0.111111,0.111111]) 69600708 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.3,-0.0333333],width=[0.4,0.4],h=[0.111111,0.111111]) 69630098 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.633333,-0.0333333],width=[0.4,0.4],h=[0.111111,0.111111]) 69658414 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.633333,0.3],width=[0.4,0.4],h=[0.111111,0.111111]) 69739708 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.3,0.3],width=[0.4,0.4],h=[0.111111,0.111111]) 69769194 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[-0.0333333,0.3],width=[0.4,0.4],h=[0.111111,0.111111]) 69797019 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[-0.0333333,0.633333],width=[0.4,0.4],h=[0.111111,0.111111]) 69824642 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.3,0.633333],width=[0.4,0.4],h=[0.111111,0.111111]) 69852630 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) (refinementControl=Refine,offset=[0.633333,0.633333],width=[0.4,0.4],h=[0.111111,0.111111]) 69894892 00:00:00 rank:0 core:0 info peano4::grid::consolidate(...) 1: (refinementControl=Refine,offset=[0.633333,0.3],width=[0.4,0.733333],h=[0.111111,0.111111])

</pre>

Definition at line 15 of file GridControlEventTest.cpp.

References tarch::la::equals(), peano4::grid::merge(), peano4::grid::GridControlEvent::Refine, peano4::grid::toString(), validateEquals, and validateWithParams1.

Here is the call graph for this function:

◆ testMerge2()

void peano4::grid::tests::GridControlEventTest::testMerge2 ( )
private

From another debugging session:


enter with 5
- in: (refinementControl=Refine,offset=[0.316667,0.316667],width=[0.366667,0.366667],h=[0.111111,0.111111])
- in: (refinementControl=Refine,offset=[0.65,0.316667],width=[0.366667,0.366667],h=[0.111111,0.111111])
- in: (refinementControl=Refine,offset=[0.65,-0.0166667],width=[0.366667,0.366667],h=[0.111111,0.111111])
- in: (refinementControl=Refine,offset=[0.316667,-0.0166667],width=[0.366667,0.366667],h=[0.111111,0.111111])
- in: (refinementControl=Refine,offset=[-0.0166667,-0.0166667],width=[0.366667,0.366667],h=[0.111111,0.111111])


8800440139   00:00:08     rank:0       core:0       info         peano4::grid::merge(...)                                       enter with 3
8800449454   00:00:08     rank:0       core:0       info         peano4::grid::merge(...)                                       - in: (refinementControl=Refine,offset=[-0.0166667,-0.0166667],width=[0.7,0.366667],h=[0.111111,0.111111])
8800457618   00:00:08     rank:0       core:0       info         peano4::grid::merge(...)                                       - in: (refinementControl=Refine,offset=[0.65,-0.0166667],width=[0.366667,0.7],h=[0.111111,0.111111])
8800465519   00:00:08     rank:0       core:0       info         peano4::grid::merge(...)                                       - in: (refinementControl=Refine,offset=[0.316667,0.316667],width=[0.366667,0.366667],h=[0.111111,0.111111])

8800471873   00:00:08     rank:0       core:0       info         peano4::grid::merge(...)                                      have to handle 3 refine/coarsen commands
- (refinementControl=Refine,offset=[0.316667,0.316667],width=[0.366667,0.366667],h=[0.111111,0.111111])
- (refinementControl=Refine,offset=[0.65,-0.0166667],width=[0.366667,0.7],h=[0.111111,0.111111])
- (refinementControl=Refine,offset=[-0.0166667,-0.0166667],width=[0.7,0.366667],h=[0.111111,0.111111])

      

Definition at line 57 of file GridControlEventTest.cpp.

References peano4::grid::merge(), peano4::grid::GridControlEvent::Refine, peano4::grid::internal::twoEventsAreAdjacent(), validate, and validateWithParams2.

Here is the call graph for this function:

◆ testMerge3()

void peano4::grid::tests::GridControlEventTest::testMerge3 ( )
private
   Test for this bug:

peano4::grid::merge(...) merge two adjacent events ((refinementControl=Refine,offset=[0.65,0.65],width=[0.366667,0.366667],h=[0.111111,0.111111]) and (refinementControl=Refine,offset=[0.883333,0.883333],width=[0.122222,0.122222],h=[0.037037,0.037037])) into (refinementControl=Refine,offset=[0.65,0.65],width=[0.366667,0.366667],h=[0.111111,0.111111])

Definition at line 100 of file GridControlEventTest.cpp.

References peano4::grid::merge(), peano4::grid::GridControlEvent::Refine, and validateEquals.

Here is the call graph for this function:

◆ testSortWithinMerge()

void peano4::grid::tests::GridControlEventTest::testSortWithinMerge ( )
private

For this 3d test, I use the following setup which arises from our infall tests:

(refinementControl=Refine,offset=[-0.0611111,0.05,0.272222],width=[0.122222,0.122222,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.172222,-0.0611111,0.272222],width=[0.122222,0.233333,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.505556,0.383333,0.383333],width=[0.455556,0.122222,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.0611111,0.05,0.383333],width=[0.122222,0.455556,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.172222,-0.0611111,0.383333],width=[0.122222,0.455556,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.505556,0.383333,0.272222],width=[0.566667,0.122222,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.172222,0.161111,0.272222],width=[0.233333,0.233333,0.122222],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.0611111,-0.0611111,0.272222],width=[0.566667,0.122222,0.233333],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[-0.505556,-0.0611111,0.272222],width=[0.344444,0.455556,0.233333],h=[0.037037,0.037037,0.037037]) (refinementControl=Refine,offset=[0.272222,-0.505556,0.272222],width=[0.233333,0.455556,0.233333],h=[0.037037,0.037037,0.037037]))

Definition at line 120 of file GridControlEventTest.cpp.

References peano4::grid::GridControlEvent::Refine, peano4::grid::internal::sort(), peano4::grid::toString(), validateEqualsWithParams1, and validateNumericalEqualsWithParams1.

Here is the call graph for this function:

Field Documentation

◆ _log

tarch::logging::Log peano4::grid::tests::GridControlEventTest::_log
staticprivate

Logging device.

Definition at line 27 of file GridControlEventTest.h.


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