Peano 4
Loading...
Searching...
No Matches
peano4::grid::GridStatistics Struct Reference

#include <GridStatistics.h>

Collaboration diagram for peano4::grid::GridStatistics:

Public Types

enum  ObjectConstruction { NoData }
 

Public Member Functions

 GridStatistics ()
 
 GridStatistics (int __numberOfLocalUnrefinedCells, int __numberOfRemoteUnrefinedCells, int __numberOfLocalRefinedCells, int __numberOfRemoteRefinedCells, int __stationarySweeps, bool __coarseningHasBeenVetoed, bool __removedEmptySubtree, tarch::la::Vector< Dimensions, double > __minH)
 
int getNumberOfLocalUnrefinedCells () const
 
void setNumberOfLocalUnrefinedCells (int value)
 
int getNumberOfRemoteUnrefinedCells () const
 
void setNumberOfRemoteUnrefinedCells (int value)
 
int getNumberOfLocalRefinedCells () const
 
void setNumberOfLocalRefinedCells (int value)
 
int getNumberOfRemoteRefinedCells () const
 
void setNumberOfRemoteRefinedCells (int value)
 
int getStationarySweeps () const
 
void setStationarySweeps (int value)
 
bool getCoarseningHasBeenVetoed () const
 
void setCoarseningHasBeenVetoed (bool value)
 
bool getRemovedEmptySubtree () const
 
void setRemovedEmptySubtree (bool value)
 
tarch::la::Vector< Dimensions, double > getMinH () const
 
void setMinH (const tarch::la::Vector< Dimensions, double > &value)
 
double getMinH (int index) const
 
void setMinH (int index, double value)
 
 GridStatistics (const GridStatistics &copy)=default
 
PragmaPop int getSenderRank () const
 
 GridStatistics (ObjectConstruction)
 
std::string toString () const
 

Static Public Member Functions

PragmaPush static SilenceUnknownAttribute 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 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::GridStatistics &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::GridStatistics &buffer, int source, int tag, MPI_Comm communicator)
 
static void send (const peano4::grid::GridStatistics &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::GridStatistics &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator)
 
