C++ mpi module for stochmagnet_main Package
Public Member Functions | Protected Member Functions | List of all members
SM_StochasticOutput< StochOutputImplement > Class Template Reference

this class implements the virtual methods of its base class SM_StochasticOutputComponent with templated abstract method More...

#include <SM_StochasticOutput.h>

Inheritance diagram for SM_StochasticOutput< StochOutputImplement >:
Inheritance graph
[legend]
Collaboration diagram for SM_StochasticOutput< StochOutputImplement >:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const
 return the memory size of the included associations More...
 
virtual void copy (const SM_StochasticOutputComponent &c)
 copy More...
 
virtual tBoolean openComponent (const SM_Beam &beam) final
 open the stochastic data More...
 
virtual tBoolean openComponent (const tIndex &s, const SM_System &system) final
 open the stochastic data for simulation s More...
 
virtual tBoolean storeComponent (const SM_System &system) final
 store the stochastic data during the relation method of the system More...
 
virtual tBoolean closeComponent (const tIndex &s, const SM_System &system, const tBoolean &hasSucceeded) final
 close the stochastic data for the simulation s More...
 
virtual tBoolean closeComponent (const SM_Beam &beam) final
 close stochastic data at the end of all simulations More...
 
tBoolean open (const SM_Beam &beam)
 open the stochastic data More...
 
tBoolean open (const tIndex &s, const SM_System &system)
 open the stochastic data for simulation s More...
 
tBoolean store (const SM_System &system)
 store the stochastic data during the relation method of the system More...
 
tBoolean close (const tIndex &s, const SM_System &system, const tBoolean &hasSucceeded)
 close the stochastic data for the simulation s More...
 
tBoolean close (const SM_Beam &beam)
 close stochastic data at the end of all simulations More...
 
- Public Member Functions inherited from SM_StochasticOutputComponent
 SM_StochasticOutputComponent (void)
 create
 
virtual ~SM_StochasticOutputComponent (void)
 destroy
 
virtual void setOutputPath (const tString &path)
 set the output path More...
 
const tString & getOutputPath () const
 return the output path More...
 
virtual void setPrefix (const tString &prefix)
 set the prefix of generated files More...
 
const tString & getPrefix () const
 return the prefix More...
 
virtual void setIndex (const int &index, const int &rootIndex, const int &n)
 set index of the output component More...
 
void setIndex (const int &index, const int &n)
 set index of the output component More...
 
const int & getIndex () const
 get the index of the output component
 
const int & getRootIndex () const
 get the root index of the output component
 
const int & getIndicesNumber () const
 get the number of output components
 
void setDrawnStepsNumber (const tInteger &n)
 set the number of steps for drawn for the stochastic output More...
 
const tInteger & getDrawnStepsNumber () const
 get the drawn number to compute the stochastic output More...
 
void setPackedSimulationsIndex (const tInteger &i)
 set packed simulations index More...
 
const tInteger & getPackedSimulationsIndex () const
 get packed simulations index More...
 
void setPackedSimulationsNumber (const tInteger &n)
 set packed simulations number More...
 
const tInteger & getPackedSimulationsNumber () const
 get packed simulations number More...
 
const tBoolean & hasLogPerPackedSimulations () const
 return true if the stochastic output has log per pack of simulations
 
void setHasLogPerPackedSimulations (const tBoolean &v)
 set to true if the stochastic output has log per pack of simulations More...
 
const tIndex & getPackedRawValuesNumber () const
 get the packed raw values number More...
 
tIndex & getPackedRawValuesNumber ()
 get the packed raw values number More...
 
std::valarray< tReal > & getPackedRawValues ()
 get the packed raw values More...
 
const std::valarray< tReal > & getPackedRawValues () const
 get the packed raw values More...
 
const std::vector< tString > & getOutputDescription () const
 get the string representation of the output values More...
 
void setOutputDescription (const std::vector< tString > &v)
 et the output description More...
 
const std::valarray< tReal > & getOutputValues () const
 get the output values of the stochastic output for reading More...
 
std::valarray< tReal > & getOutputValues ()
 get the output values of the stochastic output for writing More...
 
virtual void closePackedSimulations (const SM_Beam &beam, const tIndex &rawValuesNumber, const std::valarray< tReal > &rawValues)=0
 close the raws values for packed simulations More...
 
virtual void adimensionize (const SM_Material &material)=0
 adimensionize the output compoent with material characteristic More...
 
virtual tString toString () const override
 return the string representation of the class
 
- Public Member Functions inherited from SM_Object
 SM_Object (void)
 create
 
virtual ~SM_Object (void)
 destroy
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Protected Member Functions

 SM_StochasticOutput (void)
 create
 
virtual ~SM_StochasticOutput (void)
 destroy
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Additional Inherited Members

- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Detailed Description

template<class StochOutputImplement>
class SM_StochasticOutput< StochOutputImplement >

