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

This class defines a general stochastic beam of trajectories of system. More...

#include <SM_Beam.h>

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

Public Member Functions

virtual tMemSize getMemorySize () const override
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const override
 return the memory size of the included associations More...
 
void setBeamSize (const tIndex &n)
 set the beam size More...
 
void setBeamSize (const tIndex &s0, const tIndex &s1)
 set the beam size More...
 
const tIndex & getBeamSize () const
 get the beam size More...
 
const tIndex & getBeamSize (tIndex &s0, tIndex &s1) const
 get the beam size More...
 
void setPreconditioningStepsNumber (const tIndex &n)
 set the number of steps of preconditioning More...
 
const tIndex & getPreconditioningStepsNumber () const
 get the number of steps for precoditioning More...
 
void setStepsNumber (const tIndex &n)
 set the number of steps for loop More...
 
const tIndex & getStepsNumber () const
 get the number of steps for stochastic computation More...
 
void resetStochasticFunctions ()
 reset the stochastic functions
 
void setStochasticFunctions (CORE_UniquePointer< SM_MultiStochasticFunctionsInterface > &f)
 set the stochastic functions More...
 
tBoolean hasStochasticFunctions () const
 return true if the beam has a stochastic function
 
const SM_MultiStochasticFunctionsInterfacegetStochasticFunctions () const
 get the stochastic functions More...
 
SM_MultiStochasticFunctionsInterfacegetStochasticFunctions ()
 get the stochastic functions More...
 
void setSystem (CORE_UniquePointer< SM_System > system)
 set the system More...
 
const SM_SystemgetSystem () const
 get the system More...
 
SM_SystemgetSystem ()
 get the system More...
 
tBoolean hasSystem () const
 return true if the system of the beam is not null More...
 
void normalize (const tBoolean &isAdimensionized)
 adimensionize the beam data
 
void discretize ()
 discretize its system and its stochastic function
 
template<class System , class StochOutputImplement >
tBoolean run (SM_StochasticOutput< StochOutputImplement > &outputSData)
 run the simulations More...
 
virtual tString toString () const override
 turn the class into a string representation 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...
 

Protected Member Functions

 SM_Beam (void)
 create
 
virtual ~SM_Beam (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

This class defines a general stochastic beam of trajectories of system.

This class contains the attributes data:

This class is linked to:

The SM_StochasticOutput<StochOutputImplement> class is the main argument used in beam or system running methods.

The main method of the class is the templated method SM_Beam::run<System,StochOutputImplement>(SM_StochasticOutput<StochOutputImplement>& outputSData) whose templated argument is the stochastic output class to compute the stochastic outputs of the program. The algoritm of running a beam is :

The simulation of a beam follows the algorithm:

Before runing the beam it is necessarly to

Member Function Documentation

◆ getBeamSize() [1/2]

const tIndex& SM_Beam::getBeamSize ( ) const
inline

get the beam size

Returns
the number of trajectories to compute

◆ getBeamSize() [2/2]

const tIndex& SM_Beam::getBeamSize ( tIndex &  s0,
tIndex &  s1 
) const
inline

get the beam size

Parameters
[out]s0start index of the simulation
[out]s1end endex of the simulation s in [s0,s1[ of size s1-s0
Returns
the number of trajectories to compute

◆ getContentsMemorySize()

virtual tMemSize SM_Beam::getContentsMemorySize ( ) const
inlineoverridevirtual

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 CORE_Object.

Reimplemented in SM_MonteCarloBeam, SM_LandauLifschitzBeam, and SMOMPI_LandauLifschitzBeam.

◆ getMemorySize()

virtual tMemSize SM_Beam::getMemorySize ( ) const
inlineoverridevirtual

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_MonteCarloBeam, SM_LandauLifschitzBeam, and SMOMPI_LandauLifschitzBeam.

◆ getPreconditioningStepsNumber()

const tIndex& SM_Beam::getPreconditioningStepsNumber ( ) const
inline

get the number of steps for precoditioning

Returns
the number of steps to reach equilibrium

◆ getStepsNumber()

const tIndex& SM_Beam::getStepsNumber ( ) const
inline

get the number of steps for stochastic computation

Returns
the number of steps for stochastic computation

◆ getStochasticFunctions() [1/2]

SM_MultiStochasticFunctionsInterface& SM_Beam::getStochasticFunctions ( )
inline

get the stochastic functions

Returns
the stochastic functions

◆ getStochasticFunctions() [2/2]

const SM_MultiStochasticFunctionsInterface& SM_Beam::getStochasticFunctions ( ) const
inline

get the stochastic functions

Returns
the stochastic functions

◆ getSystem() [1/2]

SM_System& SM_Beam::getSystem ( )
inline

get the system

Returns
the system for writing

◆ getSystem() [2/2]

const SM_System& SM_Beam::getSystem ( ) const
inline

get the system

Returns
the system for reading

◆ hasSystem()

tBoolean SM_Beam::hasSystem ( ) const
inline

return true if the system of the beam is not null

Returns
true if the system of the beam is not null

◆ run()

template<class System , class StochOutputImplement >
tBoolean SM_Beam::run ( SM_StochasticOutput< StochOutputImplement > &  outputSData)

run the simulations

Template Parameters
System: system class defining the method stochasticRun
outputSData: stochatic output class defining the methods open() and close()
Parameters
[out]outputSData: data to save at each time & simulation

◆ setBeamSize() [1/2]

void SM_Beam::setBeamSize ( const tIndex &  n)
inline

set the beam size

Parameters
[in]nnumber of trajectories to compute

◆ setBeamSize() [2/2]

void SM_Beam::setBeamSize ( const tIndex &  s0,
const tIndex &  s1 
)
inline

set the beam size

Parameters
[in]s0start index of the trajectory to simulate
[in]s1after last index of the trajectory to simulate

◆ setPreconditioningStepsNumber()

void SM_Beam::setPreconditioningStepsNumber ( const tIndex &  n)
inline

set the number of steps of preconditioning

Parameters
[in]n: number of steps to reach equilibrium

◆ setStepsNumber()

void SM_Beam::setStepsNumber ( const tIndex &  n)
inline

set the number of steps for loop

Parameters
[in]n: number of steps to compute stochastic output

◆ setStochasticFunctions()

void SM_Beam::setStochasticFunctions ( CORE_UniquePointer< SM_MultiStochasticFunctionsInterface > &  f)
inline

set the stochastic functions

Parameters
[in,out]fstochastic funtions.

◆ setSystem()

void SM_Beam::setSystem ( CORE_UniquePointer< SM_System system)
inline

set the system

Parameters
[in]system: uniue pointer to set the system of the beam

◆ toString()

virtual tString SM_Beam::toString ( ) const
inlineoverridevirtual

turn the class into a string representation

Returns
a string representation of the class

Reimplemented from CORE_Object.


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