C++ main module for emicrom Package  1.0
EMMG_UniaxialAnisotropyOperator.h
Go to the documentation of this file.
1 #ifndef EMMG_UniaxialAnisotropyOperator_H
2 #define EMMG_UniaxialAnisotropyOperator_H
3 
4 
6 
7 
17 
19  // ATTRIBUTES
20 
21 
22 private:
23 
24 
25 public:
26 
27 
28  // ASSOCIATION
29 
30 private:
31 
32 
33 
34 protected:
35 
36  // METHODS
37 
38  // CONSTRUCTORS
39 
43  }
44 
45  // DESTRUCTORS
46 
50  }
51 
52 
53 public:
57  inline static SP::EMMG_UniaxialAnisotropyOperator New() {
58  SP::EMMG_UniaxialAnisotropyOperator p(new EMMG_UniaxialAnisotropyOperator(),
60  p->setThis(p);
61  return p;
62  };
63 
64  // SET methods
65  // ===========
66 
67  // GET methods
68  // ===========
69 
70 
71 protected:
72 
73 
74 
75 
76 public:
77 
85  const EMM_RealField& M,
86  EMM_RealField& H) const {
87 
88  // size of the operator
89  tUIndex nCells=M.getSize();
90  const tDimension &dim=M.getDimension();
91 
92 
93  //set the H size
94  H.setDimension(dim);
95  H.setSize(nCells);
96 
97  //no computation
98  if (nCells==0) return;
99 
100  //verify the type of M
101  const EMMG_RealField *gM=dynamic_cast<const EMMG_RealField *>(&M);
102  if (gM==null) throw EMM_Exception("generic","EMMG_PlanarAnisotropyOperator:: computeMagneticExcitationField(..)",
103  "M is an incompatible real field");
104 
105  //verify the type of H
106  EMMG_RealField *gH=dynamic_cast<EMMG_RealField *>(&H);
107  if (gH==null) throw EMM_Exception("generic","EMM_PlanarAnisotropyOperator:: computeMagneticExcitationField(..)",
108  "H is an incompatible real field");
109 
110 
111 
112  EMM_UniaxialAnisotropyOperator::computeMagneticExcitationField(nCells,dim,sigma,&(*gM)[0],&(*gH)[0]);
113 
114 
115  }
116 private:
117 
118 
119 public:
120 
121 };
122 
123 #endif
124 
SP_OBJECT(EMMG_UniaxialAnisotropyOperator)
This class describes the uniaxial anistropy operator of the landau lifschitz system EMM_LandauLifschi...
Definition: EMM_UniaxialAnisotropyOperator.h:56
virtual tUIndex getSize() const =0
return the size of the field
This class describes an implementation the uniaxial anistropy operator EMM_UniaxialAnisotropyOPerator...
Definition: EMMG_UniaxialAnisotropyOperator.h:16
This class describes a generic real field.
Definition: EMMG_RealField.h:17
#define null
Definition: types.h:144
#define tDimension
Definition: EMM_Types.h:10
DEFINE_SPTR(EMMG_UniaxialAnisotropyOperator)
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
const tDimension & getDimension() const
get the dimension
Definition: EMM_RealField.h:553
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 when anisotropy directions is uniform ...
Definition: EMM_LinearAnisotropyOperator.cpp:202
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
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: EMMG_UniaxialAnisotropyOperator.h:84
EMMG_UniaxialAnisotropyOperator(void)
create
Definition: EMMG_UniaxialAnisotropyOperator.h:42
virtual ~EMMG_UniaxialAnisotropyOperator(void)
destroy
Definition: EMMG_UniaxialAnisotropyOperator.h:49
void setDimension(const tDimension &d)
set the dimension
Definition: EMM_RealField.h:158
This class describes a real field.
Definition: EMM_RealField.h:21
virtual void setSize(const tUIndex &n)=0
set the size
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
static SP::EMMG_UniaxialAnisotropyOperator New()
create a uniaxial anisotropy operator
Definition: EMMG_UniaxialAnisotropyOperator.h:57