this class implements the virtual methods of its base class SM_StochasticOutputComponent with templated abstract method

Template Parameters
SM_StochasticOutputComponent: implementation class of templated methods

It implements the virtual abstract method of base class SM_StochasticOutputComponent with the templated abstract methods.

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ close() [1/2]

template<class StochOutputImplement >
tBoolean SM_StochasticOutput< StochOutputImplement >::close ( const SM_Beam beam)
inline

close stochastic data at the end of all simulations

Parameters
[in]beam: beam that close the data

◆ close() [2/2]

template<class StochOutputImplement >
tBoolean SM_StochasticOutput< StochOutputImplement >::close ( const tIndex &  s,
const SM_System system,
const tBoolean &  hasSucceeded 
)
inline

close the stochastic data for the simulation s

Parameters
[in]s: index of the simulation
[in]systemsystem to update at the end of the simulation s
[in]hasSucceededresult of the simulation

◆ closeComponent() [1/2]

template<class StochOutputImplement >
virtual tBoolean SM_StochasticOutput< StochOutputImplement >::closeComponent ( const SM_Beam beam)
inlinefinalvirtual

close stochastic data at the end of all simulations

Parameters
[in]beamclose the stochastic output for beam runs

Implements SM_StochasticOutputComponent.

◆ closeComponent() [2/2]

template<class StochOutputImplement >
virtual tBoolean SM_StochasticOutput< StochOutputImplement >::closeComponent ( const tIndex &  s,
const SM_System system,
const tBoolean &  hasSucceeded 
)
inlinefinalvirtual

close the stochastic data for the simulation s

Parameters
[in]s: index of the simulation
[in]system: system to save
[in]hasSucceededresult of the simulation

Implements SM_StochasticOutputComponent.

◆ copy()

template<class StochOutputImplement >
virtual void SM_StochasticOutput< StochOutputImplement >::copy ( const SM_StochasticOutputComponent c)
inlinevirtual

◆ getContentsMemorySize()

template<class StochOutputImplement >
virtual tMemSize SM_StochasticOutput< StochOutputImplement >::getContentsMemorySize ( ) const
inlinevirtual

return the memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from SM_StochasticOutputComponent.

Reimplemented in SM_StochasticXDMF, SM_StochasticTrajectory, SM_StochasticJs, SM_StochasticHysteresis, SM_StochasticEnergy, SM_StochasticDecreasingNoise, SM_StochasticCurieTemperature, SM_StochasticBoltzmann, and SM_StochasticOutputList.

◆ getMemorySize()

template<class StochOutputImplement >
virtual tMemSize SM_StochasticOutput< StochOutputImplement >::getMemorySize ( ) const
inlinevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from SM_StochasticOutputComponent.

Reimplemented in SM_StochasticXDMF, SM_StochasticTrajectory, SM_StochasticJs, SM_StochasticHysteresis, SM_StochasticEnergy, SM_StochasticDecreasingNoise, SM_StochasticCurieTemperature, SM_StochasticBoltzmann, and SM_StochasticOutputList.

◆ open() [1/2]

template<class StochOutputImplement >
tBoolean SM_StochasticOutput< StochOutputImplement >::open ( const SM_Beam beam)
inline

open the stochastic data

Parameters
[in]beam: beam that open the data

◆ open() [2/2]

template<class StochOutputImplement >
tBoolean SM_StochasticOutput< StochOutputImplement >::open ( const tIndex &  s,
const SM_System system 
)
inline

open the stochastic data for simulation s

Parameters
[in]s: index of the simulation
[in]system: system to save

◆ openComponent() [1/2]

template<class StochOutputImplement >
virtual tBoolean SM_StochasticOutput< StochOutputImplement >::openComponent ( const SM_Beam beam)
inlinefinalvirtual

open the stochastic data

Parameters
[in]beam: beam that open the data

Implements SM_StochasticOutputComponent.

◆ openComponent() [2/2]

template<class StochOutputImplement >
virtual tBoolean SM_StochasticOutput< StochOutputImplement >::openComponent ( const tIndex &  s,
const SM_System system 
)
inlinefinalvirtual

open the stochastic data for simulation s

Parameters
[in]s: index of the simulation
[in]system: system to save

Implements SM_StochasticOutputComponent.

◆ store()

template<class StochOutputImplement >
tBoolean SM_StochasticOutput< StochOutputImplement >::store ( const SM_System system)
inline

store the stochastic data during the relation method of the system

Parameters
[in]systemstore the stochastic output from the current state of the system

◆ storeComponent()

template<class StochOutputImplement >
virtual tBoolean SM_StochasticOutput< StochOutputImplement >::storeComponent ( const SM_System system)
inlinefinalvirtual

store the stochastic data during the relation method of the system

Parameters
[in]system: system to save

Implements SM_StochasticOutputComponent.


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