1 #ifndef EMM_CubicAnisotropyOperator_H 2 #define EMM_CubicAnisotropyOperator_H 275 memset(work,0,ldW*
sizeof(
tReal));
281 for(d=0;d<nDirs;d++) {
283 for (k=0;k<dim;k++) {
298 const tReal *Mu1=(Mu0+1);
299 const tReal *Mu2=(Mu1+1);
303 for (d=0;d<nDirs;d++) {
305 dH=(*Mu0)*( K1*((*Mu1)*(*Mu1)+(*Mu2)*(*Mu2))+
306 K2*((*Mu1)*(*Mu1)*(*Mu2)*(*Mu2)) );
313 for (k=0;k<dim;k++) {
396 memset(work,0,ldW*
sizeof(
tReal));
398 for(d=0;d<nDirs;d++) {
401 for (k=0;k<dim;k++) {
432 const tReal *Mu1=(Mu0+1);
433 const tReal *Mu2=(Mu1+1);
434 const tReal *Du0=work+6;
435 const tReal *Du1=(Du0+1);
436 const tReal *Du2=(Du1+1);
439 for (d=0;d<nDirs;d++) {
441 dG=2*(*Mu0)*( K1*((*Mu1)*(*Du1)+(*Mu2)*(*Du2)) +
442 K2*(*Mu1)*(*Mu2)*((*Du1)*(*Mu2)+(*Mu1)*(*Du2)))+
443 (*Du0)*( K1*((*Mu1)*(*Mu1)+(*Mu2)*(*Mu2))+
444 K2*((*Mu1)*(*Mu1)*(*Mu2)*(*Mu2)) );
455 for (k=0;k<dim;k++) {
456 (*gradHk)-=dG*(*Adk);
514 memset(work,0,ldW*
sizeof(
tReal));
515 tReal *Muk,*Mud=work;
521 for(d=0;d<nDirs;d++) {
523 for (k=0;k<dim;k++) {
524 (*Mud)+=(*Adk)*(*Mk);
536 for (d=0;d<nDirs;d++) {
546 for (d=0;d<nDirs;d++) {
553 E+=K1*(*Mud)*(*Mud)*dE;
DEFINE_SPTR(EMM_CubicAnisotropyOperator)
static const tReal Mu0
Definition: EMM_Object.h:28
tReal computeEnergy(const tUIndex &nCells, const tDimension &dim, const EMM_RealArray &sigma, const tReal *M) const
compute the energy of the anistropy operator
Definition: EMM_CubicAnisotropyOperator.cpp:23
virtual tBoolean computeMagneticExcitationFieldGradient(const tUIndex &nCells, const tDimension &dim, const EMM_RealArray &sigma, const tReal *M, const tReal *D, tReal *gradH) const
compute the gradient of the magnetic excitation field at M in the direction D
Definition: EMM_CubicAnisotropyOperator.cpp:431
#define tUCInt
Definition: types.h:21
#define tUSInt
Definition: types.h:28
#define tBoolean
Definition: types.h:139
static tUSInt ComputeMagneticExcitationGradient(const tReal &S, const tReal &K1, const tReal &K2, const tUCInt &nA, const tReal *A, const tDimension &dim, const tReal *M, const tReal *D, tReal *gradH, const tUCInt &ldW, tReal *work)
compute the magnetic excitation gradient at cell i
Definition: EMM_CubicAnisotropyOperator.h:364
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: EMM_CubicAnisotropyOperator.h:133
#define tDimension
Definition: EMM_Types.h:10
static tUSInt ComputeMagneticExcitation(const tReal &S, const tReal &K1, const tReal &K2, const tUCInt &nA, const tReal *A, const tDimension &dim, const tReal *M, tReal *H, const tUCInt &ldW, tReal *work)
compute the magnetic excitation at cell i
Definition: EMM_CubicAnisotropyOperator.h:253
SP_OBJECT(EMM_CubicAnisotropyOperator)
static void ComputeEnergy(const tReal &S, const tReal &K1, const tReal &K2, const tUCInt &nA, const tReal *A, const tDimension &dim, const tReal *M, const tUCInt &ldW, tReal *work, tReal &E)
compute the energy of the cell i
Definition: EMM_CubicAnisotropyOperator.h:501
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: EMM_AnisotropyOperator.h:132
virtual ~EMM_CubicAnisotropyOperator(void)
destroy
Definition: EMM_CubicAnisotropyOperator.cpp:14
This class describes the cubic anistropy operator of the landau lifschitz system EMM_LandauLifschitzS...
Definition: EMM_CubicAnisotropyOperator.h:82
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
virtual void computeMagneticExcitationField(const tUIndex &nCells, const tDimension &dim, const EMM_RealArray &sigma, const tReal *M, tReal *H) const
compute the normalized excitation magnetic field at M
Definition: EMM_CubicAnisotropyOperator.cpp:231
EMM_CubicAnisotropyOperator(void)
create
Definition: EMM_CubicAnisotropyOperator.cpp:10
This class describes the mixed anistropy operators of the landau lifschitz system EMM_LandauLifschitz...
Definition: EMM_AnisotropyOperator.h:53
#define tULLInt
Definition: types.h:45
#define tReal
Definition: types.h:118
static tUSInt BuildDiscretizedMatrix(const tUCInt &nU, const tReal *U, tReal *A)
Definition: EMM_CubicAnisotropyOperator.h:150