|
OOFEM 3.0
|
#include <problemcomm.h>
Public Member Functions | |
| ProblemCommunicator (EngngModel *emodel, CommunicatorBuff *b, int rank, int size) | |
| virtual | ~ProblemCommunicator () |
| Destructor. | |
| virtual void | setUpCommunicationMaps (EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit=false)=0 |
| virtual int | setProcessCommunicatorToSendArry (ProcessCommunicator *processComm, IntArray &map)=0 |
| virtual int | setProcessCommunicatorToRecvArry (ProcessCommunicator *processComm, IntArray &map)=0 |
| int | DofManCmp (int, int) |
| Global dofManager number comparison function. | |
| int | ElemCmp (int, int) |
| Global element comparison function. | |
| Public Member Functions inherited from oofem::Communicator | |
| Communicator (EngngModel *emodel, CommunicatorBuff *buff, int rank, int size, CommunicatorMode mode=CommMode_Static) | |
| virtual | ~Communicator () |
| Destructor. | |
| ProcessCommunicator * | giveProcessCommunicator (int i) |
| template<class T> | |
| int | packAllData (T *ptr, int(T ::*packFunc)(ProcessCommunicator &)) |
| template<class T, class P> | |
| int | packAllData (T *ptr, P *src, int(T ::*packFunc)(P *, ProcessCommunicator &)) |
| template<class T> | |
| int | unpackAllData (T *ptr, int(T ::*unpackFunc)(ProcessCommunicator &)) |
| template<class T, class P> | |
| int | unpackAllData (T *ptr, P *src, int(T ::*unpackFunc)(P *, ProcessCommunicator &)) |
| int | initExchange (int tag) |
| int | initSend (int tag) |
| int | initReceive (int tag) |
| int | finishExchange () |
| void | clearBuffers () |
| virtual void | setUpCommunicationMaps (EngngModel *pm) |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
Protected Member Functions | |
| void | sortCommMap (IntArray &map, int(ProblemCommunicator ::*cmp)(int, int)) |
| void | quickSortCommMap (IntArray &map, int l, int r, int(ProblemCommunicator ::*cmp)(int, int)) |
| Implementation of quicksort algorithm. | |
| int | quickSortPartition (IntArray &map, int l, int r, int(ProblemCommunicator ::*cmp)(int, int)) |
| Partitioning used in quicksort. | |
Protected Attributes | |
| bool | initialized |
| Protected Attributes inherited from oofem::Communicator | |
| int | rank |
| Rank of process. | |
| std::vector< ProcessCommunicator > | processComms |
| Array of process communicators. | |
| EngngModel * | engngModel |
| Engineering model. | |
| CommunicatorMode | mode |
| Mode. | |
Class representing communicator for engng model. It is assumed to be an attribute of an engineering model. The communicator provides all services for communication with associated remote partitions. It manages several process communicators.
Definition at line 50 of file problemcomm.h.
| oofem::ProblemCommunicator::ProblemCommunicator | ( | EngngModel * | emodel, |
| CommunicatorBuff * | b, | ||
| int | rank, | ||
| int | size ) |
Constructor.
| emodel | Associated engineering model. |
| b | Buffer object. |
| rank | Rank of associated partition. |
| size | Number of collaborating processes. |
Definition at line 49 of file problemcomm.C.
References oofem::Communicator::Communicator(), initialized, and oofem::Communicator::rank.
Referenced by oofem::ElementCommunicator::ElementCommunicator(), oofem::NodeCommunicator::NodeCommunicator(), quickSortCommMap(), quickSortPartition(), setProcessCommunicatorToRecvArry(), and sortCommMap().
|
virtual |
Destructor.
Definition at line 56 of file problemcomm.C.
| int oofem::ProblemCommunicator::DofManCmp | ( | int | i, |
| int | j ) |
Global dofManager number comparison function.
Definition at line 452 of file problemcomm.C.
References oofem::Communicator::engngModel.
Referenced by setProcessCommunicatorToRecvArry().
| int oofem::ProblemCommunicator::ElemCmp | ( | int | i, |
| int | j ) |
Global element comparison function.
Definition at line 458 of file problemcomm.C.
References oofem::Communicator::engngModel.
Referenced by setProcessCommunicatorToRecvArry().
|
protected |
Implementation of quicksort algorithm.
Definition at line 410 of file problemcomm.C.
References ProblemCommunicator(), quickSortCommMap(), and oofem::quickSortPartition().
Referenced by quickSortCommMap(), setProcessCommunicatorToRecvArry(), and sortCommMap().
|
protected |
Partitioning used in quicksort.
Definition at line 423 of file problemcomm.C.
References oofem::IntArray::at(), and ProblemCommunicator().
Referenced by setProcessCommunicatorToRecvArry().
|
pure 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. |
Implemented in oofem::ElementCommunicator, and oofem::NodeCommunicator.
References DofManCmp(), ElemCmp(), ProblemCommunicator(), quickSortCommMap(), quickSortPartition(), and sortCommMap().
|
pure 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. |
Implemented in oofem::ElementCommunicator, and oofem::NodeCommunicator.
|
pure 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. |
Implemented in oofem::ElementCommunicator, and oofem::NodeCommunicator.
|
protected |
Sorts given communication map, containing local DofManager numbers according to their corresponding global numbers. It could not be sorted by standard techniques, because it is necessary to ask DofMAnager form domain and determine its global Number.
| map | Map to sort. |
| cmp | Comparison function must return a negative value if first argument is less than the second, zero if the arguments are equal, and a positive number otherwise. |
Definition at line 403 of file problemcomm.C.
References oofem::IntArray::giveSize(), ProblemCommunicator(), and quickSortCommMap().
Referenced by oofem::ElementCommunicator::setProcessCommunicatorToRecvArry(), oofem::NodeCommunicator::setProcessCommunicatorToRecvArry(), setProcessCommunicatorToRecvArry(), oofem::ElementCommunicator::setProcessCommunicatorToSendArry(), and oofem::NodeCommunicator::setProcessCommunicatorToSendArry().
|
protected |
Definition at line 53 of file problemcomm.h.
Referenced by ProblemCommunicator(), oofem::ElementCommunicator::setUpCommunicationMaps(), and oofem::NodeCommunicator::setUpCommunicationMaps().