C++ main module for emicrom Package  1.0
EMM_LandauLifschitzRelaxation.h
Go to the documentation of this file.
1 #ifndef EMM_LandauLifschitzRelaxation_H
2 #define EMM_LandauLifschitzRelaxation_H
3 
4 
6 
33 
35  // ATTRIBUTES
36 
37 public:
38 
39 
40 
41 
42 private:
43 
44 
46 
47  //time data
51 
52  //M variable: the normalized magnetization field at t into current time step
53  SP::EMM_RealField mMt;
54 
55 
56  //the complete excitation field at t into current time step
57  SP::EMM_RealField mHt;
58 
59 
60  //states wich defines the relaxation process:
61  //===========================================
62 
63 
64 protected:
65  // METHODS
66 
67  // CONSTRUCTORS
68 
72 
73 
74 
75  // DESTRUCTORS
76 
77 
80  virtual ~EMM_LandauLifschitzRelaxation(void);
81 
82 
83 public:
84 
85  //NEW constructor
86 protected:
87 
88 
89  //DATA methods
90  //=============
91 public:
92 
96  inline void setTimeIntegrationOrder(const int& order) {
97  mTimeIntegrationOrder=order;
98  }
99 
103  inline const tUCInt& getTimeIntegrationOrder() const {
104  return mTimeIntegrationOrder;
105  }
106 
110  virtual const tUInteger& getTimeStepsNumber() const {
111  return mTimeStep;
112  }
116  virtual const tReal& getTime() const {
117  return mT;
118  }
122  virtual const tReal& getTimeStep() const {
123  return mDt;
124  }
125 
126 
127 
128 
129 
130  //MAGNETIZATION field methods
131  //===========================
132 protected:
137  return *mMt.get();
138  }
143  return *mHt.get();
144  }
145 
146 
147 
148 protected:
159  const tFlag& order,
160  const EMM_RealArray& sigma,
161  const EMM_RealField& dM_dt0,
162  const EMM_RealField& M0,
163  EMM_RealField& Mt)=0;
164 
165 public:
172  EMM_RealField& Mt) {
174  mTimeIntegrationOrder,
175  getSigma(),
177  Mt,
178  Mt);
179 
180  }
181 
192  EMM_RealField& Mt) {
193 
194  tBoolean succeeds=integrateMagnetizationFieldAtTime(dt,mTimeIntegrationOrder,
195  getSigma(),
198  Mt);
199  Mt.normalize();
200  return succeeds;
201  }
202 
203 
204 
205 
206 
207  //ENERGY methods
208  //==============
209 
210 
211 
218  tReal computeEnergyTimeDerivativeAtTime(const tReal& t,const tFlag& order,tReal& dE_dt);
219 
225  tReal computeEnergyAtTime(const tReal& t,const tFlag& order);
226 
227 
228 
229 
230  //Integration methods
231  //===================
232 
233 
234 public:
235 
236 
245  void computeFieldsAtTime(const tReal& t,
246  const tFlag& order,
247  const EMM_RealArray& sigma,
248  const EMM_RealField& dM_dt0,
249  const EMM_RealField& M0,
250  EMM_RealField& Mt);
251 
258  virtual void integrate(const tBoolean& isRestoring,tSInt& retCode) {
259  makeRelaxation(isRestoring,retCode);
260  }
261 
290  void makeRelaxation(const tBoolean& isRestoring,tSInt& retCode);
291 
292 
293 
294 
295 private:
298  void computeFieldsAtTime(const tReal& t);
299 
300 
301  //BACKUP & LOG methods
302  //====================
303 public:
304 
305 
306 
307 
308 
309 };
310 
311 #endif
virtual void integrate(const tBoolean &isRestoring, tSInt &retCode)
solve the system
Definition: EMM_LandauLifschitzRelaxation.h:258
EMM_RealField & getMagneticExcitationFieldAtTime() const
get the temporary magnetic excitation field at t
Definition: EMM_LandauLifschitzRelaxation.h:142
virtual const tUInteger & getTimeStepsNumber() const
return the computed time steps
Definition: EMM_LandauLifschitzRelaxation.h:110
EMM_LandauLifschitzRelaxation(void)
create the class
Definition: EMM_LandauLifschitzRelaxation.cpp:14
tBoolean computeMagnetizationFieldAtTime(const tReal &dt, EMM_RealField &Mt)
compute the fields of all operators at time
Definition: EMM_LandauLifschitzRelaxation.h:191
#define tUInteger
Definition: types.h:91
SP::EMM_RealField mHt
Definition: EMM_LandauLifschitzRelaxation.h:57
#define tUCInt
Definition: types.h:21
virtual ~EMM_LandauLifschitzRelaxation(void)
destroy the class
Definition: EMM_LandauLifschitzRelaxation.cpp:51
#define tBoolean
Definition: types.h:139
tReal computeEnergyTimeDerivativeAtTime(const tReal &t, const tFlag &order, tReal &dE_dt)
compute 0-th time derivative and first time derivative of the energy used in EMM_QuasiNewtonIterative...
Definition: EMM_LandauLifschitzRelaxation.cpp:102
virtual const tReal & getTimeStep() const
return the current time step
Definition: EMM_LandauLifschitzRelaxation.h:122
EMM_RealField & getMagnetizationFieldAtTime() const
get the temporary magnetization field at t
Definition: EMM_LandauLifschitzRelaxation.h:136
const EMM_RealArray & getSigma() const
get the sigma parameters
Definition: EMM_LandauLifschitzSystem.h:643
const tUCInt & getTimeIntegrationOrder() const
get the time integration order
Definition: EMM_LandauLifschitzRelaxation.h:103
tUInteger mTimeStep
Definition: EMM_LandauLifschitzRelaxation.h:48
tReal mDt
Definition: EMM_LandauLifschitzRelaxation.h:49
#define tSInt
Definition: types.h:30
SP_OBJECT(EMM_LandauLifschitzRelaxation)
tBoolean integrateMagnetizationFieldAtTime(const tReal &t, EMM_RealField &Mt)
integrate the magnetization field at time t from time and derivative field at time 0 ...
Definition: EMM_LandauLifschitzRelaxation.h:171
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
tReal mT
Definition: EMM_LandauLifschitzRelaxation.h:50
virtual tBoolean integrateMagnetizationFieldAtTime(const tReal &t, const tFlag &order, const EMM_RealArray &sigma, const EMM_RealField &dM_dt0, const EMM_RealField &M0, EMM_RealField &Mt)=0
integrate the magnetization field at time t from time and derivative field at time 0 ...
This class describes a real array.
Definition: EMM_RealArray.h:16
virtual const tReal & getTime() const
return the current time
Definition: EMM_LandauLifschitzRelaxation.h:116
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzRelaxation.h:32
virtual void normalize()=0
normalize the field
void computeFieldsAtTime(const tReal &t, const tFlag &order, const EMM_RealArray &sigma, const EMM_RealField &dM_dt0, const EMM_RealField &M0, EMM_RealField &Mt)
compute the fields of all operators and the magnetization field at time t
Definition: EMM_LandauLifschitzRelaxation.cpp:167
const EMM_RealField & getMagnetizationFieldTimeDerivative() const
get the magnetization variation field with respect to time at time 0 of the current time step ...
Definition: EMM_LandauLifschitzSystem.h:630
tReal computeEnergyAtTime(const tReal &t, const tFlag &order)
compute energy for t in [0,dt[ where dt will be the next time step used in EMM_IterativeTime::compute...
Definition: EMM_LandauLifschitzRelaxation.cpp:61
void makeRelaxation(const tBoolean &isRestoring, tSInt &retCode)
compute the relaxation
Definition: EMM_LandauLifschitzRelaxation.cpp:240
void setTimeIntegrationOrder(const int &order)
set the time integration order
Definition: EMM_LandauLifschitzRelaxation.h:96
This class describes a real field.
Definition: EMM_RealField.h:21
SP::EMM_RealField mMt
Definition: EMM_LandauLifschitzRelaxation.h:53
const EMM_RealField & getMagnetizationField() const
return the adimensionized magnetisation field associated to the problem for reading at time 0 of the ...
Definition: EMM_LandauLifschitzSystem.h:616
#define tReal
Definition: types.h:118
DEFINE_SPTR(EMM_LandauLifschitzRelaxation)
tUCInt mTimeIntegrationOrder
Definition: EMM_LandauLifschitzRelaxation.h:45
#define tFlag
Definition: types.h:74