Peano
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 __numberOfRefiningVertices, int __numberOfErasingVertices, int __numberOfRefinementTriggeredVertices, int __numberOfEraseTriggeredVertices, bool __eraseCommandHasBeenVetoed, 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 getNumberOfRefiningVertices () const
void setNumberOfRefiningVertices (int value)
int getNumberOfErasingVertices () const
void setNumberOfErasingVertices (int value)
int getNumberOfRefinementTriggeredVertices () const
void setNumberOfRefinementTriggeredVertices (int value)
int getNumberOfEraseTriggeredVertices () const
void setNumberOfEraseTriggeredVertices (int value)
bool getEraseCommandHasBeenVetoed () const
void setEraseCommandHasBeenVetoed (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
int getSenderRank () const
 GridStatistics (ObjectConstruction)
std::string toString () const

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::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

int _numberOfLocalUnrefinedCells
int _numberOfRemoteUnrefinedCells
int _numberOfLocalRefinedCells
int _numberOfRemoteRefinedCells
int _numberOfRefiningVertices
int _numberOfErasingVertices
int _numberOfRefinementTriggeredVertices
int _numberOfEraseTriggeredVertices
bool _eraseCommandHasBeenVetoed
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 43 of file GridStatistics.h.

Member Enumeration Documentation

◆ ObjectConstruction

Enumerator
NoData 

Definition at line 154 of file GridStatistics.h.

Constructor & Destructor Documentation

◆ GridStatistics() [1/4]

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

Definition at line 47 of file GridStatistics.h.

Referenced by GridStatistics(), and GridStatistics().

Here is the caller graph for this function:

◆ GridStatistics() [2/4]

peano4::grid::GridStatistics::GridStatistics ( int __numberOfLocalUnrefinedCells,
int __numberOfRemoteUnrefinedCells,
int __numberOfLocalRefinedCells,
int __numberOfRemoteRefinedCells,
int __numberOfRefiningVertices,
int __numberOfErasingVertices,
int __numberOfRefinementTriggeredVertices,
int __numberOfEraseTriggeredVertices,
bool __eraseCommandHasBeenVetoed,
bool __removedEmptySubtree,
tarch::la::Vector< Dimensions, double > __minH )

◆ GridStatistics() [3/4]

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

References GridStatistics().

Here is the call graph for this function:

◆ GridStatistics() [4/4]

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

Definition at line 158 of file GridStatistics.h.

References GridStatistics().

Here is the call graph for this function:

Member Function Documentation

◆ freeBoundaryExchangeDatatype()

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

◆ freeForkDatatype()

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

◆ freeGlobalCommunciationDatatype()

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

◆ freeJoinDatatype()

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

◆ freeMultiscaleDataExchangeDatatype()

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

◆ getBoundaryExchangeDatatype()

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

◆ getEraseCommandHasBeenVetoed()

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

◆ 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.

◆ getGlobalCommunciationDatatype()

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

◆ getJoinDatatype()

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

◆ getMinH() [1/2]

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

◆ getMinH() [2/2]

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

◆ getMultiscaleDataExchangeDatatype()

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

◆ getNumberOfEraseTriggeredVertices()

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

◆ getNumberOfErasingVertices()

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

◆ getNumberOfLocalRefinedCells()

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

◆ getNumberOfLocalUnrefinedCells()

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

◆ getNumberOfRefinementTriggeredVertices()

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

◆ getNumberOfRefiningVertices()

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

◆ getNumberOfRemoteRefinedCells()

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

◆ getNumberOfRemoteUnrefinedCells()

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

◆ getRemovedEmptySubtree()

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

◆ 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.

◆ initDatatype()

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

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

◆ receive() [1/2]

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

◆ 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

◆ receiveAndPollDanglingMessages()

void peano4::grid::GridStatistics::receiveAndPollDanglingMessages ( peano4::grid::GridStatistics & message,
int source,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ 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.

◆ 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.

◆ sendAndPollDanglingMessages()

void peano4::grid::GridStatistics::sendAndPollDanglingMessages ( const peano4::grid::GridStatistics & message,
int destination,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ setEraseCommandHasBeenVetoed()

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

◆ setMinH() [1/2]

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

◆ setMinH() [2/2]

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

◆ setNumberOfEraseTriggeredVertices()

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

◆ setNumberOfErasingVertices()

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

◆ setNumberOfLocalRefinedCells()

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

◆ setNumberOfLocalUnrefinedCells()

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

◆ setNumberOfRefinementTriggeredVertices()

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

◆ setNumberOfRefiningVertices()

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

◆ setNumberOfRemoteRefinedCells()

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

◆ setNumberOfRemoteUnrefinedCells()

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

◆ setRemovedEmptySubtree()

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

◆ shutdownDatatype()

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

Free the underlying MPI datatype.

◆ toString()

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

Field Documentation

◆ _eraseCommandHasBeenVetoed

bool peano4::grid::GridStatistics::_eraseCommandHasBeenVetoed
private

Definition at line 178 of file GridStatistics.h.

◆ _minH

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

Definition at line 180 of file GridStatistics.h.

◆ _numberOfEraseTriggeredVertices

int peano4::grid::GridStatistics::_numberOfEraseTriggeredVertices
private

Definition at line 177 of file GridStatistics.h.

◆ _numberOfErasingVertices

int peano4::grid::GridStatistics::_numberOfErasingVertices
private

Definition at line 175 of file GridStatistics.h.

◆ _numberOfLocalRefinedCells

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

Definition at line 172 of file GridStatistics.h.

◆ _numberOfLocalUnrefinedCells

int peano4::grid::GridStatistics::_numberOfLocalUnrefinedCells
private

Definition at line 170 of file GridStatistics.h.

◆ _numberOfRefinementTriggeredVertices

int peano4::grid::GridStatistics::_numberOfRefinementTriggeredVertices
private

Definition at line 176 of file GridStatistics.h.

◆ _numberOfRefiningVertices

int peano4::grid::GridStatistics::_numberOfRefiningVertices
private

Definition at line 174 of file GridStatistics.h.

◆ _numberOfRemoteRefinedCells

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

Definition at line 173 of file GridStatistics.h.

◆ _numberOfRemoteUnrefinedCells

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

Definition at line 171 of file GridStatistics.h.

◆ _removedEmptySubtree

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

Definition at line 179 of file GridStatistics.h.

◆ _senderDestinationRank

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

Definition at line 186 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 195 of file GridStatistics.h.


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