1 #ifndef EMM_ZeemanOperator_H 2 #define EMM_ZeemanOperator_H 68 inline static SP::EMM_ZeemanOperator
New() {
92 mInitialDataFile=dataFile;
98 mInitialData->setSize(1);
114 mInitialData->copy(data);
125 mHext->initField(0.,0.,0.);
137 mHext->initField(H[0],H[1],H[2]);
146 return mHext->loadFromFile(HextFile);
155 return (mHext->normMax(index)<1.e-12);
225 if (index>1)
return false;
231 dFieldType=mHext->getTypeToString();
243 if (index>1)
return false;
245 dim=mHext->getDimension();
246 tBoolean succeeds=mHext->getValues(n,values);
259 if (index>1)
return false;
261 dim=mHext->getDimension();
262 tBoolean succeeds=mHext->getValues(n,values);
276 if (index>1)
return false;
278 dim=mHext->getDimension();
279 tBoolean succeeds=mHext->getValues(n,values);
322 H.
copy(*mHext.get());
virtual tBoolean getDataFieldSpace(const tUSInt &index, tString &dataName, tFlag &supportType, tString &dFieldType, tUIndex &n, tDimension &dim) const
get the data field at index for saving data in vtk,txt,... files.
Definition: EMM_ZeemanOperator.h:224
virtual tBoolean updateAtNextTimeStep(const tReal &dt, const EMM_RealArray &sigma, const EMM_RealField &Mt)
update the data of operator at next time step
Definition: EMM_ZeemanOperator.h:202
virtual tUIndex getSize() const =0
return the size of the field
void setInitialMagneticExcitation(const tReal data[3])
set the initialization data for external magnetic excitation field
Definition: EMM_ZeemanOperator.h:97
void setInitialMagneticExcitation(const tString &dataFile)
set the initialization data for external magnetic excitation field
Definition: EMM_ZeemanOperator.h:91
virtual tBoolean resetToInitialState(const EMM_LandauLifschitzSystem &system)
initialize the operator
Definition: EMM_ZeemanOperator.cpp:46
virtual tBoolean computeMagneticExcitationFieldGradient(const EMM_RealArray &sigma, const EMM_RealField &M, const EMM_RealField &D, EMM_RealField &gradH) const
compute the gradient of the magnetic excitation field at M in the direction D
Definition: EMM_ZeemanOperator.h:333
const tReal & getElementVolume() const
return the adimensionized volume of the element
Definition: EMM_Operator.h:110
virtual tUSInt getDataFieldsNumber() const
get the number of field used in the operator
Definition: EMM_ZeemanOperator.h:211
T & get(const tUIndex &i)
get the value of the array at index i
Definition: CORE_Array.h:555
virtual ~EMM_ZeemanOperator(void)
destroy
Definition: EMM_ZeemanOperator.cpp:29
#define tUSInt
Definition: types.h:28
virtual tBoolean isGradientComputationable() const
return true if the gradient of the magnetic excitation is computationable
Definition: EMM_ZeemanOperator.h:84
#define tBoolean
Definition: types.h:139
virtual tBoolean computeFieldsAtTime(const tReal &t, const tFlag &order, const EMM_RealArray &sigma, const EMM_RealField &dM_dt0, const EMM_RealField &M0)
compute the fields of operator at time
Definition: EMM_ZeemanOperator.h:172
void setExternalMagneticExcitationField(const tReal H[3])
set the normalized external magnetic excitation not necessary normed
Definition: EMM_ZeemanOperator.h:135
virtual tReal computeEnergyWithMagneticExcitation(const tReal &t, const EMM_RealArray &sigma, const EMM_RealField &Mt, const EMM_RealField &Ht) const
compute the energy E of the operator
Definition: EMM_ZeemanOperator.h:364
static const tFlag ELEMENT
Definition: EMM_Grid3D.h:69
#define tDimension
Definition: EMM_Types.h:10
tBoolean isNull() const
return true if zeeman is null
Definition: EMM_ZeemanOperator.h:153
SP::EMM_RealField mInitialData
Definition: EMM_ZeemanOperator.h:46
void setInitialMagneticExcitation(const EMM_RealField &data)
set initial data for external magnetic excitation field
Definition: EMM_ZeemanOperator.h:113
void setExternalMagneticExcitationField(const EMM_RealField &Hext)
set the normalized external magnetic excitation not necessary normed
Definition: EMM_ZeemanOperator.h:123
virtual tBoolean discretize(const EMM_LandauLifschitzSystem &system)
discretize the operator
Definition: EMM_ZeemanOperator.cpp:31
void setInitialMagneticExcitation(const CORE_RealArray &data)
set the initialization data for external magnetic excitation field
Definition: EMM_ZeemanOperator.h:107
EMM_ZeemanOperator(void)
create
Definition: EMM_ZeemanOperator.cpp:6
virtual tReal dot(const EMM_RealField &F) const
compute the scalar product
Definition: EMM_RealField.h:315
virtual tReal computeEnergy(const tReal &t, const EMM_RealArray &sigma, const EMM_RealField &Mt, EMM_RealField &W) const
compute the energy E of the operator
Definition: EMM_ZeemanOperator.h:386
SP::EMM_RealField mHext
Definition: EMM_ZeemanOperator.h:42
DEFINE_SPTR(EMM_ZeemanOperator)
virtual tBoolean isAffine() const
return true if the operator is either constant or linear
Definition: EMM_ZeemanOperator.h:78
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
virtual void copy(const EMM_RealField &f)=0
copy the real vector
#define tString
Definition: types.h:135
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
virtual tBoolean computeFieldsAtNextTimeStep(const tReal &dt, const EMM_RealArray &sigma, const EMM_RealField &dM_dt0, const EMM_RealField &M0)
compute the fields of operator at next time step
Definition: EMM_ZeemanOperator.h:188
SP_OBJECT(EMM_ZeemanOperator)
virtual tBoolean getDataField(const tUSInt &index, tString &dataName, tUIndex &n, tDimension &dim, const double *&values) const
get the data field at index for saving data in vtk,txt,... files.
Definition: EMM_ZeemanOperator.h:258
tBoolean setExternalMagneticExcitationField(const tString &HextFile)
set the normalized external magnetic excitation not necessary normed
Definition: EMM_ZeemanOperator.h:145
tString mInitialDataFile
Definition: EMM_ZeemanOperator.h:45
This class describes the Zeeman operator which is the exterior excitation magnetic field from the E-M...
Definition: EMM_ZeemanOperator.h:25
This class is an operator of a E-MicromM package wich compute a magnetic excitation operator...
Definition: EMM_MagneticExcitationOperator.h:15
This class describes a real field.
Definition: EMM_RealField.h:21
virtual tBoolean getDataField(const tUSInt &index, tString &dataName, tUIndex &n, tDimension &dim, const float *&values) const
get the data field at index for saving data in vtk,txt,... files.
Definition: EMM_ZeemanOperator.h:242
#define tReal
Definition: types.h:118
static SP::EMM_ZeemanOperator New()
create a geometry class
Definition: EMM_ZeemanOperator.h:68
virtual void computeMagneticExcitationField(const EMM_RealArray &sigma, const EMM_RealField &M, EMM_RealField &H) const
compute the normalized excitation magnetic field at M for reading
Definition: EMM_ZeemanOperator.h:318
virtual tBoolean getDataField(const tUSInt &index, tString &dataName, tUIndex &n, tDimension &dim, const long double *&values) const
get the data field at index for saving data in vtk,txt,... files.
Definition: EMM_ZeemanOperator.h:275
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74