C++ mpi module for stochmagnet_main Package
Public Member Functions | List of all members
SM_BeamCycle< CYCLE_CLASS > Class Template Reference

This class is an interface of Beam Cycle class for Stoch Microm package. More...

#include <SM_BeamCycle.h>

Inheritance diagram for SM_BeamCycle< CYCLE_CLASS >:
Inheritance graph
[legend]
Collaboration diagram for SM_BeamCycle< CYCLE_CLASS >:
Collaboration graph
[legend]

Public Member Functions

 SM_BeamCycle (void)
 create
 
virtual ~SM_BeamCycle (void)
 destroy
 
virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
void setIsStochasticOutputSavedAtEachStep (const tBoolean &b)
 set is the output is saved at each step More...
 
const tBoolean & isStochasticOutputSavedAtEachStep () const
 get if the output is saved at each step More...
 
void setIsSeedUpdatedPerCycleStep (const tBoolean &b)
 set if the seed is generated at each step of the cycle More...
 
const tBoolean & isSeedUpdatedPerCycleStep () const
 return true if the seed is generated at each cycle step More...
 
void setSeedPerCycleStep (const tULLInt &seed)
 set the seed per step of each step cycle More...
 
const tULLInt & getSeedPerCycleStep () const
 get the seed
 
void setIsRestoring (const tBoolean &v)
 set to true if the cycle is restoring More...
 
const tBoolean & isRestoring () const
 return true if the cycle starts at last computed cycle index
 
tBoolean open (SM_Beam &beam, SM_StochasticOutputComponent &stochasticOutput, const tInteger &outputId, tIndex &iCycleStep)
 init the cycle of beam run More...
 
void nextCycleStep (const tIndex &iCycleStep, SM_Beam &beam, const SM_StochasticOutputComponent &output)
 next step of the cycle of beam run More...
 
void nextCycleStep (const tIndex &iCycleStep, SM_Beam &beam, const tInteger &outputId, const SM_StochasticOutputComponent &output)
 next step of the cycle of beam run More...
 
tBoolean isCycleFinished (const tIndex &iCycle, const SM_Beam &beam)
 return true if the cycle is finished More...
 
tBoolean close (const tIndex &iCycle, const SM_Beam &beam)
 return true if the cycle is close without error More...
 
virtual tString toString () const override
 return the string representation of the class
 
- 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...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations 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

template<class CYCLE_CLASS>
class SM_BeamCycle< CYCLE_CLASS >

This class is an interface of Beam Cycle class for Stoch Microm package.

Author
Stephane Despreaux
Version
2.0

Member Function Documentation

◆ close()

template<class CYCLE_CLASS >
tBoolean SM_BeamCycle< CYCLE_CLASS >::close ( const tIndex &  iCycle,
const SM_Beam beam 
)
inline

return true if the cycle is close without error

Parameters
[in]iCycle: index of the cycle
[in]beam: beam to run
Returns
return true if the cycle is close without error

◆ getMemorySize()

template<class CYCLE_CLASS >
virtual tMemSize SM_BeamCycle< CYCLE_CLASS >::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 CORE_Object.

Reimplemented in SM_BeamTimeStepRange, SM_BeamTemperatureRange, SM_BeamRandomJRange, and SM_BeamHysteresis.

◆ isCycleFinished()

template<class CYCLE_CLASS >
tBoolean SM_BeamCycle< CYCLE_CLASS >::isCycleFinished ( const tIndex &  iCycle,
const SM_Beam beam 
)
inline

return true if the cycle is finished

Parameters
[in]iCycle: index of the cycle
[in]beam: beam to run

◆ isSeedUpdatedPerCycleStep()

template<class CYCLE_CLASS >
const tBoolean& SM_BeamCycle< CYCLE_CLASS >::isSeedUpdatedPerCycleStep ( ) const
inline

return true if the seed is generated at each cycle step

Returns
true if the seed is generated at each cycle step

◆ isStochasticOutputSavedAtEachStep()

template<class CYCLE_CLASS >
const tBoolean& SM_BeamCycle< CYCLE_CLASS >::isStochasticOutputSavedAtEachStep ( ) const
inline

get if the output is saved at each step

Returns
true if stochastic output is saved at each step of the cycle

◆ nextCycleStep() [1/2]

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::nextCycleStep ( const tIndex &  iCycleStep,
SM_Beam beam,
const SM_StochasticOutputComponent output 
)
inline

next step of the cycle of beam run

Parameters
[in]iCycleStep:index of the cycle
[in,out]beam: beam to run
[in]output: stochastic output of the step of the cycle

◆ nextCycleStep() [2/2]

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::nextCycleStep ( const tIndex &  iCycleStep,
SM_Beam beam,
const tInteger &  outputId,
const SM_StochasticOutputComponent output 
)
inline

next step of the cycle of beam run

Parameters
[in]iCycleStep:index of the cycle
[in,out]beam: beam to run
[in]outputId: id of the output
[in]output: stochastic output of the cycle

◆ open()

template<class CYCLE_CLASS >
tBoolean SM_BeamCycle< CYCLE_CLASS >::open ( SM_Beam beam,
SM_StochasticOutputComponent stochasticOutput,
const tInteger &  outputId,
tIndex &  iCycleStep 
)
inline

init the cycle of beam run

Parameters
[in,out]beam: beam to run
[in,out]stochasticOutputstochastic output of the beam runner
[in]outputId: id of the output
[out]iCycleStepindex of the cycle step not equal to 0 for restore

◆ setIsRestoring()

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::setIsRestoring ( const tBoolean &  v)
inline

set to true if the cycle is restoring

Parameters
[in]v: true to start the cycle from last computed cycle index

◆ setIsSeedUpdatedPerCycleStep()

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::setIsSeedUpdatedPerCycleStep ( const tBoolean &  b)
inline

set if the seed is generated at each step of the cycle

Parameters
[in]b: true if the seed is reset for stochastic functioin at each cycle

◆ setIsStochasticOutputSavedAtEachStep()

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::setIsStochasticOutputSavedAtEachStep ( const tBoolean &  b)
inline

set is the output is saved at each step

Parameters
[in]b: true to save stochastic output at each step of the cycle

◆ setSeedPerCycleStep()

template<class CYCLE_CLASS >
void SM_BeamCycle< CYCLE_CLASS >::setSeedPerCycleStep ( const tULLInt &  seed)
inline

set the seed per step of each step cycle

Parameters
[in]seed: seed of stochastic fonction

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