10 #include "SM_Object.h"
13 #include "SM_System.h"
16 #include "SM_MultiStochasticFunctions.h"
19 #include "SM_StochasticOutput.h"
69 tIndex mBeginSimulationIndex;
70 tIndex mEndSimulationIndex;
76 CORE_UniquePointer<SM_System> mSystem;
79 CORE_UniquePointer<SM_MultiStochasticFunctionsInterface> mMultiStochasticFunctions;
82 tIndex mPreconditioningStepsNumber;
92 mPreconditioningStepsNumber=0;
94 mBeginSimulationIndex=0;
95 mEndSimulationIndex=mBeamSize;
135 mem+=(mMultiStochasticFunctions.get()==
null)?0:mMultiStochasticFunctions->getMemorySize();
136 mem+=(mSystem.get()==
null)?0:mSystem->getMemorySize();
151 mBeginSimulationIndex=0;
152 mEndSimulationIndex=n;
160 mBeginSimulationIndex=s0;
161 mEndSimulationIndex=s1;
175 s0= mBeginSimulationIndex;
176 s1= mEndSimulationIndex;
188 mPreconditioningStepsNumber=n;
195 return mPreconditioningStepsNumber;
217 mMultiStochasticFunctions.reset();
224 mMultiStochasticFunctions=std::move(f);
231 return (mMultiStochasticFunctions.get()!=
null);
237 return *mMultiStochasticFunctions.get();
243 return *mMultiStochasticFunctions.get();
257 inline void setSystem(CORE_UniquePointer<SM_System> system) {
258 mSystem=std::move(system);
265 return *mSystem.get();
272 return *mSystem.get();
279 return (mSystem.get()!=
null);
288 inline void normalize(
const tBoolean& isAdimensionized) {
306 template<
class System,
class StochOutputImplement>
316 std::stringstream ret;
320 ret<<
"beam size: "<<mBeamSize<<
"\n";
321 ret<<
"preconditioning steps number: "<<mPreconditioningStepsNumber<<
"\n";
322 ret<<
"steps number: "<<mStepsNumber<<
"\n";
324 ret<<
"stochastic Function:";
325 if (mMultiStochasticFunctions.get()!=
null)
326 ret<<mMultiStochasticFunctions->toString()<<
"\n";
341 #include "SM_Beam.hpp"
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: CORE_Object.h:278
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.h:333
This class defines a general stochastic beam of trajectories of system.
Definition: SM_Beam.h:61
const SM_System & getSystem() const
get the system
Definition: SM_Beam.h:264
SM_System & getSystem()
get the system
Definition: SM_Beam.h:271
SM_Beam(void)
create
Definition: SM_Beam.h:90
SM_MultiStochasticFunctionsInterface & getStochasticFunctions()
get the stochastic functions
Definition: SM_Beam.h:242
tBoolean run(SM_StochasticOutput< StochOutputImplement > &outputSData)
run the simulations
Definition: SM_Beam.hpp:6
virtual tString toString() const override
turn the class into a string representation
Definition: SM_Beam.h:315
const SM_MultiStochasticFunctionsInterface & getStochasticFunctions() const
get the stochastic functions
Definition: SM_Beam.h:236
tBoolean hasStochasticFunctions() const
return true if the beam has a stochastic function
Definition: SM_Beam.h:230
void setPreconditioningStepsNumber(const tIndex &n)
set the number of steps of preconditioning
Definition: SM_Beam.h:187
const tIndex & getBeamSize(tIndex &s0, tIndex &s1) const
get the beam size
Definition: SM_Beam.h:174
void setStepsNumber(const tIndex &n)
set the number of steps for loop
Definition: SM_Beam.h:201
void discretize()
discretize its system and its stochastic function
Definition: SM_Beam.h:293
void resetStochasticFunctions()
reset the stochastic functions
Definition: SM_Beam.h:216
void normalize(const tBoolean &isAdimensionized)
adimensionize the beam data
Definition: SM_Beam.h:288
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: SM_Beam.h:133
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_Beam.h:121
tBoolean hasSystem() const
return true if the system of the beam is not null
Definition: SM_Beam.h:278
const tIndex & getBeamSize() const
get the beam size
Definition: SM_Beam.h:166
void setSystem(CORE_UniquePointer< SM_System > system)
set the system
Definition: SM_Beam.h:257
virtual ~SM_Beam(void)
destroy
Definition: SM_Beam.h:101
void setBeamSize(const tIndex &s0, const tIndex &s1)
set the beam size
Definition: SM_Beam.h:158
void setBeamSize(const tIndex &n)
set the beam size
Definition: SM_Beam.h:149
const tIndex & getStepsNumber() const
get the number of steps for stochastic computation
Definition: SM_Beam.h:207
const tIndex & getPreconditioningStepsNumber() const
get the number of steps for precoditioning
Definition: SM_Beam.h:194
void setStochasticFunctions(CORE_UniquePointer< SM_MultiStochasticFunctionsInterface > &f)
set the stochastic functions
Definition: SM_Beam.h:223
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctionsInterface.h:18
This class is a base class for Stoch Microm package.
Definition: SM_Object.h:36
this class implements the virtual methods of its base class SM_StochasticOutputComponent with templat...
Definition: SM_StochasticOutput.h:24
This class is a one simulation of a beam for Stoch Magnet package.
Definition: SM_System.h:53
virtual void discretize()
discretize the system
Definition: SM_System.h:546
virtual void normalize(const tBoolean &isAdimensionized)
normalize the system
Definition: SM_System.h:431
virtual tString toString() const override
turn the class into a string representation
Definition: SM_System.h:749