C++ main module for emicrom Package  1.0
EMM_DemagnetizedOperator.h
Go to the documentation of this file.
1 #ifndef EMM_DemagnetizedOperator_H
2 #define EMM_DemagnetizedOperator_H
3 
4 
6 
7 #include "EMM_MultiScaleGrid.h"
8 
10 
82 
84  // ATTRIBUTES
85 
86 
87 private:
88 
89 
90 
91 
92 
93 private:
95 
96  //levels number
100 
101  // ASSOCIATION
102  SP::MATH_MultiLevelsToeplitzMatrix mToeplitzMatrix;
103  SP::EMM_MultiScaleGrid mMultiScaleGrid;
104 
105 
106 protected:
107 
108  // METHODS
109 
110  // CONSTRUCTORS
111 
115 
116  // DESTRUCTORS
117 
120  virtual ~EMM_DemagnetizedOperator(void);
121 
122 
123 public:
124 
125 
126 
127  // SET methods
128  // ===========
129 
133  inline void setMultiScaleGridName(const tString& name) {
134  mMultiScaleGridName=name;
135  }
143  void setStorage(const tString& storage);
144 
148  inline void setLevelsNumber(const tUInteger& l) {
149  mLevelsNumber=l;
150  }
154  inline void setZonalLevelsNumber(const tInteger& l) {
155  mZonalLevelsNumber=l;
156  }
157 
163  inline void setIsLevelsNumberAutoComputed(const tBoolean& v) {
164  mIsLevelsNumberAutoComputed=v;
165  }
166 
167  // GET methods
168  // ===========
173  if (mMultiScaleGrid.get()==null) {
174  throw EMM_Exception("emicrom/operators/demagnetized",
175  "EMM_DemagnetizedOperator::getMultiScaleGrid()",
176  "Fatal Error: no multi grid set");
177  }
178  return *mMultiScaleGrid.get();
179  }
180 
181 
185  inline const tString& getMultiScaleGridName() const {
186  return mMultiScaleGridName;
187  }
192  inline const tBoolean& isLevelsNumberAutoComputed() const {
194  }
198  inline const tUInteger& getLevelsNumber() const {
199  return mLevelsNumber;
200  }
201 
205  virtual tULLInt getMemorySize() const {
206  return EMM_MagneticExcitationLinearOperator::getMemorySize()+mToeplitzMatrix->getMemorySize();
207  }
208 
209 
210 
211  //DATA Methods
212  //=============
213 
218  virtual tBoolean discretize(const EMM_LandauLifschitzSystem& system);
219 
220 
225  return *mToeplitzMatrix.get();
226  }
227 
228 
229 
230  //MAGNETIC Excitation methods
231  //============================
232 
241  virtual void computeMagneticExcitationField(const tUIndex& nCells,
242  const tDimension& dim,
243  const tReal *sigmaM,
244  tReal *H) const;
245 
246 public:
249  virtual tString toString() const;
250 
251 };
252 
253 #endif
254 
tString mMultiScaleGridName
Definition: EMM_DemagnetizedOperator.h:94
void setMultiScaleGridName(const tString &name)
set the multi scale grid name to use
Definition: EMM_DemagnetizedOperator.h:133
void setStorage(const tString &storage)
set the storage of the toeplitz matrix
Definition: EMM_DemagnetizedOperator.cpp:34
void setZonalLevelsNumber(const tInteger &l)
set the levels number in case of periodicicity of the domain
Definition: EMM_DemagnetizedOperator.h:154
This class describes the building of fields on multiscale grid initialized by the initialize() method...
Definition: EMM_MultiScaleGrid.h:62
This class describes the linear demagnetized operator of the Landau Lifschitz system EMM_LandauLifsch...
Definition: EMM_DemagnetizedOperator.h:81
#define tUInteger
Definition: types.h:91
DEFINE_SPTR(EMM_DemagnetizedOperator)
void setIsLevelsNumberAutoComputed(const tBoolean &v)
if the levels number is automatically computed
Definition: EMM_DemagnetizedOperator.h:163
virtual tString toString() const
return the string representation of the operator
Definition: EMM_DemagnetizedOperator.cpp:275
This class is multi levels toeplitz matrix. The matrix at level k is composed by toeplitz block matr...
Definition: MATH_MultiLevelsToeplitzMatrix.h:57
This class describes the MagneticExcitationLinear operator for the E-MicroM system : EMM_LandauLisfch...
Definition: EMM_MagneticExcitationLinearOperator.h:23
virtual ~EMM_DemagnetizedOperator(void)
destroy the class
Definition: EMM_DemagnetizedOperator.cpp:30
#define tBoolean
Definition: types.h:139
const tUInteger & getLevelsNumber() const
get the levels number in case of periodicicity of the domain
Definition: EMM_DemagnetizedOperator.h:198
const tString & getMultiScaleGridName() const
get the multi scale grid name to use
Definition: EMM_DemagnetizedOperator.h:185
const tBoolean & isLevelsNumberAutoComputed() const
get if the levels number is automatically computed
Definition: EMM_DemagnetizedOperator.h:192
tBoolean mIsLevelsNumberAutoComputed
Definition: EMM_DemagnetizedOperator.h:99
SP::MATH_MultiLevelsToeplitzMatrix mToeplitzMatrix
Definition: EMM_DemagnetizedOperator.h:102
#define null
Definition: types.h:144
SP::EMM_MultiScaleGrid mMultiScaleGrid
Definition: EMM_DemagnetizedOperator.h:103
#define tDimension
Definition: EMM_Types.h:10
SP_OBJECT(EMM_DemagnetizedOperator)
EMM_DemagnetizedOperator(void)
create the class
Definition: EMM_DemagnetizedOperator.cpp:19
virtual tULLInt getMemorySize() const
return the memory size in bytes
Definition: EMM_DemagnetizedOperator.h:205
This class describes a resolution of landau-lifschitz system of the Core Package for E-MicroM...
Definition: EMM_LandauLifschitzSystem.h:88
tUInteger mLevelsNumber
Definition: EMM_DemagnetizedOperator.h:97
virtual void computeMagneticExcitationField(const tUIndex &nCells, const tDimension &dim, const tReal *sigmaM, tReal *H) const
compute the excitation magnetic field at M
Definition: EMM_DemagnetizedOperator.cpp:258
#define tUIndex
Definition: types.h:126
EMM_MultiScaleGrid & getMultiScaleGrid()
get the multi scale grid
Definition: EMM_DemagnetizedOperator.h:172
#define tString
Definition: types.h:135
void setLevelsNumber(const tUInteger &l)
set the levels number in case of periodicicity of the domain
Definition: EMM_DemagnetizedOperator.h:148
virtual tBoolean discretize(const EMM_LandauLifschitzSystem &system)
discretize the operator depending on method
Definition: EMM_DemagnetizedOperator.cpp:52
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
#define tULLInt
Definition: types.h:45
tInteger mZonalLevelsNumber
Definition: EMM_DemagnetizedOperator.h:98
#define tReal
Definition: types.h:118
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: EMM_Operator.h:71
#define tInteger
Definition: types.h:90
const MATH_MultiLevelsToeplitzMatrix & getToeplitzMatrix() const
get the toeplitz matrix
Definition: EMM_DemagnetizedOperator.h:224