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

This class stores stochastic data list* For parallel only the firs stocchastic values of first output is taken for REDUCE actions. More...

#include <SM_StochasticOutputList.h>

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

Public Member Functions

 SM_StochasticOutputList (void)
 create
 
virtual ~SM_StochasticOutputList (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...
 
void clear ()
 clear the data list
 
tIndex getSize () const
 return the data list size More...
 
const std::vector< CORE_UniquePointer< SM_StochasticOutputComponent > > & getStochasticOutputList () const
 get the stochastic data list
 
std::vector< CORE_UniquePointer< SM_StochasticOutputComponent > > & getStochasticOutputList ()
 get the stochastic data list
 
void add (CORE_UniquePointer< SM_StochasticOutputComponent > data)
 add a stochastic data More...
 
const SM_StochasticOutputComponentget (const tIndex &i)
 get a stochastic data More...
 
virtual void setOutputPath (const tString &path) override
 set the output path More...
 
virtual void setPrefix (const tString &prefix) override
 set the prefix of generated files More...
 
virtual void adimensionize (const SM_Material &material) override
 adimensionize the output compoent with material characteristic More...
 
virtual void setIndex (const int &index, const int &rootIndex, const int &n) final
 set index of the output component 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...
 
virtual void closePackedSimulations (const SM_Beam &beam, const tIndex &rawValuesNumber, const std::valarray< tReal > &rawValues) override
 close the raws values for packed simulations More...
 
virtual tString toString () const override
 return the string representation of the class More...
 
- Public Member Functions inherited from SM_StochasticOutput< SM_StochasticOutputList >
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
 
const tString & getOutputPath () const
 return the output path More...
 
const tString & getPrefix () const
 return the prefix 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< SelfClassNew ()
 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_StochasticOutputList >
 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 data list* For parallel only the firs stocchastic values of first output is taken for REDUCE actions.

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ add()

void SM_StochasticOutputList::add ( CORE_UniquePointer< SM_StochasticOutputComponent data)
inline

add a stochastic data

Parameters
[in]data: stochastic data to add

◆ adimensionize()

virtual void SM_StochasticOutputList::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_StochasticOutputList::close ( const SM_Beam beam)
inline

close stochastic data at the end of all simulations

Parameters
[in,out]beamclose the stochastic output for beam runs

◆ close() [2/2]

tBoolean SM_StochasticOutputList::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]system: system of the simlation
[in]hasSucceededresult of the simulation

◆ closePackedSimulations()

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

close the raws values for packed simulations

Parameters
[in]beam: beam of the simulations
[in]rawValuesNumber: number of raws
[in]rawValues: values of raw

Do nothing by default

Implements SM_StochasticOutputComponent.

◆ get()

const SM_StochasticOutputComponent* SM_StochasticOutputList::get ( const tIndex &  i)
inline

get a stochastic data

Parameters
[in]i: index of the data
Returns
stochastic data at index i in [0,getOutputListSize()[

◆ getContentsMemorySize()

virtual tMemSize SM_StochasticOutputList::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_StochasticOutputList >.

◆ getMemorySize()

virtual tMemSize SM_StochasticOutputList::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_StochasticOutputList >.

◆ getSize()

tIndex SM_StochasticOutputList::getSize ( ) const
inline

return the data list size

Returns
the data list size

◆ New()

static CORE_UniquePointer<SelfClass> SM_StochasticOutputList::New ( )
inlinestatic

build a new instance of a stochastic data

Returns
an unique pointer of a stochastic data

◆ open() [1/2]

tBoolean SM_StochasticOutputList::open ( const SM_Beam beam)
inline

open the stochastic data

Parameters
[in]beam: beam that open the data

◆ open() [2/2]

tBoolean SM_StochasticOutputList::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 initialize for the stochastic output

◆ setIndex()

virtual void SM_StochasticOutputList::setIndex ( const int &  index,
const int &  rootIndex,
const int &  n 
)
inlinefinalvirtual

set index of the output component

Parameters
[in]indexindex of the stochastic output
[in]rootIndexroot index of the stochastic output
[in]n: number of stochastic output

Reimplemented from SM_StochasticOutputComponent.

◆ setOutputPath()

virtual void SM_StochasticOutputList::setOutputPath ( const tString &  path)
inlineoverridevirtual

set the output path

Parameters
[in]path: output path to generate the files

Reimplemented from SM_StochasticOutputComponent.

◆ setPrefix()

virtual void SM_StochasticOutputList::setPrefix ( const tString &  prefix)
inlineoverridevirtual

set the prefix of generated files

Parameters
[in]prefix: prefix of the generated files

Reimplemented from SM_StochasticOutputComponent.

◆ store()

tBoolean SM_StochasticOutputList::store ( const SM_System system)
inline

store the stochastic data during the relation method of the system

Parameters
[in]system: system to save

◆ toString()

virtual tString SM_StochasticOutputList::toString ( ) const
inlineoverridevirtual

return the string representation of the class

Returns
the string representation of the class

Reimplemented from SM_StochasticOutputComponent.


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