1 #ifndef SM_MonteCarloBeam_HPP
2 #define SM_MonteCarloBeam_HPP
6 #include "SM_TRNGStochasticFunctions.h"
7 #include "SM_TRNGStochasticFunctions_MT19937.h"
8 #include "SM_BoostStochasticFunctions.h"
9 #include "SM_STDStochasticFunctions.h"
10 #include "SM_MTStochasticFunctions.h"
13 template<
class StochOutputImplement>
34 if (ftrngp_lcg64!=
null) {
39 if (ftrngp_yarn2!=
null) {
43 if (ftrngp_mrg2!=
null) {
47 if (ftrngp_mrg3!=
null) {
51 if (ftrngp_mrg3s!=
null) {
55 if (ftrngp_mrg4!=
null) {
59 if (ftrngp_mrg5!=
null) {
63 if (ftrngp_mrg5s!=
null) {
72 return run(outputSData);
78 template<
class StochFunctionsImplement,
class StochOutputImplement>
82 tString routineName=
"SM_MonteCarloBeam::templatedRun<S,O>()";
96 if (!outputSData.
open(*
this)) {
97 std::cout<<
"stochastic output "<<outputSData.
getIdentityString()<<
" not compatible with the system \n";
101 for (tIndex s=s0;s<s1;s++) {
108 "SM_MonteCarloBeam::runWithSCStochasticFunctions(stochF,SM_StochasticOutput<StochOutputImplement>& outputSData)",
109 "initialization of S(t=0) failed");
114 outputSData.
open(s,system);
125 outputSData.
close(s,system,ok);
130 outputSData.
close(*
this);
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:17
tString getIdentityString() const
retrun the string identification of the class
Definition: CORE_Object.h:321
static void EndCallRoutine(const tString &routineName)
end calling routine
Definition: CORE_Profiler.h:91
static void StartCallRoutine(const tString &routineName)
start calling routine
Definition: CORE_Profiler.h:61
const SM_System & getSystem() const
get the system
Definition: SM_Beam.h:264
const SM_MultiStochasticFunctionsInterface & getStochasticFunctions() const
get the stochastic functions
Definition: SM_Beam.h:236
const tIndex & getBeamSize() const
get the beam size
Definition: SM_Beam.h:166
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
tBoolean runWithSCStochasticFunctions(SM_StochasticOutput< StochOutputImplement > &outputSData)
run the simulations
Definition: SM_MonteCarloBeam.hpp:14
tBoolean run(SM_StochasticOutput< StochOutputImplement > &outputSData)
run the simulations
Definition: SM_MonteCarloBeam.h:95
This class is a simulation of one Monte carlo trajectory class for Stoch Magnet package....
Definition: SM_MonteCarloSystem.h:39
tBoolean stochasticRunWithSCStochasticFunctions(const tIndex &steppersNumber, SM_MultiStochasticFunctions< StochFunctionsImplement > &sfs)
compute the relaxation process by calling only virtual methods
Definition: SM_MonteCarloSystem.hpp:89
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 implements the virtual methods of its base class SM_StochasticOutputComponent with templat...
Definition: SM_StochasticOutput.h:24
tBoolean close(const tIndex &s, const SM_System &system, const tBoolean &hasSucceeded)
close the stochastic data for the simulation s
Definition: SM_StochasticOutput.h:172
tBoolean open(const SM_Beam &beam)
open the stochastic data
Definition: SM_StochasticOutput.h:147
virtual tBoolean initializeMagneticMomentDirections()
initialize magnetic moments direction
Definition: SM_System.h:283