C++ main module for emicrom Package  1.0
EMM_LandauLifschitzSystem.h
Go to the documentation of this file.
1 #ifndef EMM_LandauLifschitzSystem_H
2 #define EMM_LandauLifschitzSystem_H
3 
4 #include "CORE_File.h"
5 
7 #include "EMM_Stepper.h"
8 #include "EMM_Grid3D.h"
9 #include "EMM_Matter.h"
10 #include "EMM_MatterField.h"
11 #include "EMM_RealField.h"
12 #include "EMM_RealArray.h"
14 
89 
91  // ATTRIBUTES
92 
93 public:
94 
95 
96  //retcode for relaxation
97  static const tSInt MIN_CODE;
100  static const tSInt E_INCREASING;
101  static const tSInt E_IS_NAN;
105  static const tSInt M_PARALLEL_H;
106  static const tSInt DT_MIN_IS_REACHED;
107 
108  static const tFlag OsM=1;//Operataor field and M are evoluating
109  static const tFlag MOs=2;//M and operator field are evoluating
110  static const tFlag M=3;//only M is evoluating
111  static const tFlag Os=4;//only Operator fields is evoluating
112 
113 private:
114  static const tString RET_STRING[];
115 
116 
117 private:
118 
119  //max number of operators
120  static const tFlag MAX_OPERATORS=5;
121 private:
122 
123  //Backup data
124  //=============
125  //the output path for saving file
127 
128  //the prefix for loading/saving the files
130 
131 
132  //backup step
134 
135  //backups number
137 
138 
139  //indicates if the backup is enabled
141 
142  //log
143  //====
144 
145  //indicates if the log is printed in log file
147 
148  //M evolution data
149  //============
150  //for initialization of M in a file
152 
153  //for initialization of uniform M
154  SP::EMM_RealField mMInitialData;
155 
156  //indicate the evolution scheme between operators fields & Magnetization field
158 
159 
160  //integration data
161  //=================
162  //min time step reachabled
164  //the relaxation criterium
166 
167  //Energy data
168  //============
169 
170  //energy
171  tReal mEs[MAX_OPERATORS+1];
172 
173  //variation of Energy among t
175 
176 
177  //ASSOCIATIONS
178  //============
179 
180  //Landau Lifschitz function
181  SP::EMM_LandauLifschitzFunction mLLFunction;
182 
183 
184  //cells of the problem
185  SP::EMM_Grid3D mMesh;
186 
187  //matter indices for each cell
188  SP::EMM_MatterField mMatters;
189 
190  //operators of the problem
191  SV::EMM_MagneticExcitationOperator mOperators;
192 
193  //time step of the system
194  SP::EMM_Stepper mStepper;
195 
196  //the weight of the M at eah cell (default 1. for uniform matters
197  SP::EMM_RealArray mSigma;
198 
199  //M variable: the normalized magnetization field at t=0 into current time step
200  SP::EMM_RealField mM;
201 
202  //the landau lifschitz function F = dM_dt
203  SP::EMM_RealField mF;
204 
205  //the complete excitation field at t=0 into current time step
206  SP::EMM_RealField mH;
207 
208  //magnetic excitation field for each operator
209  mutable SP::EMM_RealField mHop;
210 
211 
212 
213 
214 
215  //states wich defines the relaxation process:
216  //===========================================
217 
218 
219 protected:
220  // METHODS
221 
222  // CONSTRUCTORS
223 
227 
228 
229 
230  // DESTRUCTORS
231 
232 
235  virtual ~EMM_LandauLifschitzSystem(void);
236 
237 
238 public:
239 
240  //NEW constructor
241 protected:
242 
243 
244 
245  //mesh data
246  //=============
247 public:
252  inline tBoolean setMesh(SP::EMM_Grid3D mesh) {
253  if (mesh.get()!=null) {
254  mMesh=mesh;
255  return true;
256  }
257  return false;
258  }
262  inline const EMM_Grid3D& getMesh() const {
263  return *mMesh.get();
264  }
268  inline EMM_Grid3D& getMesh() {
269  return *mMesh.get();
270  }
271 
274  inline const tUIndex& getMagnetizedElementsNumber() const {
275  return mMesh->getMagnetizedElementsNumber();
276  }
277 
278  //matter data
279  //============
280 
284  inline const EMM_MatterField& getMatterField() const {
285  return *mMatters.get();
286  }
291  return *mMatters.get();
292  }
293 
294  //output data
295 
299  inline const tString& getPrefix() const {
300  return mPrefix;
301  }
305  inline const tString& getOutputPath() const {
306  return mOutputPath;
307  }
308 
309 
310  // initializer methods
311  //====================
312 
318  virtual void adimensionize();
319 
320 
338  virtual tBoolean discretize(const tBoolean& isMnormalized);
339 
357  inline tBoolean discretize() {
358  return discretize(false);
359  }
360 
361 
362  //OPERATOR methods
363  //==================
364 
365 public:
369  virtual tBoolean addOperator(SP::EMM_MagneticExcitationOperator op) {
370  if (op.get()!=null) {
371  mOperators.add(op);
372  return true;
373  }
374  return false;
375  }
378  inline void clearOperators() {
379  mOperators.clear();
380  }
381 
385  inline const SV::EMM_MagneticExcitationOperator& getOperators() const {
386  return mOperators;
387  }
388 
392  inline SV::EMM_MagneticExcitationOperator& getOperators() {
393  return mOperators;
394  }
395 
396 public:
400  inline tUIndex getOperatorsNumber() const {
401  return mOperators.getSize();
402  }
407  inline const EMM_Operator& getOperator(const tUIndex& index) const {
408  if (index>=mOperators.getSize())
409  throw EMM_Exception("EMM_LandauLifschitzSystem::getOperator("+CORE_Integer::toString(index)+")",
410  "index out of bounds [0,"+CORE_Integer::toString(mOperators.getSize())+"[");
411  const EMM_Operator *op=mOperators[index].get();
412  if (op==null) {
413  throw EMM_Exception("EMM_LandauLifschitzSystem::getOperator("+CORE_Integer::toString(index)+")",
414  "null operator at index");
415  }
416  return *op;
417  }
418 
423  inline EMM_Operator& getOperator(const tUIndex& index) {
424  if (index>=mOperators.getSize())
425  throw EMM_Exception("EMM_LandauLifschitzSystem::getOperator("+CORE_Integer::toString(index)+")",
426  "index out of bounds [0,"+CORE_Integer::toString(mOperators.getSize())+"[");
427  EMM_Operator *op=mOperators[index].get();
428  if (op==null) {
429  throw EMM_Exception("EMM_LandauLifschitzSystem::getOperator("+CORE_Integer::toString(index)+")",
430  "null operator at index");
431  }
432  return *op;
433 
434  }
435 
440  tBoolean isAffine() const;
441 
448 
455 
456 
457 
458 protected:
467  const tFlag& order,
468  const EMM_RealArray& sigma,
469  const EMM_RealField& dM_dt,
470  const EMM_RealField& M);
471 
481  const EMM_RealArray& sigma,
482  const EMM_RealField& Mt);
483 
489  const EMM_RealField& M);
490 
491 
492 
493 
494 
495  //MAGNETIZATION field methods
496  //===========================
497 
498 public:
499 
507  inline void computeFunction(const EMM_RealField& M,
508  const EMM_RealField& H,
509  EMM_RealField& F) const {
510  mLLFunction->computeFunction(getSigma(),M,H,F);
511  }
524  const EMM_RealField& H,
525  const EMM_RealField& D,
526  const EMM_RealField& gradH,
527  EMM_RealField& gradF) const {
528  mLLFunction->computeGradFunction(getSigma(),M,H,D,gradH,gradF);
529  }
541  const EMM_RealField& H,
542  const EMM_RealField& D,
543  EMM_RealField& gradF) const {
544  mLLFunction->computePartialGradMFunction(getSigma(),M,H,D,gradF);
545  }
546 
547 
548 
552  inline void setInitialMagnetization(const tString& dataFile) {
553  mMInitialDataFile=dataFile;
554  }
558  inline void setInitialMagnetization(const tReal data[3]) {
559  mMInitialData->setSize(1);
560  EMM_RealField &H=*mMInitialData.get();
561  H.setValue(0,data);
562  mMInitialDataFile="";
563  }
569  inline void setInitialMagnetization(const tReal &M0,const tReal& M1,const tReal& M2) {
570  mMInitialData->setSize(1);
571  EMM_RealField &H=*mMInitialData.get();
572  H.setValue(0,(tDimension)0,M0);
573  H.setValue(0,(tDimension)1,M1);
574  H.setValue(0,(tDimension)2,M2);
575  mMInitialDataFile="";
576  }
580  inline void setInitialMagnetization(const EMM_RealField& data) {
581  mMInitialData->copy(data);
582  mMInitialDataFile="";
583  }
584 
593  inline void setEvolutionScheme(const tFlag& f) {
594  mEvolutionScheme=f;
595  }
604  inline const tFlag& getEvolutionScheme() const {
605  return mEvolutionScheme;
606  }
610  return (mEvolutionScheme==Os);
611  }
612 
616  inline const EMM_RealField& getMagnetizationField() const {
617  return *mM.get();
618  }
619 
624  return *mM.get();
625  }
626 
631  return *mF.get();
632  }
637  return *mF.get();
638  }
639 
643  inline const EMM_RealArray& getSigma() const {
644  return *mSigma.get();
645  }
646 
647 
657  const EMM_RealField& Ht,
658  EMM_RealField& Ft) const {
659  computeFunction(Mt,Ht,Ft);
660  }
661 
662 
663 
664 
665  //MAGNETIC EXCITATION methods
666  //===========================
667 
668 public:
669 
674  return *mHop.get();
675  }
680  return *mH.get();
681  }
686  return *mH.get();
687  }
688 
689 
697  EMM_RealField& H) const;
698 
705  EMM_RealField& H) const;
706 
714  }
715 
716 
717 
727  EMM_RealField& H,
728  tReal Es[]) const;
729 
730 
731 
732 
733 
734 public:
743  const EMM_RealField& H,
744  EMM_RealField& F) {
746  }
747 
751  void computeMeanMagnetizationField(tReal* meanM) const;
752 
757  void computeMeanField(const EMM_RealField& F,tReal *meanF) const;
758 
759 
760  //ENERGY methods
761  //==============
765  inline static tUSInt getEnergiesNumber() {
766  return MAX_OPERATORS+1;
767  }
771  inline const tReal& getEnergy() const {
772  return *mEs;
773  }
778  inline const tReal& getEnergyTimeDerivative(tReal& dE_dt) const {
779  dE_dt=mdE_dt;
780  return *mEs;
781  }
782 
783 
787  inline void setMinimumEnergyVariation(const tReal& v) {
788  mMinEnergyVariation=v;
789  }
793  inline const tReal& getMinimumEnergyVariation() const {
794  return mMinEnergyVariation;
795  }
801  tReal computeEnergy() const;
802 
810  const EMM_RealField& H) const {
811  return (-2*getMesh().getAdimensionizedVolume()*F.dot(getSigma(),H));
812  }
813 
814 
815 protected:
819  inline tReal* getEnergies() {
820  return mEs;
821  }
826  return mdE_dt;
827  }
828 
829  //stepper methods
830  //=============
831 public:
832 
833 
837  inline void setMinimumTimeStep(const tReal& v) {
838  mMinDt=v;
839  }
843  inline const tReal& getMinimumTimeStep() const {
844  return mMinDt;
845  }
849  virtual const tUInteger& getTimeStepsNumber() const=0;
850 
854  virtual const tReal& getTime() const=0;
855 
859  virtual const tReal& getTimeStep() const=0;
860 
861 
862 public:
867  inline tBoolean setStepper(SP::EMM_Stepper time) {
868  //verify time is not null
869  if (time.get()==null) {
870  resetStepper();
871  return false;
872  }
873  //the time is already set
874  if (mStepper.get()==time.get()) return true;
875 
876  //reset the time relation
877  resetStepper();
878  //set the time relation
879  if (time->setSystem(getThis())) {
880  mStepper=time;
881  //set the inverse relation
882  mStepper->setSystem(getThis());
883  return true;
884  }
885  return false;
886  }
887 
890  inline void resetStepper() {
891  //do nothing if the time is null
892  if (mStepper.get()==null) return;
893  //store the time of this
894  SP::EMM_Stepper oldTime=mStepper;
895  //set to null the time of thies
896  mStepper.reset();
897  //reset the old time inverse time system relation
898  oldTime->resetSystem();
899 
900  }
901 
902 
906  inline const EMM_Stepper& getStepper() const {
907  return *mStepper.get();
908  }
913  return *mStepper.get();
914  }
915 
916  //RELAXATION methods
917  //===================
918 
919 
920 public:
921 
922 
923 
931  virtual void integrate(const tBoolean& isRestoring,tSInt& retCode)=0;
932 
937  virtual tString getInformation(const tUSInt& retCode) {
938  return RET_STRING[retCode-MIN_CODE];
939  }
940 
941  //BACKUP & LOG methods
942  //====================
943 public:
944 
948  inline void setIsLogPrinted(const tBoolean& v) {
949  mIsLogPrinted=v;
950  }
954  inline const tBoolean& isLogPrinted() const {
955  return mIsLogPrinted;
956  }
957 
970  void printLog(const tUInteger& timeStep,
971  const tReal& t,
972  const map<tString,tString>& stepperData,
973  const tUIndex& nMagnetizedElements,
974  const tReal Es[],
975  const tReal& dE_dt,
976  const tReal& DeltaE_DeltaT,
977  const tReal *meanM,
978  const tReal *meanH) const;
979 
985  inline void setOutputPath(const tString& currentPath,const tString& path,const tString& prefix) {
986 
987  //set the output path
988  mOutputPath=path;
989  if (mOutputPath.rfind(CORE_File::PATH_SEPARATOR)+1!=mOutputPath.length()) {
990  mOutputPath+=CORE_File::PATH_SEPARATOR;
991  }
992  //verify the path terminates by a path separator
993  if (!CORE_File::isAbsolutePath(mOutputPath)) {
994  //the output path is not absolute
995  if (currentPath.rfind(CORE_File::PATH_SEPARATOR)+1!=currentPath.length()) {
996  mOutputPath=currentPath+CORE_File::PATH_SEPARATOR+mOutputPath;
997  } else {
998  mOutputPath=currentPath+mOutputPath;
999  }
1000  }
1001 
1002  mPrefix=prefix;
1003  }
1004 
1005 
1009  inline void setBackupStep(const tUInteger& n) {
1010  mBackupStep=n;
1011  }
1015  inline void setBackupsNumber(const tUInteger& n) {
1016  if (n==0) mBackupsNumber=1;
1017  else mBackupsNumber=n;
1018  }
1019 
1020 
1024  inline void setIsBackupEnabled(const tBoolean& v) {
1025  mIsBackupEnabled=v;
1026  }
1027 
1031  inline const tBoolean& isBackupEnabled() const {
1032  return mIsBackupEnabled;
1033  }
1034 
1038  inline const tUInteger& getBackupsNumber() const {
1039  return mBackupsNumber;
1040  }
1044  inline const tUInteger& getBackupStep() const {
1045  return mBackupStep;
1046  }
1047 
1048 
1049 
1050 
1051 
1052 
1053 
1054 public:
1058  virtual tString toString() const;
1059 
1060 
1061 };
1062 
1063 #endif
static const tFlag Os
Definition: EMM_LandauLifschitzSystem.h:111
const SV::EMM_MagneticExcitationOperator & getOperators() const
return the operators vector
Definition: EMM_LandauLifschitzSystem.h:385
const tString & getPrefix() const
get the prefix of the generating files
Definition: EMM_LandauLifschitzSystem.h:299
This class is a base class of E-MicromM core package.
Definition: EMM_Object.h:21
void computeGradFunction(const EMM_RealField &M, const EMM_RealField &H, const EMM_RealField &D, const EMM_RealField &gradH, EMM_RealField &gradF) const
compute the gradient landau-lifschitz function at the direction D in M
Definition: EMM_LandauLifschitzSystem.h:523
EMM_RealField & getWorkingMagneticExcitationField() const
get mutable adimensionized magnetic excitation working field
Definition: EMM_LandauLifschitzSystem.h:673
static const tSInt E_INCREASING
Definition: EMM_LandauLifschitzSystem.h:100
This class describes a grid3d mesh.
Definition: EMM_Grid3D.h:48
const tReal & getEnergy() const
return the energy
Definition: EMM_LandauLifschitzSystem.h:771
static const tSInt MIN_CODE
Definition: EMM_LandauLifschitzSystem.h:97
tUInteger mBackupStep
Definition: EMM_LandauLifschitzSystem.h:133
DEFINE_SPTR(EMM_LandauLifschitzSystem)
EMM_LandauLifschitzSystem(void)
create the class
Definition: EMM_LandauLifschitzSystem.cpp:40
SV::EMM_MagneticExcitationOperator & getOperators()
return the operators vector
Definition: EMM_LandauLifschitzSystem.h:392
static const tSInt MAGNETIZATION_FIELD_UPDATE_ERROR
Definition: EMM_LandauLifschitzSystem.h:98
tBoolean mIsBackupEnabled
Definition: EMM_LandauLifschitzSystem.h:140
tReal & getEnergyTimeDerivative()
get the energgy time derivative
Definition: EMM_LandauLifschitzSystem.h:825
static const tString PATH_SEPARATOR
path separator depending on system
Definition: CORE_File.h:24
void setMinimumEnergyVariation(const tReal &v)
set minimum energy variation under which the relaxation is supposed to be reached ...
Definition: EMM_LandauLifschitzSystem.h:787
SP::EMM_RealArray mSigma
Definition: EMM_LandauLifschitzSystem.h:197
#define tUInteger
Definition: types.h:91
static const tSInt DT_MIN_IS_REACHED
Definition: EMM_LandauLifschitzSystem.h:106
tReal computeEnergyTimeDerivative(const EMM_RealField &F, const EMM_RealField &H) const
compute the energy derivative with rsepect to t
Definition: EMM_LandauLifschitzSystem.h:809
void setInitialMagnetization(const tReal data[3])
set the initialization data for magnetization field
Definition: EMM_LandauLifschitzSystem.h:558
const EMM_MatterField & getMatterField() const
return the matter index for each cell for reading
Definition: EMM_LandauLifschitzSystem.h:284
tBoolean resetToInitialState()
reset to initial state
Definition: EMM_LandauLifschitzSystem.cpp:308
const tBoolean & isLogPrinted() const
get if the log is printed in log file
Definition: EMM_LandauLifschitzSystem.h:954
const tFlag & getEvolutionScheme() const
return the evolution scheme between M & opertaor fields
Definition: EMM_LandauLifschitzSystem.h:604
SP::EMM_RealField mF
Definition: EMM_LandauLifschitzSystem.h:203
virtual ~EMM_LandauLifschitzSystem(void)
destroy the class
Definition: EMM_LandauLifschitzSystem.cpp:160
void computeMeanMagnetizationField(tReal *meanM) const
compute the mean of magnetization field with respect of sigma weight at time 0 of time step ...
Definition: EMM_LandauLifschitzSystem.cpp:428
T & get(const tUIndex &i)
get the value of the array at index i
Definition: CORE_Array.h:555
const EMM_Grid3D & getMesh() const
return the mesh associated to the problem for reading
Definition: EMM_LandauLifschitzSystem.h:262
tBoolean initializeOperators(const EMM_RealArray &sigma, const EMM_RealField &M)
initialize the data of operator field at t=0 from M
virtual const tReal & getTimeStep() const =0
return the current time step
void setInitialMagnetization(const EMM_RealField &data)
set the initialization data for magnetization field
Definition: EMM_LandauLifschitzSystem.h:580
#define tUSInt
Definition: types.h:28
EMM_RealField & getMagnetizationField()
return the adimensionized magnetizaton field associated to the problem for writing at time 0 of the c...
Definition: EMM_LandauLifschitzSystem.h:623
SP::EMM_LandauLifschitzFunction mLLFunction
Definition: EMM_LandauLifschitzSystem.h:181
#define tBoolean
Definition: types.h:139
const tString & getOutputPath() const
get the output path in which the files are generated
Definition: EMM_LandauLifschitzSystem.h:305
void setIsBackupEnabled(const tBoolean &v)
set if the backup is enabled
Definition: EMM_LandauLifschitzSystem.h:1024
virtual void computeLandauLifschitzFields(const EMM_RealField &M, const EMM_RealField &H, EMM_RealField &F)
compute the landau lifschitz fields
Definition: EMM_LandauLifschitzSystem.h:742
void setMinimumTimeStep(const tReal &v)
set minimum time step under which the relaxation process is supposed to be reached ...
Definition: EMM_LandauLifschitzSystem.h:837
void computeMagnetizationExcitationField(const EMM_RealField &M, EMM_RealField &H) const
compute the magnetic excittaion corresponting the the magnetized operator )
Definition: EMM_LandauLifschitzSystem.cpp:411
void computeMagnetizationFieldTimeDerivative(const EMM_RealField &Mt, const EMM_RealField &Ht, EMM_RealField &Ft) const
compute the time variation of magnetization field at Mt and Ht for time t of the current time step ...
Definition: EMM_LandauLifschitzSystem.h:656
virtual void integrate(const tBoolean &isRestoring, tSInt &retCode)=0
integrate the system over the time
const tReal & getMinimumTimeStep() const
get minimum time step under which the relaxation process is supposed to be reached ...
Definition: EMM_LandauLifschitzSystem.h:843
tString toString() const
return the string associated to the integer
Definition: CORE_Integer.h:106
void setInitialMagnetization(const tString &dataFile)
set the initialization data for magnetization field
Definition: EMM_LandauLifschitzSystem.h:552
#define null
Definition: types.h:144
#define tDimension
Definition: EMM_Types.h:10
void setInitialMagnetization(const tReal &M0, const tReal &M1, const tReal &M2)
set the initialization data for magnetization field
Definition: EMM_LandauLifschitzSystem.h:569
tReal * getEnergies()
get the energies
Definition: EMM_LandauLifschitzSystem.h:819
tFlag mEvolutionScheme
Definition: EMM_LandauLifschitzSystem.h:157
tUInteger mBackupsNumber
Definition: EMM_LandauLifschitzSystem.h:136
static const tFlag OsM
Definition: EMM_LandauLifschitzSystem.h:108
const EMM_Stepper & getStepper() const
get the time descriptor for reading
Definition: EMM_LandauLifschitzSystem.h:906
static const tSInt OPERATORS_FIELDS_UPDATE_ERROR
Definition: EMM_LandauLifschitzSystem.h:99
const EMM_RealArray & getSigma() const
get the sigma parameters
Definition: EMM_LandauLifschitzSystem.h:643
EMM_RealField & getMagneticExcitationField()
get adimensionized magnetic excitation at time 0 of time step
Definition: EMM_LandauLifschitzSystem.h:685
void computeMeanField(const EMM_RealField &F, tReal *meanF) const
compute the mean of field over the magnetized domain
Definition: EMM_LandauLifschitzSystem.cpp:441
tBoolean isAffine() const
return true if the system has only affine operators
Definition: EMM_LandauLifschitzSystem.cpp:365
void computePartialGradMFunction(const EMM_RealField &M, const EMM_RealField &H, const EMM_RealField &D, EMM_RealField &gradF) const
compute the partial gradient with respect to M of landau-lifschitz function at the direction D in M ...
Definition: EMM_LandauLifschitzSystem.h:540
static const tSInt E_IS_NAN
Definition: EMM_LandauLifschitzSystem.h:101
SV::EMM_MagneticExcitationOperator mOperators
Definition: EMM_LandauLifschitzSystem.h:191
SP::EMM_RealField mHop
Definition: EMM_LandauLifschitzSystem.h:209
EMM_Grid3D & getMesh()
return the mesh associated to the problem for writing
Definition: EMM_LandauLifschitzSystem.h:268
const tReal & getEnergyTimeDerivative(tReal &dE_dt) const
return the energy and its first derivative with respect to time
Definition: EMM_LandauLifschitzSystem.h:778
virtual tBoolean resetOperatorsToInitialState()
initialize the problem
Definition: EMM_LandauLifschitzSystem.cpp:342
tReal mMinDt
Definition: EMM_LandauLifschitzSystem.h:163
virtual tReal dot(const EMM_RealField &F) const
compute the scalar product
Definition: EMM_RealField.h:315
const EMM_RealField & computeMagneticExcitationField()
compute the total adimensionized magnetic excitation H of the system (real magnetic excitation is ) ...
Definition: EMM_LandauLifschitzSystem.h:710
tBoolean discretize()
discretize the problem
Definition: EMM_LandauLifschitzSystem.h:357
EMM_RealField & getMagnetizationFieldTimeDerivative()
get the magnetization variation field with respect to time at time 0 of the current time step ...
Definition: EMM_LandauLifschitzSystem.h:636
This class describes a time descriptor.
Definition: EMM_Stepper.h:18
static const tSInt M_PARALLEL_H
Definition: EMM_LandauLifschitzSystem.h:105
void setEvolutionScheme(const tFlag &f)
set the evolution scheme
Definition: EMM_LandauLifschitzSystem.h:593
static const tFlag MAX_OPERATORS
Definition: EMM_LandauLifschitzSystem.h:120
static tBoolean isAbsolutePath(const tString &path)
return tre if the path is absolute path
Definition: CORE_File.h:142
#define tSInt
Definition: types.h:30
SP::EMM_Grid3D mMesh
Definition: EMM_LandauLifschitzSystem.h:185
static const tString RET_STRING[]
Definition: EMM_LandauLifschitzSystem.h:114
void setBackupsNumber(const tUInteger &n)
set the backups number
Definition: EMM_LandauLifschitzSystem.h:1015
const tUInteger & getBackupStep() const
get the backup step
Definition: EMM_LandauLifschitzSystem.h:1044
This class is an operator of a E-MicromM package which computes the field of the operator with respec...
Definition: EMM_Operator.h:24
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
EMM_Operator & getOperator(const tUIndex &index)
get the operator at index for writing
Definition: EMM_LandauLifschitzSystem.h:423
const tUIndex & getMagnetizedElementsNumber() const
get the number of mage,ntozed elements
Definition: EMM_LandauLifschitzSystem.h:274
virtual const tUInteger & getTimeStepsNumber() const =0
return the computed time steps
This class describes the field of matters.
Definition: EMM_MatterField.h:34
static const tFlag MOs
Definition: EMM_LandauLifschitzSystem.h:109
SP::CORE_Object getThis()
get this shared pointer associated to this class
Definition: CORE_Object.h:110
static const tSInt MAXIMUM_ITERATION_IS_REACHED
Definition: EMM_LandauLifschitzSystem.h:104
tReal computeEnergy() const
compute the energy
Definition: EMM_LandauLifschitzSystem.cpp:504
const tBoolean & isBackupEnabled() const
get if the backup is enabled
Definition: EMM_LandauLifschitzSystem.h:1031
SP::EMM_RealField mH
Definition: EMM_LandauLifschitzSystem.h:206
tBoolean setMesh(SP::EMM_Grid3D mesh)
set the mesh
Definition: EMM_LandauLifschitzSystem.h:252
tReal computeMagneticExcitationFieldAndEnergies(const EMM_RealField &M, EMM_RealField &H, tReal Es[]) const
compute the total adimensionized magnetic excitation H of the system (real magnetic excitation is ) ...
Definition: EMM_LandauLifschitzSystem.cpp:476
EMM_Stepper & getStepper()
get the time descriptor for writing
Definition: EMM_LandauLifschitzSystem.h:912
tString mPrefix
Definition: EMM_LandauLifschitzSystem.h:129
EMM_MatterField & getMatterField()
return the matter index for each cell for writing
Definition: EMM_LandauLifschitzSystem.h:290
#define tUIndex
Definition: types.h:126
void computeFunction(const EMM_RealField &M, const EMM_RealField &H, EMM_RealField &F) const
compute the landau-lifschitz function
Definition: EMM_LandauLifschitzSystem.h:507
This class describes a real array.
Definition: EMM_RealArray.h:16
void clearOperators()
clear all operators
Definition: EMM_LandauLifschitzSystem.h:378
virtual tString getInformation(const tUSInt &retCode)
return the information relativly to ret code of the integrate method
Definition: EMM_LandauLifschitzSystem.h:937
void printLog(const tUInteger &timeStep, const tReal &t, const map< tString, tString > &stepperData, const tUIndex &nMagnetizedElements, const tReal Es[], const tReal &dE_dt, const tReal &DeltaE_DeltaT, const tReal *meanM, const tReal *meanH) const
print the log
Definition: EMM_LandauLifschitzSystem.cpp:531
tBoolean updateOperatorsAtNextTimeStep(const tReal &dt, const EMM_RealArray &sigma, const EMM_RealField &Mt)
update the operator at next time time with respect of the value of the magnetization field at next ti...
Definition: EMM_LandauLifschitzSystem.cpp:394
const tUInteger & getBackupsNumber() const
get the backups number
Definition: EMM_LandauLifschitzSystem.h:1038
#define tString
Definition: types.h:135
tString mMInitialDataFile
Definition: EMM_LandauLifschitzSystem.h:151
SP::EMM_MatterField mMatters
Definition: EMM_LandauLifschitzSystem.h:188
virtual tString toString() const
turn the class into a string
Definition: EMM_LandauLifschitzSystem.cpp:600
void setValue(const tUIndex &i, const tDimension &k, const tReal &v)
set the value at point i and for coordinate k
Definition: EMM_RealField.h:253
tBoolean setStepper(SP::EMM_Stepper time)
set the reverse time relation
Definition: EMM_LandauLifschitzSystem.h:867
const tReal & getMinimumEnergyVariation() const
get minimum energy variation under which the relaxation is supposed to be reached ...
Definition: EMM_LandauLifschitzSystem.h:793
SP::EMM_Stepper mStepper
Definition: EMM_LandauLifschitzSystem.h:194
static const tSInt DE_DT_MIN_IS_REACHED
Definition: EMM_LandauLifschitzSystem.h:103
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
virtual const tReal & getTime() const =0
return the current time
tBoolean mIsLogPrinted
Definition: EMM_LandauLifschitzSystem.h:146
tBoolean isMagnetizationStatic() const
return true if M is permanent
Definition: EMM_LandauLifschitzSystem.h:609
SP::EMM_RealField mMInitialData
Definition: EMM_LandauLifschitzSystem.h:154
const EMM_RealField & getMagneticExcitationField() const
get adimensionized magnetic excitation at time 0 of time step
Definition: EMM_LandauLifschitzSystem.h:679
static const tSInt RELAXATION_IS_REACHED
Definition: EMM_LandauLifschitzSystem.h:102
virtual void adimensionize()
adimensionize the system: It get the max length of the cell and adimensionize the physical parameters...
Definition: EMM_LandauLifschitzSystem.cpp:166
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
const EMM_Operator & getOperator(const tUIndex &index) const
get the operator at index for reading
Definition: EMM_LandauLifschitzSystem.h:407
SP_OBJECT(EMM_LandauLifschitzSystem)
void setBackupStep(const tUInteger &n)
set the backup steps to save relaxation
Definition: EMM_LandauLifschitzSystem.h:1009
static const tFlag M
Definition: EMM_LandauLifschitzSystem.h:110
void setOutputPath(const tString &currentPath, const tString &path, const tString &prefix)
set the output path
Definition: EMM_LandauLifschitzSystem.h:985
static tUSInt getEnergiesNumber()
return the energie number
Definition: EMM_LandauLifschitzSystem.h:765
void setIsLogPrinted(const tBoolean &v)
set if the log is printed in log file
Definition: EMM_LandauLifschitzSystem.h:948
This class describes a real field.
Definition: EMM_RealField.h:21
tReal mMinEnergyVariation
Definition: EMM_LandauLifschitzSystem.h:165
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
void resetStepper()
reset the reverse time relation
Definition: EMM_LandauLifschitzSystem.h:890
#define tReal
Definition: types.h:118
virtual tBoolean addOperator(SP::EMM_MagneticExcitationOperator op)
add an operator
Definition: EMM_LandauLifschitzSystem.h:369
tUIndex getOperatorsNumber() const
return the number of operators
Definition: EMM_LandauLifschitzSystem.h:400
tBoolean computeOperatorsFieldsAtTime(const tReal &t, const tFlag &order, const EMM_RealArray &sigma, const EMM_RealField &dM_dt, const EMM_RealField &M)
compute the fields of all operators at time t
Definition: EMM_LandauLifschitzSystem.cpp:375
SP::EMM_RealField mM
Definition: EMM_LandauLifschitzSystem.h:200
tReal mEs[MAX_OPERATORS+1]
Definition: EMM_LandauLifschitzSystem.h:171
tReal mdE_dt
Definition: EMM_LandauLifschitzSystem.h:174
tString mOutputPath
Definition: EMM_LandauLifschitzSystem.h:126
#define tFlag
Definition: types.h:74