C++ mpi module for stochmagnet_main Package
SMOMPI_MonteCarloSystem.h
1 #ifndef SMOMPI_MonteCarloSystem_H
2 #define SMOMPI_MonteCarloSystem_H
3 
4 //base class
5 #include "SM_MonteCarloSystem.h"
6 
7 
26 
27  //attributes
28 private :
29 
32 
33 
34 
35 
36 protected:
37  // CONSTRUCTORS
41 
42  }
43 
44  // DESTRUCTORS
47  virtual ~SMOMPI_MonteCarloSystem(void) {
48  }
49 
50 public :
51 
52 
53  //MEMORY
54 
68  virtual tMemSize getMemorySize() const {
69  return sizeof(*this)+getContentsMemorySize();
70  }
71 
80  virtual tMemSize getContentsMemorySize() const {
81  tMemSize mem=SuperClass::getContentsMemorySize();
82 
83  return mem;
84  }
88  inline static CORE_UniquePointer<Self> New() {
89  return CORE_UniquePointer<Self>(new Self(),
90  Self::Delete());
91  }
92 
93 
94  //computational methods
95  //=====================
96 
97 public:
100  tBoolean initializeMagneticMomentDirections() final;
101 
102 
103  //simulation methods
104  //===================
105 
106 protected:
107 
112  virtual void updateStateForNextStep(SM_RealField& St) final;
113 
114 
115 
116 };
117 
118 #endif
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class is a MPI implementation of simulation of a Monte Carlo method.
Definition: SMOMPI_MonteCarloSystem.h:25
tBoolean initializeMagneticMomentDirections() final
initialize magnetic moments of the particles of the network
Definition: SMOMPI_MonteCarloSystem.cpp:7
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SMOMPI_MonteCarloSystem.h:80
SMOMPI_MonteCarloSystem(void)
create a class
Definition: SMOMPI_MonteCarloSystem.h:40
virtual void updateStateForNextStep(SM_RealField &St) final
update the state for next step
Definition: SMOMPI_MonteCarloSystem.cpp:36
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_MonteCarloSystem.h:68
virtual ~SMOMPI_MonteCarloSystem(void)
destroy the class
Definition: SMOMPI_MonteCarloSystem.h:47
static CORE_UniquePointer< Self > New()
build a new instance of a system
Definition: SMOMPI_MonteCarloSystem.h:88
This class is a simulation of one Monte carlo trajectory class for Stoch Magnet package....
Definition: SM_MonteCarloSystem.h:39
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MonteCarloSystem.h:105