![]() |
Peano
|
I test the mapping of vertex adjacency data onto stack numbers here. More...
#include <NodeTest.h>
Public Member Functions | |
NodeTest () | |
virtual void | run () override |
This routine is triggered by the TestCaseCollection. | |
![]() | |
TestCase (const std::string &testCaseName) | |
Constructor. | |
virtual | ~TestCase () |
Destructor. | |
int | getNumberOfErrors () const |
std::string | getTestCaseName () const |
Private Member Functions | |
void | testGetPeriodicBoundaryNumber () |
void | testGetOutputStacksForPeriodicBoundaryExchange () |
Boundary data exchange test case. | |
void | testTagCalculation () |
Static Private Attributes | |
static tarch::logging::Log | _log |
Logging device. | |
Additional Inherited Members | |
![]() | |
TestCase ()=delete | |
![]() | |
const std::string | _testCaseName |
Name of the test case. | |
int | _errors |
Error counter. | |
bool | _error |
Indicate within macro if one specific validation failed. | |
I test the mapping of vertex adjacency data onto stack numbers here.
Definition at line 21 of file NodeTest.h.
peano4::parallel::tests::NodeTest::NodeTest | ( | ) |
Definition at line 18 of file NodeTest.cpp.
|
overridevirtual |
This routine is triggered by the TestCaseCollection.
Implements tarch::tests::TestCase.
Definition at line 130 of file NodeTest.cpp.
References logTraceIn, logTraceOut, and testMethod.
|
private |
Boundary data exchange test case.
Pass in the vertex at the top right corner of a unit cube/square and set its adjacency information such as if we had periodic BCs in all directions. So we should exchange along all coordinate axes and along the diagonals, too. This means that we pipe out data according to the table below. We also validate that the corresponding input stacks are different.
direction | to | from |
---|---|---|
top | 8 | 16 |
diagonal top right | 7 | 15 |
right | 10 | 18 |
Counter part on bottom left vertex of domain with an adjacency list of [-2,-2,-2,0]. This gives:
direction | to | from |
---|---|---|
left | 11 | 19 |
diagonal left bottom | 14 | 22 |
bottom | 13 | 21 |
We have to find out that the stacks are properly matching once we mirror (copy) them onto each other. According to the tables above we'd expect the following outcome:
in | out |
---|---|
7 | 22 |
8 | 21 |
10 | 19 |
11 | 18 |
13 | 16 |
14 | 15 |
We see immediately from the numbering, that this is "just" kind of the inverse index.
Definition at line 38 of file NodeTest.cpp.
References peano4::parallel::Node::getOutputStacksForPeriodicBoundaryExchange(), peano4::parallel::Node::getPeriodicBoundaryExchangeInputStackNumberForOutputStack(), peano4::parallel::Node::isPeriodicBoundaryExchangeOutputStackNumber(), peano4::parallel::Node::mapPeriodicBoundaryExchangeOutputStackOntoInputStack(), peano4::grid::Spacetree::RankOfPeriodicBoundaryCondition, peano4::parallel::Node::toString(), validate, validateEquals, validateEqualsWithParams1, validateEqualsWithParams2, validateEqualsWithParams3, and validateWithParams3.
|
private |
Definition at line 118 of file NodeTest.cpp.
References peano4::parallel::Node::getPeriodicBoundaryNumber(), peano4::grid::Spacetree::RankOfPeriodicBoundaryCondition, and validateEqualsWithParams1.
|
private |
Definition at line 23 of file NodeTest.cpp.
References peano4::parallel::Node::getGridDataExchangeMetaInformation(), peano4::parallel::Node::getInstance(), tarch::mpi::Rank::getInstance(), peano4::parallel::Node::getLocalTreeId(), peano4::parallel::Node::HorizontalData, logTraceIn, logTraceOut, peano4::parallel::Node::MaxSpacetreesPerRank, peano4::parallel::Node::StacksPerCommunicationPartner, and validateWithParams6.
|
staticprivate |
Logging device.
Definition at line 26 of file NodeTest.h.