Peano
|
#include <GridVertex.h>
Public Types | |
enum class | State : int { HangingVertex = 0 , New = 1 , Unrefined = 2 , Refined = 3 , RefinementTriggered = 4 , Refining = 5 , EraseTriggered = 6 , Erasing = 7 , Delete = 8 } |
enum | ObjectConstruction { NoData } |
Static Public Member Functions | |
static MPI_Datatype | getForkDatatype () |
Hands out MPI datatype if we work without the LLVM MPI extension. | |
static MPI_Datatype | getJoinDatatype () |
static MPI_Datatype | getBoundaryExchangeDatatype () |
static MPI_Datatype | getMultiscaleDataExchangeDatatype () |
static MPI_Datatype | getGlobalCommunciationDatatype () |
static void | freeForkDatatype () |
static void | freeJoinDatatype () |
static void | freeBoundaryExchangeDatatype () |
static void | freeMultiscaleDataExchangeDatatype () |
static void | freeGlobalCommunciationDatatype () |
static void | initDatatype () |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation. | |
static void | shutdownDatatype () |
Free the underlying MPI datatype. | |
static void | send (const peano4::grid::GridVertex &buffer, int destination, int tag, MPI_Comm communicator) |
In DaStGen (the first version), I had a non-static version of the send as well as the receive. | |
static void | receive (peano4::grid::GridVertex &buffer, int source, int tag, MPI_Comm communicator) |
static void | send (const peano4::grid::GridVertex &buffer, int destination, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through. | |
static void | receive (peano4::grid::GridVertex &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator) |
static void | sendAndPollDanglingMessages (const peano4::grid::GridVertex &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
static void | receiveAndPollDanglingMessages (peano4::grid::GridVertex &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator()) |
Static Private Attributes | |
static MPI_Datatype | Datatype = MPI_DATATYPE_NULL |
Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype. | |
Definition at line 25 of file GridVertex.h.
Enumerator | |
---|---|
NoData |
Definition at line 173 of file GridVertex.h.
|
strong |
Enumerator | |
---|---|
HangingVertex | |
New | |
Unrefined | |
Refined | |
RefinementTriggered | |
Refining | |
EraseTriggered | |
Erasing | |
Delete |
Definition at line 27 of file GridVertex.h.
peano4::grid::GridVertex::GridVertex | ( | ) |
Definition at line 39 of file GridVertex.h.
peano4::grid::GridVertex::GridVertex | ( | State | __state, |
tarch::la::Vector< TwoPowerD, int > | __adjacentRanks, | ||
tarch::la::Vector< TwoPowerD, int > | __backupOfAdjacentRanks, | ||
bool | __hasBeenAntecessorOfRefinedVertexInPreviousTreeSweep, | ||
bool | __isAntecessorOfRefinedVertexInCurrentTreeSweep, | ||
bool | __hasBeenParentOfSubtreeVertexInPreviousTreeSweep, | ||
bool | __isParentOfSubtreeVertexInCurrentTreeSweep, | ||
int | __numberOfAdjacentRefinedLocalCells, | ||
tarch::la::Vector< Dimensions, double > | __x, | ||
int | __level ) |
Definition at line 6 of file GridVertex.cpp.
References setAdjacentRanks(), setBackupOfAdjacentRanks(), setHasBeenAntecessorOfRefinedVertexInPreviousTreeSweep(), setHasBeenParentOfSubtreeVertexInPreviousTreeSweep(), setIsAntecessorOfRefinedVertexInCurrentTreeSweep(), setIsParentOfSubtreeVertexInCurrentTreeSweep(), setLevel(), setNumberOfAdjacentRefinedLocalCells(), setState(), and setX().
peano4::grid::GridVertex::GridVertex | ( | const GridVertex & | copy | ) |
Definition at line 32 of file GridVertex.cpp.
References setLevel(), and setX().
peano4::grid::GridVertex::GridVertex | ( | ObjectConstruction | ) |
Definition at line 175 of file GridVertex.h.
|
static |
Definition at line 319 of file GridVertex.cpp.
|
static |
Definition at line 292 of file GridVertex.cpp.
|
static |
Definition at line 301 of file GridVertex.cpp.
|
static |
Definition at line 310 of file GridVertex.cpp.
|
static |
Definition at line 328 of file GridVertex.cpp.
tarch::la::Vector< TwoPowerD, int > peano4::grid::GridVertex::getAdjacentRanks | ( | ) | const |
Definition at line 110 of file GridVertex.cpp.
References TwoPowerD.
Referenced by peano4::grid::Spacetree::getNeighbourTrees(), peano4::grid::Spacetree::mergeGridVertexAdjacencyListsAtHorizontalDomainBoundary(), operator=(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtHorizontalBoundary(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtVerticalBoundary(), and peano4::grid::Spacetree::sendGridVertex().
Definition at line 128 of file GridVertex.cpp.
tarch::la::Vector< TwoPowerD, int > peano4::grid::GridVertex::getBackupOfAdjacentRanks | ( | ) | const |
Definition at line 138 of file GridVertex.cpp.
Referenced by peano4::grid::Spacetree::getNeighbourTrees(), and operator=().
Definition at line 148 of file GridVertex.cpp.
|
static |
Definition at line 280 of file GridVertex.cpp.
|
static |
Hands out MPI datatype if we work without the LLVM MPI extension.
If we work with this additional feature, this is the routine where the lazy initialisation is done and the datatype is also cached.
Definition at line 262 of file GridVertex.cpp.
|
static |
Definition at line 268 of file GridVertex.cpp.
bool peano4::grid::GridVertex::getHasBeenAntecessorOfRefinedVertexInPreviousTreeSweep | ( | ) | const |
Definition at line 158 of file GridVertex.cpp.
Referenced by operator=().
bool peano4::grid::GridVertex::getHasBeenParentOfSubtreeVertexInPreviousTreeSweep | ( | ) | const |
Definition at line 178 of file GridVertex.cpp.
Referenced by operator=().
bool peano4::grid::GridVertex::getIsAntecessorOfRefinedVertexInCurrentTreeSweep | ( | ) | const |
Definition at line 168 of file GridVertex.cpp.
Referenced by operator=(), and peano4::grid::Spacetree::updateVertexBeforeStore().
bool peano4::grid::GridVertex::getIsParentOfSubtreeVertexInCurrentTreeSweep | ( | ) | const |
Definition at line 188 of file GridVertex.cpp.
Referenced by operator=(), and peano4::grid::Spacetree::updateVertexBeforeStore().
|
static |
Definition at line 274 of file GridVertex.cpp.
int peano4::grid::GridVertex::getLevel | ( | ) | const |
Definition at line 240 of file GridVertex.cpp.
Referenced by operator=().
|
static |
Definition at line 286 of file GridVertex.cpp.
int peano4::grid::GridVertex::getNumberOfAdjacentRefinedLocalCells | ( | ) | const |
Definition at line 198 of file GridVertex.cpp.
Referenced by operator=(), and peano4::grid::Spacetree::updateVertexBeforeStore().
int peano4::grid::GridVertex::getSenderRank | ( | ) | const |
Definition at line 336 of file GridVertex.cpp.
peano4::grid::GridVertex::State peano4::grid::GridVertex::getState | ( | ) | const |
Definition at line 100 of file GridVertex.cpp.
References _state().
Referenced by peano4::grid::hasVertexBeenRefined(), peano4::grid::Spacetree::isVertexAdjacentToLocalSpacetree(), operator=(), peano4::grid::Spacetree::shouldEraseAdjacencyInformation(), peano4::grid::Spacetree::updateVertexBeforeStore(), and peano4::grid::willVertexBeRefined().
|
static |
Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.
Definition at line 341 of file GridVertex.cpp.
References _state(), and TwoPowerD.
Referenced by peano4::parallel::Node::initMPIDatatypes().
peano4::grid::GridVertex & peano4::grid::GridVertex::operator= | ( | const GridVertex & | other | ) |
Definition at line 47 of file GridVertex.cpp.
References getAdjacentRanks(), getBackupOfAdjacentRanks(), getHasBeenAntecessorOfRefinedVertexInPreviousTreeSweep(), getHasBeenParentOfSubtreeVertexInPreviousTreeSweep(), getIsAntecessorOfRefinedVertexInCurrentTreeSweep(), getIsParentOfSubtreeVertexInCurrentTreeSweep(), getLevel(), getNumberOfAdjacentRefinedLocalCells(), getState(), setLevel(), and setX().
|
static |
Definition at line 475 of file GridVertex.cpp.
References _senderDestinationRank.
Referenced by receiveAndPollDanglingMessages().
|
static |
Definition at line 502 of file GridVertex.cpp.
References _senderDestinationRank.
|
static |
Definition at line 542 of file GridVertex.cpp.
References tarch::mpi::Rank::getInstance(), tarch::services::ServiceRepository::getInstance(), receive(), tarch::services::ServiceRepository::receiveDanglingMessages(), tarch::mpi::Rank::setDeadlockTimeOutTimeStamp(), tarch::mpi::Rank::setDeadlockWarningTimeStamp(), tarch::mpi::Rank::triggerDeadlockTimeOut(), and tarch::mpi::Rank::writeTimeOutWarning().
|
static |
In DaStGen (the first version), I had a non-static version of the send as well as the receive.
However, this did not work with newer C++11 versions, as a member function using this as pointer usually doesn't see the vtable while the init sees the object from outside, i.e. including a vtable. So this routine now is basically an alias for a blocking MPI_Send.
Definition at line 470 of file GridVertex.cpp.
Referenced by sendAndPollDanglingMessages().
|
static |
Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.
In systems with heavy MPI usage, this can help to avoid deadlocks.
Definition at line 482 of file GridVertex.cpp.
|
static |
Definition at line 525 of file GridVertex.cpp.
References tarch::mpi::Rank::getInstance(), tarch::services::ServiceRepository::getInstance(), tarch::services::ServiceRepository::receiveDanglingMessages(), send(), tarch::mpi::Rank::setDeadlockTimeOutTimeStamp(), tarch::mpi::Rank::setDeadlockWarningTimeStamp(), tarch::mpi::Rank::triggerDeadlockTimeOut(), and tarch::mpi::Rank::writeTimeOutWarning().
void peano4::grid::GridVertex::setAdjacentRanks | ( | const tarch::la::Vector< TwoPowerD, int > & | value | ) |
Definition at line 120 of file GridVertex.cpp.
References TwoPowerD.
Referenced by peano4::grid::createVertex(), GridVertex(), peano4::grid::Spacetree::mergeGridVertexAdjacencyListsAtHorizontalDomainBoundary(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtVerticalBoundary(), peano4::grid::Spacetree::sendGridVertex(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal1(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal2(), peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateGenericCellTraversalEvent1(), peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateLeaveCellTraversalEvent1(), peano4::grid::tests::SpacetreeTest::testGetAdjacentDomainIds(), peano4::grid::Spacetree::traverse(), and peano4::grid::Spacetree::updateVertexBeforeStore().
Definition at line 133 of file GridVertex.cpp.
void peano4::grid::GridVertex::setBackupOfAdjacentRanks | ( | const tarch::la::Vector< TwoPowerD, int > & | value | ) |
Definition at line 143 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), GridVertex(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtHorizontalBoundary(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal1(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal2(), peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateGenericCellTraversalEvent1(), and peano4::grid::tests::SpacetreeTest::testGetAdjacentDomainIds().
Definition at line 153 of file GridVertex.cpp.
Definition at line 163 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), GridVertex(), and peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateLeaveCellTraversalEvent1().
Definition at line 183 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), GridVertex(), and peano4::grid::Spacetree::traverse().
Definition at line 173 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), GridVertex(), and peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateLeaveCellTraversalEvent1().
Definition at line 193 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), and GridVertex().
Definition at line 245 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), GridVertex(), and peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateLeaveCellTraversalEvent1().
Definition at line 203 of file GridVertex.cpp.
Referenced by peano4::grid::createVertex(), and GridVertex().
Definition at line 105 of file GridVertex.cpp.
References _state().
Referenced by peano4::grid::createVertex(), GridVertex(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal1(), peano4::grid::tests::GridTraversalEventGeneratorTest::testAreFacesLocal2(), peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateGenericCellTraversalEvent1(), peano4::grid::tests::GridTraversalEventGeneratorTest::testCreateLeaveCellTraversalEvent1(), peano4::grid::tests::SpacetreeTest::testGetAdjacentDomainIds(), peano4::grid::tests::GridTraversalEventGeneratorTest::testGetFaceType(), and peano4::grid::Spacetree::updateVertexBeforeStore().
|
static |
Free the underlying MPI datatype.
Definition at line 456 of file GridVertex.cpp.
Referenced by peano4::parallel::Node::shutdownMPIDatatypes().
std::string peano4::grid::GridVertex::toString | ( | ) | const |
Definition at line 68 of file GridVertex.cpp.
References _state().
Referenced by peano4::grid::Spacetree::mergeGridVertexAdjacencyListsAtHorizontalDomainBoundary(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtHorizontalBoundary(), peano4::grid::Spacetree::receiveAndMergeGridVertexAtVerticalBoundary(), peano4::grid::Spacetree::sendGridVertex(), peano4::grid::Spacetree::shouldEraseAdjacencyInformation(), and peano4::grid::Spacetree::updateVertexBeforeStore().
|
private |
Definition at line 201 of file GridVertex.h.
|
private |
Definition at line 203 of file GridVertex.h.
|
private |
Definition at line 204 of file GridVertex.h.
|
private |
Definition at line 206 of file GridVertex.h.
|
private |
Definition at line 205 of file GridVertex.h.
|
private |
Definition at line 207 of file GridVertex.h.
|
private |
Definition at line 218 of file GridVertex.h.
|
private |
Definition at line 208 of file GridVertex.h.
|
private |
Definition at line 222 of file GridVertex.h.
|
private |
Definition at line 196 of file GridVertex.h.
|
staticprivate |
Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.
However, Peano calls init explicitly in most cases. Without the LLVM extension which caches the MPI datatype once constructed, this field stores the type.
Definition at line 231 of file GridVertex.h.