C++ mpi module for stochmagnet_main Package
Public Member Functions | List of all members
SM_StochasticOutputComponent Class Referenceabstract

This class stores stochastic outpus computed for each trajectory of a simulation of trajectories of a beam. More...

#include <SM_StochasticOutputComponent.h>

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

Public Member Functions

 SM_StochasticOutputComponent (void)
 create
 
virtual ~SM_StochasticOutputComponent (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 copy (const SM_StochasticOutputComponent &c)
 copy More...
 
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 tBoolean openComponent (const SM_Beam &beam)=0
 open the stochastic data More...
 
virtual tBoolean openComponent (const tIndex &s, const SM_System &system)=0
 open the stochastic data for simulation s More...
 
virtual tBoolean storeComponent (const SM_System &system)=0
 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)=0
 close the stochastic data for the simulation s More...
 
virtual tBoolean closeComponent (const SM_Beam &beam)=0
 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)=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...
 

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...
 
- 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 outpus computed for each trajectory of a simulation of trajectories of a beam.

The data attributes are

The state attributes are :

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ adimensionize()

virtual void SM_StochasticOutputComponent::adimensionize ( const SM_Material material)
pure virtual

adimensionize the output compoent with material characteristic

Parameters
[in]materialmaterial to adimensonize the data

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

◆ closeComponent() [1/2]

virtual tBoolean SM_StochasticOutputComponent::closeComponent ( const SM_Beam beam)
pure virtual

◆ closeComponent() [2/2]

virtual tBoolean SM_StochasticOutputComponent::closeComponent ( const tIndex &  s,
const SM_System system,
const tBoolean &  hasSucceeded 
)
pure virtual

◆ closePackedSimulations()

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

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

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

◆ copy()

virtual void SM_StochasticOutputComponent::copy ( const SM_StochasticOutputComponent c)
inlinevirtual

◆ getContentsMemorySize()

virtual tMemSize SM_StochasticOutputComponent::getContentsMemorySize ( ) const
inlinevirtual

◆ getDrawnStepsNumber()

const tInteger& SM_StochasticOutputComponent::getDrawnStepsNumber ( ) const
inline

get the drawn number to compute the stochastic output

Returns
the number of drawn for the stochastic output

◆ getMemorySize()

virtual tMemSize SM_StochasticOutputComponent::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_Object.

Reimplemented in SM_StochasticXDMF, SM_StochasticTrajectory, SM_StochasticJs, SM_StochasticHysteresis, SM_StochasticEnergy, SM_StochasticDecreasingNoise, SM_StochasticCurieTemperature, SM_StochasticBoltzmann, SM_StochasticOutputList, SM_StochasticOutput< StochOutputImplement >, SM_StochasticOutput< SM_StochasticJs >, SM_StochasticOutput< SM_StochasticXDMF >, SM_StochasticOutput< SM_StochasticEnergy >, SM_StochasticOutput< SM_StochasticTrajectory >, SM_StochasticOutput< SM_StochasticBoltzmann >, SM_StochasticOutput< SM_StochasticOutputList >, SM_StochasticOutput< SM_StochasticHysteresis >, SM_StochasticOutput< SM_StochasticCurieTemperature >, and SM_StochasticOutput< SM_StochasticDecreasingNoise >.

◆ getOutputDescription()

const std::vector<tString>& SM_StochasticOutputComponent::getOutputDescription ( ) const
inline

get the string representation of the output values

Returns
output description

◆ getOutputPath()

const tString& SM_StochasticOutputComponent::getOutputPath ( ) const
inline

return the output path

Returns
the output path

◆ getOutputValues() [1/2]

std::valarray<tReal>& SM_StochasticOutputComponent::getOutputValues ( )
inline

get the output values of the stochastic output for writing

Returns
output values of the stochastic

◆ getOutputValues() [2/2]

const std::valarray<tReal>& SM_StochasticOutputComponent::getOutputValues ( ) const
inline

