C++ main module for emicrom Package  1.0
EMM_StaticMagnetostrictionOperator.h
Go to the documentation of this file.
1 #ifndef EMM_StaticMagnetostrictionOperator_H
2 #define EMM_StaticMagnetostrictionOperator_H
3 
4 
6 
8 
32 
34  // ATTRIBUTES
35 
36 
37 private:
38 
39 public:
40 
41 
42  // ASSOCIATION
43 
44 private:
45 
46 
47 
48  //constraint
51  SP::EMM_2PackedSymmetricTensors mMagneticStressTensors;
52 
56 
57 protected:
58 
59  // METHODS
60 
61  // CONSTRUCTORS
62 
66 
67  // DESTRUCTORS
68 
72 
81  virtual tULLInt getMemorySize() const {
82  return EMM_MagneticExcitationLinearOperator::getMemorySize()+mMagneticStressTensors->getMemorySize();
83 
84  }
85 public:
86  /* \brief set the values of the stress 2-tensor of size 3x3
87  * @param n: the size of the values either 1, (value on {0,0}), 3 (diagonal value), 6 (packed form), 9 (full form)
88  * @param v: values of the tensor \f$ v = \left[ {\begin{array}{ccc} v[0] & v[1] & v[2] \\ v[1] & v[3] & v[4] \\ v[2] & v[4] & v[5] \end{array} } \right] \f$
89  *
90  */
91  inline void setStressTensor(const tDimension& n,const tReal* v) {
92  mStressTensor.init(0,0.0);
93  if ((v==null) || (n==0)) return;
94 
95  //n=1,3,6
96  mStressTensor(0,0,0)=*v;
97 
98  //n=3
99  if (n==3) {
100  mStressTensor(0,1,1)=v[1];
101  mStressTensor(0,2,2)=v[2];
102  }
103  //n=6
104  if (n==6) {
105  const tReal *Vi=v;
106  mStressTensor(0,0,0)=*Vi;Vi++;
107  mStressTensor(0,0,1)=*Vi;Vi++;
108  mStressTensor(0,0,2)=*Vi;Vi++;
109  mStressTensor(0,1,1)=*Vi;Vi++;
110  mStressTensor(0,1,2)=*Vi;Vi++;
111  mStressTensor(0,2,2)=*Vi;
112 
113  }
114  //n=9
115  if (n==9) {
116  const tReal *Vi=v;
117  mStressTensor(0,0,0)=*Vi;Vi++;
118  mStressTensor(0,0,1)=*Vi;Vi++;
119  mStressTensor(0,0,2)=*Vi;Vi+=2;
120  mStressTensor(0,1,1)=*Vi;Vi++;
121  mStressTensor(0,1,2)=*Vi;Vi+=3;
122  mStressTensor(0,2,2)=*Vi;
123 
124  }
125 
126 
127  }
132  virtual tBoolean discretize(const EMM_LandauLifschitzSystem& system);
133 
134  //Magnetic field methods
135  //======================
136 
146  virtual void computeMagneticExcitationField(const tUIndex & nCells,
147  const tDimension& dim,
148  const EMM_RealArray& sigma,
149  const tReal *M,
150  tReal *H) const;
151 
152 };
153 #endif
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: EMM_StaticMagnetostrictionOperator.h:81
DEFINE_SPTR(EMM_StaticMagnetostrictionOperator)
EMM_2PackedSymmetricTensors mStressTensor
stress 2tensor: in a full form of size 9
Definition: EMM_StaticMagnetostrictionOperator.h:55
void setStressTensor(const tDimension &n, const tReal *v)
Definition: EMM_StaticMagnetostrictionOperator.h:91
virtual ~EMM_StaticMagnetostrictionOperator(void)
destroy
Definition: EMM_StaticMagnetostrictionOperator.cpp:18
This class describes the MagneticExcitationLinear operator for the E-MicroM system : EMM_LandauLisfch...
Definition: EMM_MagneticExcitationLinearOperator.h:23
#define tBoolean
Definition: types.h:139
This class describes the static magnetostriction operator of the landau lifschitz system EMM_LandauLi...
Definition: EMM_StaticMagnetostrictionOperator.h:31
#define null
Definition: types.h:144
#define tDimension
Definition: EMM_Types.h:10
This class describes a morse array of symmetric tensors of 2 order in packed form.
Definition: EMM_2PackedSymmetricTensors.h:20
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
void init(const tUIndex &index, const tReal &v)
init the tensor at index to uniform value
Definition: EMM_Tensors.h:175
#define tUIndex
Definition: types.h:126
This class describes a real array.
Definition: EMM_RealArray.h:16
SP_OBJECT(EMM_StaticMagnetostrictionOperator)
SP::EMM_2PackedSymmetricTensors mMagneticStressTensors
Matrix 3X3 given by .
Definition: EMM_StaticMagnetostrictionOperator.h:51
virtual tBoolean discretize(const EMM_LandauLifschitzSystem &system)
discretize the operator depending on method
Definition: EMM_StaticMagnetostrictionOperator.cpp:28
EMM_StaticMagnetostrictionOperator(void)
create
Definition: EMM_StaticMagnetostrictionOperator.cpp:12
#define tULLInt
Definition: types.h:45
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 for stress tensors
Definition: EMM_StaticMagnetostrictionOperator.cpp:88
#define tReal
Definition: types.h:118
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: EMM_Operator.h:71