C++ main module for emicrom Package  1.0
EMMG_PlanarAnisotropyOperator.h
Go to the documentation of this file.
1 #ifndef EMMG_PlanarAnisotropyOperator_H
2 #define EMMG_PlanarAnisotropyOperator_H
3 
4 
6 
16 
18  // ATTRIBUTES
19 
20 
21 private:
22 
23 public:
24 
25 
26  // ASSOCIATION
27 
28 private:
29 
30 
31 protected:
32 
33  // METHODS
34 
35  // CONSTRUCTORS
36 
40  }
41 
42  // DESTRUCTORS
43 
47  }
48 
49 
50 public:
54  inline static SP::EMMG_PlanarAnisotropyOperator New() {
55  SP::EMMG_PlanarAnisotropyOperator p(new EMMG_PlanarAnisotropyOperator(),
57  p->setThis(p);
58  return p;
59  };
60 
61 
69  const EMM_RealField& M,
70  EMM_RealField& H) const {
71 
72  // size of the operator
73  tUIndex nCells=M.getSize();
74  const tDimension &dim=M.getDimension();
75 
76 
77  //set the H size
78  H.setDimension(dim);
79  H.setSize(nCells);
80 
81  //no computation
82  if (nCells==0) return;
83 
84  //verify the type of M
85  const EMMG_RealField *gM=dynamic_cast<const EMMG_RealField *>(&M);
86  if (gM==null) throw EMM_Exception("generic","EMMG_PlanarAnisotropyOperator:: computeMagneticExcitationField(..)",
87  "M is an incompatible real field");
88 
89  //verify the type of H
90  EMMG_RealField *gH=dynamic_cast<EMMG_RealField *>(&H);
91  if (gH==null) throw EMM_Exception("generic","EMM_PlanarAnisotropyOperator:: computeMagneticExcitationField(..)",
92  "H is an incompatible real field");
93 
94 
95 
96  EMM_PlanarAnisotropyOperator::computeMagneticExcitationField(nCells,dim,sigma,&(*gM)[0],&(*gH)[0]);
97 
98 
99  }
100 
101 };
102 
103 #endif
104 
virtual tUIndex getSize() const =0
return the size of the field
This class describes a generic real field.
Definition: EMMG_RealField.h:17
This class describes the planar anisotropy operator EMM_PlanarAnisotropyOperator using field implemen...
Definition: EMMG_PlanarAnisotropyOperator.h:15
DEFINE_SPTR(EMMG_PlanarAnisotropyOperator)
#define null
Definition: types.h:144
#define tDimension
Definition: EMM_Types.h:10
SP_OBJECT(EMMG_PlanarAnisotropyOperator)
#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
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_PlanarAnisotropyOperator.h:68
static SP::EMMG_PlanarAnisotropyOperator New()
create a planar anisotropy operator
Definition: EMMG_PlanarAnisotropyOperator.h:54
This class describes the planar anistropy operator of the landau lifschitz system EMM_LandauLifschitz...
Definition: EMM_PlanarAnisotropyOperator.h:54
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
virtual ~EMMG_PlanarAnisotropyOperator(void)
destroy
Definition: EMMG_PlanarAnisotropyOperator.h:46
EMMG_PlanarAnisotropyOperator(void)
create
Definition: EMMG_PlanarAnisotropyOperator.h:39
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