get the output values of the stochastic output for reading

Returns
output values of the stochastic

◆ getPackedRawValues() [1/2]

std::valarray<tReal>& SM_StochasticOutputComponent::getPackedRawValues ( )
inline

get the packed raw values

Returns
the packed raws values

◆ getPackedRawValues() [2/2]

const std::valarray<tReal>& SM_StochasticOutputComponent::getPackedRawValues ( ) const
inline

get the packed raw values

Returns
the packed raws values

◆ getPackedRawValuesNumber() [1/2]

tIndex& SM_StochasticOutputComponent::getPackedRawValuesNumber ( )
inline

get the packed raw values number

Returns
the packed raws number

◆ getPackedRawValuesNumber() [2/2]

const tIndex& SM_StochasticOutputComponent::getPackedRawValuesNumber ( ) const
inline

get the packed raw values number

Returns
the packed raws number

◆ getPackedSimulationsIndex()

const tInteger& SM_StochasticOutputComponent::getPackedSimulationsIndex ( ) const
inline

get packed simulations index

Returns
index of the packed simulations

◆ getPackedSimulationsNumber()

const tInteger& SM_StochasticOutputComponent::getPackedSimulationsNumber ( ) const
inline

get packed simulations number

Returns
number of the packed simulations

◆ getPrefix()

const tString& SM_StochasticOutputComponent::getPrefix ( ) const
inline

return the prefix

Returns
the prefix

◆ openComponent() [1/2]

virtual tBoolean SM_StochasticOutputComponent::openComponent ( const SM_Beam beam)
pure virtual

◆ openComponent() [2/2]

virtual tBoolean SM_StochasticOutputComponent::openComponent ( const tIndex &  s,
const SM_System system 
)
pure virtual

◆ setDrawnStepsNumber()

void SM_StochasticOutputComponent::setDrawnStepsNumber ( const tInteger &  n)
inline

set the number of steps for drawn for the stochastic output

Parameters
[in]n:the number of drawn for the stochastic output
  • n=0 : no drawn
  • n=1 : drawns are each iterations

◆ setHasLogPerPackedSimulations()

void SM_StochasticOutputComponent::setHasLogPerPackedSimulations ( const tBoolean &  v)
inline

set to true if the stochastic output has log per pack of simulations

Parameters
[in]vboolean value

◆ setIndex() [1/2]

void SM_StochasticOutputComponent::setIndex ( const int &  index,
const int &  n 
)
inline

set index of the output component

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

◆ setIndex() [2/2]

virtual void SM_StochasticOutputComponent::setIndex ( const int &  index,
const int &  rootIndex,
const int &  n 
)
inlinevirtual

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 in SM_StochasticOutputList.

◆ setOutputDescription()

void SM_StochasticOutputComponent::setOutputDescription ( const std::vector< tString > &  v)
inline

et the output description

Parameters
[in]voutput description. The size of v must be the same as the sier of getOutputValues();

◆ setOutputPath()

virtual void SM_StochasticOutputComponent::setOutputPath ( const tString &  path)
inlinevirtual

set the output path

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

Reimplemented in SM_StochasticOutputList.

◆ setPackedSimulationsIndex()

void SM_StochasticOutputComponent::setPackedSimulationsIndex ( const tInteger &  i)
inline

set packed simulations index

Parameters
[in]i: index of the packed simulations

◆ setPackedSimulationsNumber()

void SM_StochasticOutputComponent::setPackedSimulationsNumber ( const tInteger &  n)
inline

set packed simulations number

Parameters
[in]n: number of the packed simulations

◆ setPrefix()

virtual void SM_StochasticOutputComponent::setPrefix ( const tString &  prefix)
inlinevirtual

set the prefix of generated files

Parameters
[in]prefix: prefix of the generated files

Reimplemented in SM_StochasticOutputList.

◆ storeComponent()

virtual tBoolean SM_StochasticOutputComponent::storeComponent ( const SM_System system)
pure virtual

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