OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::CommunicatorBuff Class Reference

The Communicator and corresponding buffers (represented by this class) are separated in order to allow share the same buffer by several communicators. More...

#include <communicator.h>

+ Collaboration diagram for oofem::CommunicatorBuff:

Public Member Functions

 CommunicatorBuff (int s, CommBuffType t=CBT_static)
 
 ~CommunicatorBuff ()
 
ProcessCommunicatorBuffgiveProcessCommunicatorBuff (int i)
 Returns i-th process communicator buff. More...
 

Protected Attributes

int size
 Number of processes. More...
 
ProcessCommunicatorBuff ** processCommBuffs
 Array of process communicators. More...
 

Detailed Description

The Communicator and corresponding buffers (represented by this class) are separated in order to allow share the same buffer by several communicators.

Here sharing means reusing for different but non-overlapping communications. if communications overlap, the different instances of CommunicatorBuff should be used! The CommunicatorBuff objects are registered in corresponding communicator, then if maps are available, comBuff should be resized and used in subsequent ops.

The registration is necessary, otherwise before each send op the buffers (given probably as parameter) will be resized again (size have to be computed again) and this is probably quite cost operation. When comBuff will be registered, resize is needed only when maps change, and this will not occur frequently (its even quite rare).

Definition at line 60 of file communicator.h.

Constructor & Destructor Documentation

oofem::CommunicatorBuff::CommunicatorBuff ( int  s,
CommBuffType  t = CBT_static 
)

Definition at line 45 of file communicator.C.

References processCommBuffs, and size.

oofem::CommunicatorBuff::~CommunicatorBuff ( )

Definition at line 59 of file communicator.C.

References processCommBuffs, and size.

Member Function Documentation

ProcessCommunicatorBuff* oofem::CommunicatorBuff::giveProcessCommunicatorBuff ( int  i)
inline

Returns i-th process communicator buff.

The process comm buffs are numbered from rank 0.

Parameters
iProcess communicator buff index [0..size-1].
Returns
Pointer to corresponding process communicator buff, NULL otherwise.

Definition at line 78 of file communicator.h.

Referenced by oofem::Communicator::Communicator().

Member Data Documentation

ProcessCommunicatorBuff** oofem::CommunicatorBuff::processCommBuffs
protected

Array of process communicators.

Definition at line 66 of file communicator.h.

Referenced by CommunicatorBuff(), and ~CommunicatorBuff().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011