static void sendAndPollDanglingMessages (const peano4::grid::GridStatistics &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
 
static void receiveAndPollDanglingMessages (peano4::grid::GridStatistics &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
 

Private Attributes

PragmaPush SilenceUnknownAttribute int _numberOfLocalUnrefinedCells
 
int _numberOfRemoteUnrefinedCells
 
int _numberOfLocalRefinedCells
 
int _numberOfRemoteRefinedCells
 
int _stationarySweeps
 
bool _coarseningHasBeenVetoed
 
bool _removedEmptySubtree
 
tarch::la::Vector< Dimensions, double > _minH
 
int _senderDestinationRank
 

Static Private Attributes

static MPI_Datatype Datatype
 Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.
 

Detailed Description

Definition at line 33 of file GridStatistics.h.

Member Enumeration Documentation

◆ ObjectConstruction

Enumerator
NoData 

Definition at line 122 of file GridStatistics.h.

Constructor & Destructor Documentation

◆ GridStatistics() [1/4]

peano4::grid::GridStatistics::GridStatistics ( )

Definition at line 35 of file GridStatistics.h.

◆ GridStatistics() [2/4]

peano4::grid::GridStatistics::GridStatistics ( int __numberOfLocalUnrefinedCells,
int __numberOfRemoteUnrefinedCells,
int __numberOfLocalRefinedCells,
int __numberOfRemoteRefinedCells,
int __stationarySweeps,
bool __coarseningHasBeenVetoed,
bool __removedEmptySubtree,
tarch::la::Vector< Dimensions, double > __minH )

◆ GridStatistics() [3/4]

peano4::grid::GridStatistics::GridStatistics ( const GridStatistics & copy)
default

◆ GridStatistics() [4/4]

peano4::grid::GridStatistics::GridStatistics ( ObjectConstruction )

Definition at line 126 of file GridStatistics.h.

Member Function Documentation

◆ getBoundaryExchangeDatatype()

MPI_Datatype peano4::grid::GridStatistics::getBoundaryExchangeDatatype ( )
static

Definition at line 133 of file GridStatistics.cpp.

◆ getCoarseningHasBeenVetoed()

bool peano4::grid::GridStatistics::getCoarseningHasBeenVetoed ( ) const

Definition at line 79 of file GridStatistics.cpp.

Referenced by peano4::parallel::SpacetreeSet::cleanUpTrees(), and operator+().

Here is the caller graph for this function:

◆ getForkDatatype()

MPI_Datatype peano4::grid::GridStatistics::getForkDatatype ( )
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 118 of file GridStatistics.cpp.

◆ getGlobalCommunciationDatatype()

MPI_Datatype peano4::grid::GridStatistics::getGlobalCommunciationDatatype ( )
static

Definition at line 123 of file GridStatistics.cpp.

◆ getJoinDatatype()

MPI_Datatype peano4::grid::GridStatistics::getJoinDatatype ( )
static

Definition at line 128 of file GridStatistics.cpp.

◆ getMinH() [1/2]

tarch::la::Vector< Dimensions, double > peano4::grid::GridStatistics::getMinH ( ) const

Definition at line 95 of file GridStatistics.cpp.

References _minH().

Referenced by swift2::timestepping::computeAdmissibleTimeStepSizeFromGlobalMeshSizeAndMaximumVelocity(), operator+(), and selectNextAlgorithmicStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMinH() [2/2]

double peano4::grid::GridStatistics::getMinH ( int index) const

Definition at line 103 of file GridStatistics.cpp.

References _minH().

Here is the call graph for this function:

◆ getMultiscaleDataExchangeDatatype()

MPI_Datatype peano4::grid::GridStatistics::getMultiscaleDataExchangeDatatype ( )
static

Definition at line 138 of file GridStatistics.cpp.

◆ getNumberOfLocalRefinedCells()

int peano4::grid::GridStatistics::getNumberOfLocalRefinedCells ( ) const

Definition at line 55 of file GridStatistics.cpp.

Referenced by operator+().

Here is the caller graph for this function:

◆ getNumberOfLocalUnrefinedCells()

◆ getNumberOfRemoteRefinedCells()

int peano4::grid::GridStatistics::getNumberOfRemoteRefinedCells ( ) const

Definition at line 63 of file GridStatistics.cpp.

Referenced by operator+().

Here is the caller graph for this function:

◆ getNumberOfRemoteUnrefinedCells()

int peano4::grid::GridStatistics::getNumberOfRemoteUnrefinedCells ( ) const

Definition at line 47 of file GridStatistics.cpp.

Referenced by toolbox::loadbalancing::dumpStatistics(), and operator+().

Here is the caller graph for this function:

◆ getRemovedEmptySubtree()

bool peano4::grid::GridStatistics::getRemovedEmptySubtree ( ) const

Definition at line 87 of file GridStatistics.cpp.

Referenced by operator+(), and toolbox::loadbalancing::Blacklist::update().

Here is the caller graph for this function:

◆ getSenderRank()

int peano4::grid::GridStatistics::getSenderRank ( ) const
Returns
The rank of the sender of an object. It only make ssense to call this routine after you've invoked receive with MPI_ANY_SOURCE.

Definition at line 142 of file GridStatistics.cpp.

◆ getStationarySweeps()

int peano4::grid::GridStatistics::getStationarySweeps ( ) const

Definition at line 71 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and operator+().

Here is the caller graph for this function:

◆ initDatatype()

void peano4::grid::GridStatistics::initDatatype ( )
static

Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.

Definition at line 146 of file GridStatistics.cpp.

References _minH().

Referenced by peano4::parallel::Node::initMPIDatatypes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive() [1/2]

void peano4::grid::GridStatistics::receive ( peano4::grid::GridStatistics & buffer,
int source,
int tag,
MPI_Comm communicator )
static

Definition at line 264 of file GridStatistics.cpp.

References _senderDestinationRank.

Referenced by receiveAndPollDanglingMessages().

Here is the caller graph for this function:

◆ receive() [2/2]

void peano4::grid::GridStatistics::receive ( peano4::grid::GridStatistics & buffer,
int source,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
static

Definition at line 289 of file GridStatistics.cpp.

References _senderDestinationRank.

◆ receiveAndPollDanglingMessages()

◆ send() [1/2]

void peano4::grid::GridStatistics::send ( const peano4::grid::GridStatistics & buffer,
int destination,
int tag,
MPI_Comm communicator )
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 260 of file GridStatistics.cpp.

Referenced by sendAndPollDanglingMessages().

Here is the caller graph for this function:

◆ send() [2/2]

void peano4::grid::GridStatistics::send ( const peano4::grid::GridStatistics & buffer,
int destination,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
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 270 of file GridStatistics.cpp.

◆ sendAndPollDanglingMessages()

◆ setCoarseningHasBeenVetoed()

void peano4::grid::GridStatistics::setCoarseningHasBeenVetoed ( bool value)

Definition at line 83 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setMinH() [1/2]

void peano4::grid::GridStatistics::setMinH ( const tarch::la::Vector< Dimensions, double > & value)

Definition at line 99 of file GridStatistics.cpp.

References _minH().

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMinH() [2/2]

void peano4::grid::GridStatistics::setMinH ( int index,
double value )

Definition at line 107 of file GridStatistics.cpp.

References _minH().

Here is the call graph for this function:

◆ setNumberOfLocalRefinedCells()

void peano4::grid::GridStatistics::setNumberOfLocalRefinedCells ( int value)

Definition at line 59 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setNumberOfLocalUnrefinedCells()

void peano4::grid::GridStatistics::setNumberOfLocalUnrefinedCells ( int value)

Definition at line 43 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setNumberOfRemoteRefinedCells()

void peano4::grid::GridStatistics::setNumberOfRemoteRefinedCells ( int value)

Definition at line 67 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setNumberOfRemoteUnrefinedCells()

void peano4::grid::GridStatistics::setNumberOfRemoteUnrefinedCells ( int value)

Definition at line 51 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setRemovedEmptySubtree()

void peano4::grid::GridStatistics::setRemovedEmptySubtree ( bool value)

Definition at line 91 of file GridStatistics.cpp.

Referenced by peano4::parallel::SpacetreeSet::cleanUpTrees(), peano4::grid::clear(), and GridStatistics().

Here is the caller graph for this function:

◆ setStationarySweeps()

void peano4::grid::GridStatistics::setStationarySweeps ( int value)

Definition at line 75 of file GridStatistics.cpp.

Referenced by peano4::grid::clear(), GridStatistics(), peano4::grid::Spacetree::Spacetree(), and peano4::grid::Spacetree::Spacetree().

Here is the caller graph for this function:

◆ shutdownDatatype()

void peano4::grid::GridStatistics::shutdownDatatype ( )
static

Free the underlying MPI datatype.

Definition at line 241 of file GridStatistics.cpp.

Referenced by peano4::parallel::Node::shutdownMPIDatatypes().

Here is the caller graph for this function:

◆ toString()

std::string peano4::grid::GridStatistics::toString ( ) const

Definition at line 17 of file GridStatistics.cpp.

References _minH().

Referenced by peano4::parallel::SpacetreeSet::getGridStatistics().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ _coarseningHasBeenVetoed

bool peano4::grid::GridStatistics::_coarseningHasBeenVetoed
private

Definition at line 145 of file GridStatistics.h.

◆ _minH

tarch::la::Vector<Dimensions,double> peano4::grid::GridStatistics::_minH
private

Definition at line 147 of file GridStatistics.h.

◆ _numberOfLocalRefinedCells

int peano4::grid::GridStatistics::_numberOfLocalRefinedCells
private

Definition at line 142 of file GridStatistics.h.

◆ _numberOfLocalUnrefinedCells

PragmaPush SilenceUnknownAttribute int peano4::grid::GridStatistics::_numberOfLocalUnrefinedCells
private

Definition at line 140 of file GridStatistics.h.

◆ _numberOfRemoteRefinedCells

int peano4::grid::GridStatistics::_numberOfRemoteRefinedCells
private

Definition at line 143 of file GridStatistics.h.

◆ _numberOfRemoteUnrefinedCells

int peano4::grid::GridStatistics::_numberOfRemoteUnrefinedCells
private

Definition at line 141 of file GridStatistics.h.

◆ _removedEmptySubtree

bool peano4::grid::GridStatistics::_removedEmptySubtree
private

Definition at line 146 of file GridStatistics.h.

◆ _senderDestinationRank

int peano4::grid::GridStatistics::_senderDestinationRank
private

Definition at line 152 of file GridStatistics.h.

Referenced by receive(), and receive().

◆ _stationarySweeps

int peano4::grid::GridStatistics::_stationarySweeps
private

Definition at line 144 of file GridStatistics.h.

◆ Datatype

MPI_Datatype peano4::grid::GridStatistics::Datatype
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 161 of file GridStatistics.h.


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