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

This class stores stochastic trajectories for a list of points and a list of simulations for LL beam. More...

#include <SM_StochasticTrajectory.h>

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

Public Member Functions

 SM_StochasticTrajectory (void)
 create
 
virtual ~SM_StochasticTrajectory (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) override
 copy the stochastic data More...
 
virtual void adimensionize (const SM_Material &material) override
 adimensionize the output compoent with material characteristic More...
 
void setSimulations (std::initializer_list< tIndex > &&simulationIndices)
 set the simulation indices to save More...
 
void setSimulations (const std::vector< tIndex > &simulationIndices)
 set the simulation indices to save More...
 
const std::vector< tIndex > & getSimulations () const
 get the simulations
 
void setParticles (std::initializer_list< tIndex > &&particlesIndices)
 set the particle indices to save More...
 
void setParticles (const std::vector< tIndex > &particlesIndices)
 set the particle indices to save More...
 
const std::vector< tIndex > & getParticles () const
 get the simulations
 
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 stochastic data at the end of all packed simulations More...
 
- Public Member Functions inherited from SM_StochasticOutput< SM_StochasticTrajectory >
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 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...
 

Static Public Member Functions

static CORE_UniquePointer< SM_StochasticTrajectoryNew ()
 build a new instance of a stochastic data More...
 
static CORE_UniquePointer< SM_StochasticTrajectoryNew (const SM_StochasticTrajectory &c)
 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_StochasticTrajectory >
 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 trajectories for a list of points and a list of simulations for LL beam.

Member Function Documentation

◆ adimensionize()

virtual void SM_StochasticTrajectory::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_StochasticTrajectory::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_StochasticTrajectory::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_StochasticTrajectory::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.

◆ copy()

virtual void SM_StochasticTrajectory::copy ( const SM_StochasticOutputComponent c)
inlineoverridevirtual

copy the stochastic data

Parameters
[in]cstochastic data to copy

Reimplemented from SM_StochasticOutput< SM_StochasticTrajectory >.

◆ getContentsMemorySize()

virtual tMemSize SM_StochasticTrajectory::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_StochasticTrajectory >.

◆ getMemorySize()

virtual tMemSize SM_StochasticTrajectory::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_StochasticTrajectory >.

◆ New() [1/2]

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

build a new instance of a stochastic data

Returns
an unique pointer of a stochastic data

◆ New() [2/2]

static CORE_UniquePointer<SM_StochasticTrajectory> SM_StochasticTrajectory::New ( const SM_StochasticTrajectory c)
inlinestatic

build a new instance of a stochastic data

Returns
an unique pointer of a stochastic data

◆ open() [1/2]

tBoolean SM_StochasticTrajectory::open ( const SM_Beam beam)
inline

open the stochastic data

Parameters
[in]beam: beam that open teh data
Returns
true only if the beam is a LandauLifschitz one

◆ open() [2/2]

tBoolean SM_StochasticTrajectory::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 run

◆ setParticles() [1/2]

void SM_StochasticTrajectory::setParticles ( const std::vector< tIndex > &  particlesIndices)
inline

set the particle indices to save

Parameters
[in]particlesIndices: particles index to save

◆ setParticles() [2/2]

void SM_StochasticTrajectory::setParticles ( std::initializer_list< tIndex > &&  particlesIndices)
inline

set the particle indices to save

Parameters
[in]particlesIndices: particles index to save

◆ setSimulations() [1/2]

void SM_StochasticTrajectory::setSimulations ( const std::vector< tIndex > &  simulationIndices)
inline

set the simulation indices to save

Parameters
[in]simulationIndices: simulation index to save

◆ setSimulations() [2/2]

void SM_StochasticTrajectory::setSimulations ( std::initializer_list< tIndex > &&  simulationIndices)
inline

set the simulation indices to save

Parameters
[in]simulationIndices: simulation index to save

◆ store()

tBoolean SM_StochasticTrajectory::store ( const SM_System system)
inline

store the stochastic data during the relation method of the system

Parameters
[in]system: system which is running

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