C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | List of all members
SM_StochasticEnergy Class Reference

This class stores stochastic energy: More...

#include <SM_StochasticEnergy.h>

Inheritance diagram for SM_StochasticEnergy:
Inheritance graph
[legend]
Collaboration diagram for SM_StochasticEnergy:
Collaboration graph
[legend]

Public Member Functions

 SM_StochasticEnergy (void)
 create
 
virtual ~SM_StochasticEnergy (void)
 destroy
 
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 adimensionize (const SM_Material &material) override
 adimensionize the output compoent with material characteristic More...
 
void initialize (const SM_Beam &beam)
 set the number of epsilon & energies 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 relations 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...
 
virtual void closePackedSimulations (const SM_Beam &beam, const tIndex &rawValuesNumber, const std::valarray< tReal > &rawValues) override
 close stochastic data at the end of all packed simulations More...
 
virtual tString toString () const override
 return the string representation of the class
 
- Public Member Functions inherited from SM_StochasticOutput< SM_StochasticEnergy >
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...
 
- 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...
 

Static Public Member Functions

static CORE_UniquePointer< SM_StochasticEnergyNew ()
 build a new instance of a stochastic data More...
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from SM_StochasticOutput< SM_StochasticEnergy >
 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

 

Detailed Description

This class stores stochastic energy:

It computes : \( \forall \varepsilon \in [0,\varepsilon_{max}[, E(\varepsilon,t)= \displaystyle \frac{1}{S} \sum_{s=0}^{s=S-1} Energy(t) \)

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ adimensionize()

virtual void SM_StochasticEnergy::adimensionize ( const SM_Material material)
inlineoverridevirtual

adimensionize the output compoent with material characteristic

Parameters
[in]materialmaterial to adimensonize the data

Implements SM_StochasticOutputComponent.

◆ close() [1/2]

tBoolean SM_StochasticEnergy::close ( const SM_Beam beam)
inline

close stochastic data at the end of all simulations

Parameters
[in]beamclose the stochastic output for beam runs

◆ close() [2/2]

tBoolean SM_StochasticEnergy::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 close
[in]hasSucceededresult of the simulation

◆ closePackedSimulations()

virtual void SM_StochasticEnergy::closePackedSimulations ( const SM_Beam beam,
const tIndex &  rawValuesNumber,
const std::valarray< tReal > &  rawValues 
)
inlineoverridevirtual

close stochastic data at the end of all packed simulations

Parameters
[in]beam: beam
[in]rawValuesNumber: number of raws
[in]rawValues: values of ralues

Implements SM_StochasticOutputComponent.

◆ getContentsMemorySize()

virtual tMemSize SM_StochasticEnergy::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_StochasticOutput< SM_StochasticEnergy >.

◆ getMemorySize()

virtual tMemSize SM_StochasticEnergy::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_StochasticOutput< SM_StochasticEnergy >.

◆ initialize()

void SM_StochasticEnergy::initialize ( const SM_Beam beam)
inline

set the number of epsilon & energies

Parameters
[in]beam: beam to simulate

◆ New()

static CORE_UniquePointer<SM_StochasticEnergy> SM_StochasticEnergy::New ( )
inlinestatic

build a new instance of a stochastic data

Returns
an unique pointer of a stochastic data

◆ open() [1/2]

tBoolean SM_StochasticEnergy::open ( const SM_Beam beam)
inline

open the stochastic data

Parameters
[in]beam: beam that open the data

◆ open() [2/2]

tBoolean SM_StochasticEnergy::open ( const tIndex &  s,
const SM_System system 
)
inline

open the stochastic data for simulation s

Parameters
[in]s: index of the simulation
[in]systemsystem to open

◆ store()

tBoolean SM_StochasticEnergy::store ( const SM_System system)
inline

store the stochastic data during the relations method of the system

Parameters
[in]system: system to save

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