51 for (
int i = 0; i <
size; i++ ) {
61 for (
int i = 0; i <
size; i++ ) {
74 this->engngModel = emodel;
81 for (
int i = 0; i <
size; i++ ) {
96 delete(processComms [ i ]);
99 delete[] processComms;
107 for (
int i = 0; i <
size; i++ ) {
108 result &= this->giveProcessCommunicator(i)->initExchange(tag);
118 for (
int i = 0; i <
size; i++ ) {
119 result &= this->giveProcessCommunicator(i)->finishExchange();
131 for (
int i = 0; i <
size; i++ ) {
132 result &= this->giveProcessCommunicator(i)->initSend(tag);
142 for (
int i = 0; i <
size; i++ ) {
143 result &= this->giveProcessCommunicator(i)->initReceive(tag);
152 for (
int i = 0; i <
size; i++ ) {
153 this->giveProcessCommunicator(i)->clearBuffers();
160 return std::string(
"Communicator::") + func +
", Rank: " + std::to_string(rank);
Communicator(EngngModel *emodel, CommunicatorBuff *buff, int rank, int size, CommunicatorMode mode=CommMode_Static)
Constructor.
ProcessCommunicatorBuff * giveProcessCommunicatorBuff(int i)
Returns i-th process communicator buff.
int initExchange(int tag)
Initializes data exchange with all problems.
int size
Number of processes.
std::string errorInfo(const char *func) const
Returns string for prepending output (used by error reporting macros).
The ProcessCommunicator and corresponding buffers (represented by this class) are separated in order ...
int finishExchange()
Finishes the exchange.
CommunicatorMode
The communicator mode determines the communication.
void clearBuffers()
Clears all buffer content.
Class representing process communicator for engineering model.
virtual ~Communicator()
Destructor.
ProcessCommunicatorBuff ** processCommBuffs
Array of process communicators.
int initSend(int tag)
Initializes data send exchange with all problems.
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
Abstract base class representing the "problem" under consideration.
the oofem namespace is to define a context or scope in which all oofem names are defined.
int initReceive(int tag)
Initializes data receive exchange with all problems.
CommunicatorBuff(int s, CommBuffType t=CBT_static)