Diana
0.8.3
|
Model representation in parallel environment. More...
#include <NumericObject.hpp>
Public Member Functions | |
CNumericObject (const CapeString &_sModelName, CapeLong _lGlobalIndex) | |
CapeLong | GetObjectIndex () |
CapeString | GetModelName () |
CapeString | GetESOName () |
void | SetModel (Numeric::Solvers::Model::ICapeNumericModel *_Model) |
Numeric::Solvers::Model::ICapeNumericModel * | GetModel () |
void | SetSolver (DianaNumericSolver *_pSolver) |
void | SetStatus (CapeLong _Status) |
CapeLong | GetStatus () |
CapeLong | GetSimulationTime () |
return the state of m_SimulationTimer | |
void | ResetSimulationTime () |
reset the value of m_SimulationTimer | |
void | SetMemoryAdress (std::vector< CMemoryBank * > _MemoryAdress) |
void | SaveState () throw (Common::Error::ECapeUnknown) |
void | LoadState () throw (Common::Error::ECapeUnknown) |
CapeBoolean | CheckConvergence () |
void | ConsistentInitialize (CapeDouble _dStartTime, CapeDouble _dFinishTime, CapeLong _lIterationNumber, CapeDouble _dInitialStepSize) |
void | Simulate (CapeDouble _dStartTime, CapeDouble _dFinishTime, CapeLong _nIterationNumber) |
void | DataSend (CRouter *_Router) |
void | DataReceive (CRouter *_Router) |
Numeric::Solvers::Solver::ICapeNumericSolver * | CreateSolver () throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
void | ShowStat (CapeBoolean _bShowTotalStat) |
void | SaveInitialState () |
void | UpdateReceivedData (CapeDouble _dTime) |
void | ResendWaveform () |
Static Public Member Functions | |
static void | UpdateReceivedValues (void *_pMemoryBanks) |
Static Protected Member Functions | |
static void | SaveStates (void *_pMemoryBanks, double X, int NEQ, int KOLD, double *PHI, double *PSI) |
Private Member Functions | |
void | SendNumericObjectState (NumericObjectState *_pState, CapeLong _nDestinationPE) |
void | ReceiveNumericObjectState (NumericObjectState *_pState, CapeLong _nSourcePE) |
void | ClearStat () |
void | UpdateStat () |
Private Attributes | |
CapeLong | m_lGlobalIndex |
Global index - specify object in simulation environement. | |
DianaNumericSolver * | m_pSolver |
Pointer to solver. | |
Numeric::Solvers::Model::ICapeNumericModel * | m_pModel |
pointer to the model | |
CapeString | m_sModelName |
Name of the model. | |
CapeString | m_ESOName |
Name (type) of ESO which used for simulation. | |
CapeLong | m_lStatus |
std::vector< CMemoryBank * > | m_pMemoryBanks |
NumericObjectState | OldState |
CapeDouble | m_dCurrentTime |
CapeBoolean | m_bNeedToDeleteSolver |
CapeBoolean | m_bNeedToInitialize |
CapeLong | m_lJacCalls |
CapeLong | m_lTotalJacCalls |
Number of jacobian evaluations. | |
CapeLong | m_lResCalls |
CapeLong | m_lTotalResCalls |
Number of residual evaluations. | |
CapeLong | m_lSolCalls |
CapeLong | m_lTotalSolCalls |
Number of linear solver evaluation. | |
CTimer | m_SimulationTimer |
Contain the summary time of all simulation from last call of TimeReset function. |
Model representation in parallel environment.
Check difference between SendOld and SendNew memory fields in all memory banks which corresponded to that object. Return true if difference between data is small enough (diff <= AbsTol )
void ConsistentInitialize | ( | CapeDouble | _dStartTime, |
CapeDouble | _dFinishTime, | ||
CapeLong | _lIterationNumber, | ||
CapeDouble | _dInitialStepSize | ||
) |
This function find consistent initial conditions and return controll immediately. (Don't make any simulation)
Numeric::Solvers::Solver::ICapeNumericSolver* CreateSolver | ( | ) | throw (Common::Error::ECapeUnknown, Common::Error::ECapeInvalidArgument) |
This function used just after transmitting NUumericObjects from one processor to another. In that case transmitted all variables, derivativatives, parameters and for simulating is using existing ESO on that processor. But solver should be created one more time. If solver created in such way, it also should be destroyed in destructor
void LoadState | ( | ) | throw (Common::Error::ECapeUnknown) |
Function load states of solver and ESO
void SaveState | ( | ) | throw (Common::Error::ECapeUnknown) |
Function save states of solver and ESO
void SetMemoryAdress | ( | std::vector< CMemoryBank * > | _MemoryAdress | ) |
Set the adress of memory banks array which corresponded to that NumericObject
void Simulate | ( | CapeDouble | _dStartTime, |
CapeDouble | _dFinishTime, | ||
CapeLong | _nIterationNumber | ||
) |
run simualtion from starttime to the finishtime. In all internal solver steps needed data is written to the memory banks array. If iterationnumber != 0 than data should be loaded with Loadstate
static void UpdateReceivedValues | ( | void * | _pMemoryBanks | ) | [static] |
This function is called from Solver to update the values of received variables a specific time _dTime. Data is taken from _pMemoryBanks