13#ifdef UseTestSpecificCompilerSettings
14#pragma optimize("",off)
19 TestCase(
"peano4::parallel::tests::NodeTest" ) {
29 metaInfoA.first, metaInfoB.first,
44 flagsTopRightVertex(0) = 0;
53 std::stringstream resultContentTopRightVertex;
54 for (
auto& p: resultTopRightVertex) {
55 resultContentTopRightVertex <<
"(" << p.first <<
"," << std::bitset<2*Dimensions>(p.second) <<
")";
57 validateWithParams3( resultTopRightVertex.count(key0)==1, key0.first, key0.second, resultContentTopRightVertex.str() );
58 validateWithParams3( resultTopRightVertex.count(key1)==1, key1.first, key1.second, resultContentTopRightVertex.str() );
59 validateWithParams3( resultTopRightVertex.count(key2)==1, key2.first, key2.second, resultContentTopRightVertex.str() );
69 flagsBottomLeftVertex(3) = 0;
78 std::stringstream resultContentBottomLeftVertex;
79 for (
auto& p: resultBottomLeftVertex) {
80 resultContentBottomLeftVertex <<
"(" << p.first <<
"," << std::bitset<2*Dimensions>(p.second) <<
")";
82 validateWithParams3( resultBottomLeftVertex.count(key3)==1, key3.first, key3.second, resultContentBottomLeftVertex.str() );
83 validateWithParams3( resultBottomLeftVertex.count(key4)==1, key4.first, key4.second, resultContentBottomLeftVertex.str() );
84 validateWithParams3( resultBottomLeftVertex.count(key5)==1, key5.first, key5.second, resultContentBottomLeftVertex.str() );
113 validateEqualsWithParams3( result.size(), 7, flags,
peano4::parallel::Node::toString(result),
"expected output={(stack=9,bnd=111),(stack=10,bnd=110),(stack=12,bnd=101),(stack=13,bnd=100),(stack=18,bnd=011),(stack=19,bnd=010),(stack=21,bnd=001)}" );
134 testMethod( testGetOutputStacksForPeriodicBoundaryExchange )
139#ifdef UseTestSpecificCompilerSettings
140#pragma optimize("",on)
#define logTraceOut(methodName)
#define logTraceIn(methodName)
#define validateEqualsWithParams3(actualValue, validValue, param0, param1, param2)
#define validateEqualsWithParams1(actualValue, validValue, param0)
#define validate(booleanExpr)
#define testMethod(name)
Run a test method and check for errors.
#define validateWithParams6(booleanExpr, param0, param1, param2, param3, param4, param5)
#define validateWithParams3(booleanExpr, param0, param1, param2)
#define validateEqualsWithParams2(actualValue, validValue, param0, param1)
#define validateEquals(actualValue, validValue)
static constexpr int RankOfPeriodicBoundaryCondition
Periodic boundary conditions are technically realised as domain decomposition, i.e.
static std::bitset< 2 *Dimensions > getPeriodicBoundaryNumber(const tarch::la::Vector< TwoPowerD, int > &flags)
Analyse to which of the 2d faces it is adjacent.
static bool isPeriodicBoundaryExchangeOutputStackNumber(int number)
static constexpr int MaxSpacetreesPerRank
int getLocalTreeId(int treeId) const
static int mapPeriodicBoundaryExchangeOutputStackOntoInputStack(int outputStack)
std::pair< int, int > PeriodicBoundaryStackIdentifier
A periodic boundary stack is basically a stack (an integer), but I do augment it by a bitset which id...
std::pair< int, MPI_Comm > GridDataExchangeMetaInformation
static std::string toString(const std::set< PeriodicBoundaryStackIdentifier > &data)
static std::set< PeriodicBoundaryStackIdentifier > getOutputStacksForPeriodicBoundaryExchange(const tarch::la::Vector< TwoPowerD, int > &flags)
You hand in a the flags of a vertex and you get the boundary stack identifiers including their direct...
static constexpr int StacksPerCommunicationPartner
We need one stack for outgoing data, one for incoming data, and we distinguish horizontal and vertica...
static int getPeriodicBoundaryExchangeInputStackNumberForOutputStack(int outputStackNumber)
Hand in an output stack number of a face and you get back the input stack number.
GridDataExchangeMetaInformation getGridDataExchangeMetaInformation(int sendingTreeId, int receivingTreeId, ExchangeMode exchange) const
I use two tags per spacetree per rank: one for boundary data (horizontal) and one for up-down and syn...
static Node & getInstance()
This operation returns the singleton instance.
void testGetPeriodicBoundaryNumber()
void testGetOutputStacksForPeriodicBoundaryExchange()
Boundary data exchange test case.
static tarch::logging::Log _log
Logging device.
virtual void run() override
This routine is triggered by the TestCaseCollection.
void testTagCalculation()
static Rank & getInstance()
This operation returns the singleton instance.