Diana  0.8.3
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
CMemoryBank Class Reference

This object contain all received and sended values. More...

#include <MemoryBank.hpp>

List of all members.

Public Member Functions

 CMemoryBank (DianaDAESO *_pOwner, CapeLong _nOwnerIndex, CapeLong _nReceiverIndex, CapeLong _lConnectionsSendIdentificator, CapeLong _lConnectionsReceivedIdentificator)
void AddSendIndex (CapeLong _Index)
void AddReceiveIndexes (CapeLong _ParIndex)
void SetESO (DianaDAESO *_pOwner)
void SaveStateNew (double X, int NEQ, int KOLD, double *PHI, double *PSI)
void SendData (CRouter *_Router)
void ReceiveSize (CRouter *_Router)
void ReceiveData (CRouter *_Router)
CapeBoolean CheckConvergence ()
void SaveInitialState ()
void UpdateReceivedValues () throw (Common::Error::ECapeUnknown)
void ResendWaveform ()

Public Attributes

CapeLong m_lIterationNumber
CapeBoolean m_bTempConvergence

Private Member Functions

CapeArrayDouble GetValueAtTime (CapeDouble _Time, TransmitDataStructure *_Struct)
void Initialize ()
void WaitFor (TransmitRequestsDataStructureRequests *_Requests)

Private Attributes

DianaDAESOm_pOwner
 DAESO for which corresponded that block.
CapeLong m_lOwnerIndex
 parent DAESO index
CapeLong m_lReceiverIndex
 receiver index
CapeArrayLong m_SendVariablesIndexes
CapeArrayLong m_ReceiveParametersIndexes
 indexes of transmitted variables
CapeLong lSendNewIdx
CapeLong lSendOldIdx
CapeLong lReceiveOldIdx
CapeLong lReceiveNewIdx
std::vector
< TransmitDataStructure
TDSVector
CapeLong lSendReqIdx
CapeLong lReceiveReqIdx
std::vector
< TransmitRequestsDataStructureRequests
TRDSVector
CapeDouble m_dRelTol
CapeDouble m_dAbsTol
CapeLong m_lMaxOrder
CapeLong m_lConnectionsSendIdentificator
CapeLong m_lConnectionsReceiveIdentificator
CapeDouble m_dLastUpdateTime

Detailed Description

This object contain all received and sended values.

CMemoryBank. The objects of this class are used for transmitting values, memory allocation for data receiving, setting of received values into the model and data interpolation.


Member Function Documentation

void AddReceiveIndexes ( CapeLong  _ParIndex)

Add index of parameter which value should be received.

void AddSendIndex ( CapeLong  _Index)

Add index of variable which value should be send.

Function check convergence. It analyze two array ReceiveNew and ReceiveOld and check difference between them. If diff>maxdiff than function return false. In other way it return true.

CapeArrayDouble GetValueAtTime ( CapeDouble  _Time,
TransmitDataStructure _Struct 
) [private]

This function should return value of connected variables at some specific time point.

void ReceiveData ( CRouter _Router)

Non blocking recieving of data

void ReceiveSize ( CRouter _Router)

Non blocking recieving of sizes. There are two functions ReceiveSize and ReceiveData because before ReceiveData function it is needed to know the size of transmitting data.

void ResendWaveform ( )

This function is used when necessary to resend waveform from previous iteration

void SendData ( CRouter _Router)

Send data arrays. A first sends size of arrays, than sends array of times, array of variables and array of derivatives.

void SetESO ( DianaDAESO _pOwner)

Set pointer to the ESO.

This function set to the ESO the values of received variables (values of parameters) at the time _Time

void WaitFor ( TransmitRequestsDataStructureRequests _Requests) [private]

This function wait for data which was sended with help of non-blocking MPI functions.


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