1 #ifndef EMM_LandauLifschitzSystem_H 2 #define EMM_LandauLifschitzSystem_H 200 SP::EMM_RealField
mM;
203 SP::EMM_RealField
mF;
206 SP::EMM_RealField
mH;
209 mutable SP::EMM_RealField
mHop;
253 if (mesh.get()!=
null) {
275 return mMesh->getMagnetizedElementsNumber();
285 return *mMatters.get();
291 return *mMatters.get();
370 if (op.get()!=
null) {
385 inline const SV::EMM_MagneticExcitationOperator&
getOperators()
const {
401 return mOperators.getSize();
408 if (index>=mOperators.getSize())
414 "null operator at index");
424 if (index>=mOperators.getSize())
430 "null operator at index");
510 mLLFunction->computeFunction(
getSigma(),M,H,F);
528 mLLFunction->computeGradFunction(
getSigma(),M,H,D,gradH,gradF);
544 mLLFunction->computePartialGradMFunction(
getSigma(),M,H,D,gradF);
553 mMInitialDataFile=dataFile;
559 mMInitialData->setSize(1);
562 mMInitialDataFile=
"";
570 mMInitialData->setSize(1);
575 mMInitialDataFile=
"";
581 mMInitialData->copy(data);
582 mMInitialDataFile=
"";
610 return (mEvolutionScheme==Os);
644 return *mSigma.
get();
766 return MAX_OPERATORS+1;
788 mMinEnergyVariation=v;
869 if (time.get()==
null) {
874 if (mStepper.get()==time.get())
return true;
879 if (time->setSystem(
getThis())) {
882 mStepper->setSystem(
getThis());
892 if (mStepper.get()==
null)
return;
898 oldTime->resetSystem();
907 return *mStepper.get();
913 return *mStepper.get();
938 return RET_STRING[retCode-
MIN_CODE];
972 const map<tString,tString>& stepperData,
973 const tUIndex& nMagnetizedElements,
976 const tReal& DeltaE_DeltaT,
978 const tReal *meanH)
const;
1016 if (n==0) mBackupsNumber=1;
1017 else mBackupsNumber=n;
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 ¤tPath, 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