C++ mpi module for stochmagnet_main Package
SM_MonteCarloBeam.h
1 #ifndef SM_MonteCarloBeam_H
2 #define SM_MonteCarloBeam_H
3 
4 //base class
5 #include "SM_Beam.h"
6 
7 //system header
8 #include "SM_MonteCarloSystem.h"
9 
17 class SM_MonteCarloBeam : public SM_Beam {
18 
19  //attributes
20 private :
21 
22  //class types
23  typedef SM_MonteCarloBeam Self;
24  typedef SM_Beam SuperClass;
25 
26  //system type
28 
29 protected:
30  // CONSTRUCTORS
34  }
35  // DESTRUCTORS
38  virtual ~SM_MonteCarloBeam(void) {
39  }
40 
41 public :
42  // CREATE class as a pointer
43 
47  inline static CORE_UniquePointer<Self> New() {
48  return CORE_UniquePointer<Self>(new Self(),
49  Self::Delete());
50  }
51 
52 
53 
54  //MEMORY
55 
69  virtual tMemSize getMemorySize() const override {
70  return sizeof(*this)+getContentsMemorySize();
71  }
72 
81  virtual tMemSize getContentsMemorySize() const override {
82  tMemSize mem=SuperClass::getContentsMemorySize();
83  return mem;
84  }
85 
86 
87  //beam runner
88  //===========
89 
90 
94  template<class StochOutputImplement>
96  return SM_Beam::run<SM_MonteCarloSystem,StochOutputImplement>(outputSData);
97  }
98 
102  template<class StochOutputImplement>
104 
105 
110  template<class StochFunctionsImplement, class StochOutputImplement>
113 
114 
119  template<class StochOutputImplement>
121  const std::function<void(const tReal&,const tReal& ,const tReal&,tReal& )>& J) {
122  throw CORE_Exception("stochmagnet/monteCarlo",
123  "SM_MonteCarloBeam::stochasticJRun(...)",
124  "method not implemented. Aborted.");
125  }
126 
127 
128 };
129 
130 #include "SM_MonteCarloBeam.hpp"
131 #endif
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:17
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class defines a general stochastic beam of trajectories of system.
Definition: SM_Beam.h:61
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: SM_Beam.h:133
This class is a simulation of a Monte Carlo for spins system.
Definition: SM_MonteCarloBeam.h:17
virtual tMemSize getContentsMemorySize() const override
return the memory size of the included associations
Definition: SM_MonteCarloBeam.h:81
virtual ~SM_MonteCarloBeam(void)
destroy the instance of class
Definition: SM_MonteCarloBeam.h:38
static CORE_UniquePointer< Self > New()
build a new instance of a SM_MonteCarloBeam
Definition: SM_MonteCarloBeam.h:47
SM_MonteCarloBeam(void)
create an instance of class
Definition: SM_MonteCarloBeam.h:33
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_MonteCarloBeam.h:69
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
tBoolean stochasticJRun(SM_StochasticOutput< StochOutputImplement > &outputSData, const std::function< void(const tReal &, const tReal &, const tReal &, tReal &)> &J)
run the simulations
Definition: SM_MonteCarloBeam.h:120
This class is a simulation of one Monte carlo trajectory class for Stoch Magnet package....
Definition: SM_MonteCarloSystem.h:39
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