OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
#include <problemcomm.h>
Public Member Functions | |
NodeCommunicator (EngngModel *emodel, CommunicatorBuff *b, int rank, int size) | |
virtual | ~NodeCommunicator () |
virtual void | setUpCommunicationMaps (EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit=false) |
Service for setting up the communication patterns with other remote process. More... | |
virtual int | setProcessCommunicatorToSendArry (ProcessCommunicator *processComm, IntArray &map) |
Assigns given map to given process communicator. More... | |
virtual int | setProcessCommunicatorToRecvArry (ProcessCommunicator *processComm, IntArray &map) |
Assigns given map to given process communicator. More... | |
Public Member Functions inherited from oofem::ProblemCommunicator | |
ProblemCommunicator (EngngModel *emodel, CommunicatorBuff *b, int rank, int size) | |
Constructor. More... | |
virtual | ~ProblemCommunicator () |
Destructor. More... | |
int | DofManCmp (int, int) |
Global dofManager number comparison function. More... | |
int | ElemCmp (int, int) |
Global element comparison function. More... | |
Public Member Functions inherited from oofem::Communicator | |
Communicator (EngngModel *emodel, CommunicatorBuff *buff, int rank, int size, CommunicatorMode mode=CommMode_Static) | |
Constructor. More... | |
virtual | ~Communicator () |
Destructor. More... | |
ProcessCommunicator * | giveProcessCommunicator (int i) |
Returns i-th problem communicator. More... | |
template<class T > | |
int | packAllData (T *ptr, int(T::*packFunc)(ProcessCommunicator &)) |
Pack all problemCommunicators data to their send buffers. More... | |
template<class T , class P > | |
int | packAllData (T *ptr, P *src, int(T::*packFunc)(P *, ProcessCommunicator &)) |
Pack all problemCommuncators data to their send buffers. More... | |
template<class T > | |
int | unpackAllData (T *ptr, int(T::*unpackFunc)(ProcessCommunicator &)) |
Unpack all problemCommuncators data from recv buffers. More... | |
template<class T , class P > | |
int | unpackAllData (T *ptr, P *src, int(T::*unpackFunc)(P *, ProcessCommunicator &)) |
Unpack all problemCommuncators data from recv buffers. More... | |
int | initExchange (int tag) |
Initializes data exchange with all problems. More... | |
int | initSend (int tag) |
Initializes data send exchange with all problems. More... | |
int | initReceive (int tag) |
Initializes data receive exchange with all problems. More... | |
int | finishExchange () |
Finishes the exchange. More... | |
void | clearBuffers () |
Clears all buffer content. More... | |
virtual void | setUpCommunicationMaps (EngngModel *pm) |
Service for setting up the communication patterns with other remote processes. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oofem::ProblemCommunicator | |
void | sortCommMap (IntArray &map, int(ProblemCommunicator::*cmp)(int, int)) |
Sorts given communication map, containing local DofManager numbers according to their corresponding global numbers. More... | |
void | quickSortCommMap (IntArray &map, int l, int r, int(ProblemCommunicator::*cmp)(int, int)) |
Implementation of quicksort algorithm. More... | |
int | quickSortPartition (IntArray &map, int l, int r, int(ProblemCommunicator::*cmp)(int, int)) |
Partitioning used in quicksort. More... | |
Protected Attributes inherited from oofem::ProblemCommunicator | |
bool | initialized |
Protected Attributes inherited from oofem::Communicator | |
int | rank |
Rank of process. More... | |
int | size |
Number of processes. More... | |
ProcessCommunicator ** | processComms |
Array of process communicators. More... | |
EngngModel * | engngModel |
Engineering model. More... | |
CommunicatorMode | mode |
Mode. More... | |
Definition at line 118 of file problemcomm.h.
oofem::NodeCommunicator::NodeCommunicator | ( | EngngModel * | emodel, |
CommunicatorBuff * | b, | ||
int | rank, | ||
int | size | ||
) |
Definition at line 60 of file problemcomm.C.
|
inlinevirtual |
Definition at line 122 of file problemcomm.h.
|
virtual |
Assigns given map to given process communicator.
Sorts map according to global entity (dofmanagers or element) numbers to ensure, that local and corresponding remote process have the identical map with same ordering. This will ensure proper packing/unpacking order. The corresponding processCommunicator buffer takes care about resizing itself accordingly to hold all outgoing/incoming data using engngModel->estimateMaxPackSize service.
processComm | Process comm which received map will be set. |
map | Received map. |
Implements oofem::ProblemCommunicator.
Definition at line 377 of file problemcomm.C.
References oofem::ProblemCommunicator::DofManCmp(), oofem::Communicator::engngModel, oofem::ProcessCommunicator::setToRecvArry(), and oofem::ProblemCommunicator::sortCommMap().
|
virtual |
Assigns given map to given process communicator.
Sorts map according to global entity (dofmanagers or element) numbers to ensure, that local and corresponding remote process have the identical map with same ordering. This will ensure proper packing/unpacking order. The corresponding processCommunicator buffer takes care about resizing itself accordingly to hold all outgoing/incoming data using engngModel->estimateMaxPackSize service.
processComm | Domain comm which send map will be set. |
map | Send map. |
Implements oofem::ProblemCommunicator.
Definition at line 369 of file problemcomm.C.
References oofem::ProblemCommunicator::DofManCmp(), oofem::Communicator::engngModel, oofem::ProcessCommunicator::setToSendArry(), and oofem::ProblemCommunicator::sortCommMap().
|
virtual |
Service for setting up the communication patterns with other remote process.
Sets up the toSend and toRecv attributes in associated process communicators.
emodel | Associated engineering model. |
excludeSelfCommFlag | If set to true, the communication map of receiver with itself will be forced to be empty, otherwise it will be assembled. |
forceReinit | Forces reinitilaization. |
Implements oofem::ProblemCommunicator.
Definition at line 69 of file problemcomm.C.
References oofem::IntArray::at(), oofem::DofManager_shared, oofem::Domain::giveDofManager(), oofem::EngngModel::giveDomain(), oofem::Domain::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::DofManager::givePartitionList(), oofem::Communicator::giveProcessCommunicator(), oofem::IntArray::giveSize(), oofem::ProblemCommunicator::initialized, oofem::Communicator::rank, oofem::ElementCommunicator::setProcessCommunicatorToRecvArry(), oofem::ElementCommunicator::setProcessCommunicatorToSendArry(), oofem::Communicator::size, and VERBOSEPARALLEL_PRINT.