1 #ifndef SM_MonteCarloSystem_H
2 #define SM_MonteCarloSystem_H
9 #include "SM_StochasticOutput.h"
12 #include "SM_MultiStochasticFunctions.h"
15 #include "SM_Network.h"
18 #include "SM_Material.h"
21 #include "SM_Operator.h"
54 tIndex mRejectsNumber;
148 return mRejectsNumber;
170 return mRejectsNumber;
183 virtual void normalize(
const tBoolean& isAdimensionized)
override {
220 template<
class StochOutputImplement>
222 std::cout<<
"No deterministic running method for Monte Carlo system \n";
239 template<
class StochOutputImplement>
250 template<
class StochFunctionsImplement>
260 template<
class StochFunctionsImplement,
class StochOutputImplement>
288 const tIndex& stepIndex,
const tReal& alpha,
const tReal& sigma,
289 tIndex& nMoves,tIndex& nRejects);
303 template<
class StochFunctionsImplement>
307 const tIndex& stepIndex,
const tReal& alpha,
const tReal& sigma,
308 tIndex& nMoves,tIndex& nRejects);
324 template<
class StochFunctionsImplement>
327 tReal *bS,
const tReal* eS)
const;
344 tReal *bS,
const tReal* eS)
const ;
350 virtual tString
toString()
const override;
354 #include "SM_MonteCarloSystem.hpp"
static constexpr tDimension DIM
space dimension
Definition: SM_Constants.h:80
static constexpr tReal K_B
Boltzmann constants : .
Definition: SM_Constants.h:44
static constexpr tReal CMU_B
constant of Bohr magneton :
Definition: SM_Constants.h:24
static constexpr tReal CK_B
constant of Boltzmann constants :
Definition: SM_Constants.h:40
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
const tReal & getCharacteristicEnergy() const
get the characteristic energy in J
Definition: SM_Material.h:361
This class is a simulation of one Monte carlo trajectory class for Stoch Magnet package....
Definition: SM_MonteCarloSystem.h:39
const tReal & getEnergyScaling() const
get the energy scaling
Definition: SM_MonteCarloSystem.h:140
virtual void updateStateForNextStep(SM_RealField &St)=0
update the state for next step
void MCStep(SM_MultiStochasticFunctionsInterface &multiStochasticFunctions, const SM_Material &material, const SM_Network &network, SM_RealField &S, const tIndex &stepIndex, const tReal &alpha, const tReal &sigma, tIndex &nMoves, tIndex &nRejects)
stepper step
Definition: SM_MonteCarloSystem.cpp:61
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MonteCarloSystem.h:105
void MCStepWithSCStochasticFunctions(SM_MultiStochasticFunctions< StochFunctionsImplement > &multiStochasticFunctions, const SM_Material &material, const SM_Network &network, SM_RealField &S, const tIndex &stepIndex, const tReal &alpha, const tReal &sigma, tIndex &nMoves, tIndex &nRejects)
stepper step with templated stochastic function
Definition: SM_MonteCarloSystem.hpp:229
virtual void normalize(const tBoolean &isAdimensionized) override
normalize the system
Definition: SM_MonteCarloSystem.h:183
SM_MonteCarloSystem(void)
create a class
Definition: SM_MonteCarloSystem.h:62
const tIndex & getRejectsNumber() const
get the rejects number
Definition: SM_MonteCarloSystem.h:147
virtual tULLInt getGeneratedRandomNumbers() const override
get the generated of random number within a stochastic run
Definition: SM_MonteCarloSystem.h:205
tIndex & getRejectsNumber()
get the rejects number
Definition: SM_MonteCarloSystem.h:169
const tIndex & getMovesNumber() const
get the moves number
Definition: SM_MonteCarloSystem.h:154
void randomTrialMove(SM_StochasticFunctionsInterface &stochasticFunctions, const tReal &sigma, tReal *bS, const tReal *eS) const
make a trial move
Definition: SM_MonteCarloSystem.cpp:133
virtual void setNoiseTemperature(const tReal &T) override
set the noise as a temperature in Kelvin
Definition: SM_MonteCarloSystem.h:119
tIndex & getMovesNumber()
get the move number
Definition: SM_MonteCarloSystem.h:162
virtual void discretize() override
discretize the system
Definition: SM_MonteCarloSystem.h:190
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_MonteCarloSystem.h:93
tBoolean deterministicRun(const tIndex &steppersNumber, SM_StochasticOutput< StochOutputImplement > &data)
compute deterministic running of steppers number of the system with computing statistics
Definition: SM_MonteCarloSystem.h:221
tBoolean stochasticRunWithSCStochasticFunctions(const tIndex &steppersNumber, SM_MultiStochasticFunctions< StochFunctionsImplement > &sfs)
compute the relaxation process by calling only virtual methods
Definition: SM_MonteCarloSystem.hpp:89
const tReal & getNoiseRate() const
get the noise rate constant
Definition: SM_MonteCarloSystem.h:134
virtual tString toString() const override
turn the class into a string representation
Definition: SM_MonteCarloSystem.cpp:180
tBoolean stochasticRun(const tIndex &steppersNumber, SM_MultiStochasticFunctionsInterface &sfs)
compute the steppers number of system for reaching the relaxed state
Definition: SM_MonteCarloSystem.cpp:3
void randomTrialMoveWithSCStochasticFunctions(SM_StochasticFunctions< StochFunctionsImplement > &stochasticFunctions, const tReal &sigma, tReal *bS, const tReal *eS) const
make a trial move
Definition: SM_MonteCarloSystem.hpp:300
virtual ~SM_MonteCarloSystem(void)
destroy the class
Definition: SM_MonteCarloSystem.h:72
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctionsInterface.h:18
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctions.h:26
This class is describes a network composed by.
Definition: SM_Network.h:66
const tInteger & getParticlesNumber() const
return the particles number
Definition: SM_Network.h:349
This class describes a stochastic functions based on same random number generator which implement ran...
Definition: SM_StochasticFunctionsInterface.h:18
This class describes a stochastic functions with templated methods.
Definition: SM_StochasticFunctions.h:25
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
const SM_Network & getNetwork() const
get the network
Definition: SM_System.h:170
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_System.h:140
const SM_Material & getMaterial() const
get the material of the network
Definition: SM_System.h:193
virtual void setNoiseTemperature(const tReal &T)
set the noise as a temperature in Kelvin
Definition: SM_System.h:392