1 #ifndef EMM_MatterIndexField_H 2 #define EMM_MatterIndexField_H 85 inline static SP::EMM_MatterField
New() {
102 return mMatterIndices[i];
109 return mMatterIndices[i];
152 mMatters.add(matter);
173 mAnisotropyDirectionsFile=fn;
191 return mMatterIndices.
getSize();
196 return (mMatterIndices.
getSize()==1);
203 return mMatters.getSize();
226 "index out of bound");
238 "index out of bound");
325 vector<SP::EMM_Matter>::const_iterator iMatter=mMatters.begin();
327 if (iMatter!=mMatters.end()) {
328 Ms=(*iMatter)->getMagnetizationAtSaturation();
331 while (iMatter!=mMatters.end()) {
332 Msi=(*iMatter)->getMagnetizationAtSaturation();
const SV::EMM_Matter & getMatters() const
get the list of matters
Definition: EMM_MatterField.h:210
tUIndex getMattersNumber() const
get the number of matters
Definition: EMM_MatterField.h:202
SV::EMM_Matter & getMatters()
get the list of matters
Definition: EMM_MatterField.h:216
This class is a base class of E-MicromM core package.
Definition: EMM_Object.h:21
EMM_UIndexArray mMatterIndices
list of indices of matters element index -> index of matter in mMatters list (NO_MATTER if no matter)...
Definition: EMM_MatterField.h:49
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
static const tReal Mu0
Definition: EMM_Object.h:28
EMM_Matter & getMatter(const tUIndex &i)
get the matter at index
Definition: EMM_MatterField.h:236
void setElasticTensorAdimensionizedParameter(const tReal &rhoVs2)
set the adiemensionized parameter for the elastic tensor
Definition: EMM_MatterField.h:120
const tReal & getReferenceMagnetizationAtSaturation() const
get the magnetization at saturation of reference
Definition: EMM_MatterField.h:286
tReal mRhoVs2
Definition: EMM_MatterField.h:62
const tReal & getAdimensionizedEnergy() const
get the adimensionized energy
Definition: EMM_MatterField.h:316
tBoolean getMatterParameterDistribution(const tFlag &k, EMM_Array< T > &vs) const
get the values of a parameter of matters in a field for each cell
Definition: EMM_MatterField.hpp:7
const tReal & getReferenceLength() const
get the reference length
Definition: EMM_MatterField.h:292
const tReal & getCharacteristicMagneticTime() const
get the characteristic magnetic time
Definition: EMM_MatterField.h:304
void initIndices()
init indices to NO_MATTER
Definition: EMM_MatterField.h:157
This class describes a general morse array of size N. A morse array is composed by.
Definition: CORE_MorseArray.h:31
void addMatter(const SP::EMM_Matter matter)
add a matter
Definition: EMM_MatterField.h:151
tUIndex getSize() const
get the size of the field of indices
Definition: EMM_MatterField.h:190
tReal computeReferenceMagnetizationAtSaturation() const
get the reference magnetization at saturation
Definition: EMM_MatterField.h:324
const tString & getAnisotropyDirectionsFile() const
set the anisotropy dirtection file
Definition: EMM_MatterField.h:184
tBoolean loadFromFile(const tString &fileName)
load the direction of anisotropy and the index of matters for cells
Definition: EMM_MatterField.cpp:144
#define tBoolean
Definition: types.h:139
tBoolean saveToFile(const tString &fileName) const
write the matters index into a file
Definition: EMM_MatterField.h:420
DEFINE_SPTR(EMM_MagneticExcitationOperator)
void setAnisotropyDirectionsFile(const tString &fn)
set the anisotropy dirtection file
Definition: EMM_MatterField.h:172
tReal mLe
Definition: EMM_MatterField.h:57
void setSize(const tUIndex &n)
set the size
Definition: CORE_Array.h:292
virtual ~EMM_MatterField(void)
destroy
Definition: EMM_MatterField.cpp:30
tString toString() const
return the string associated to the integer
Definition: CORE_Integer.h:106
SP_OBJECT(EMM_MatterField)
#define null
Definition: types.h:144
void setMatters(const SV::EMM_Matter &matters)
set the matters list
Definition: EMM_MatterField.h:164
tUIndex & operator[](const tUIndex &i)
get the matter index in the matters list of the matter at cell i
Definition: EMM_MatterField.h:108
tReal mMsat
Definition: EMM_MatterField.h:58
tReal getElasticTensorAdimensionizedParameter() const
get the adiemensionized parameter for the elastic tensor
Definition: EMM_MatterField.h:128
This class describes the field of directions of anisotropy This fields contains 2 arrays : ...
Definition: EMM_AnisotropyDirectionsField.h:35
This class describes a matter for E-MicroM package.
Definition: EMM_Matter.h:34
static SP::EMM_MatterField New()
create a shared pointer to the field of anisotropy direction
Definition: EMM_MatterField.h:85
tBoolean isUniform() const
return true if the field is uniform
Definition: EMM_MatterField.h:195
void setSize(const tUIndex &n)
set the size of matter index
Definition: EMM_MatterField.h:144
tBoolean computeAnisotropyDirectionsField(EMM_AnisotropyDirectionsField &dirF) const
compute the anisotropy directions field
Definition: EMM_MatterField.cpp:32
const EMM_UIndexArray & getMatterIndices() const
get the array of the index of the matter for all cell
Definition: EMM_MatterField.h:248
This class describes the field of matters.
Definition: EMM_MatterField.h:34
virtual tString toString() const
return a string representation
Definition: EMM_MatterField.cpp:464
const tUIndex & operator[](const tUIndex &i) const
get the matter index in the matters list of the matter at cell i
Definition: EMM_MatterField.h:101
tReal mTm
Definition: EMM_MatterField.h:59
SV::EMM_Matter mMatters
list of matters
Definition: EMM_MatterField.h:53
const EMM_Matter & getMatter(const tUIndex &i) const
get the matter at index
Definition: EMM_MatterField.h:224
#define tUIndex
Definition: types.h:126
SP::EMM_MagneticExcitationOperator createAnisotropyOperator() const
create the anisotropy operator corresponding to the crytal type of the field
Definition: EMM_MatterField.cpp:102
tReal mEd
Definition: EMM_MatterField.h:61
void clear()
clear matters
Definition: EMM_MatterField.h:134
#define tString
Definition: types.h:135
tReal mL
Definition: EMM_MatterField.h:56
const tReal & getReferenceElasticLength() const
get the reference elastic length
Definition: EMM_MatterField.h:298
this class describes the exceptions raised for E-MicromM package
Definition: EMM_Exception.h:14
EMM_MatterField(void)
create
Definition: EMM_MatterField.cpp:15
tString mAnisotropyDirectionsFile
the file descrbing the directions of anisotropy
Definition: EMM_MatterField.h:45
This class is an operator of a E-MicromM package wich compute a magnetic excitation operator...
Definition: EMM_MagneticExcitationOperator.h:15
tBoolean loadFromLOCFile(const tString &fileName)
load the matter index per cell in a .loc file of the form comment
Definition: EMM_MatterField.cpp:159
static tBoolean saveToFile(const tString &fileName, const EMM_UIndexArray &matterIndices)
write the matters index into a file
Definition: EMM_MatterField.cpp:436
#define tReal
Definition: types.h:118
void adimensionize(const tReal &dmin, const tReal &dmax)
adimensionize all the matters
Definition: EMM_MatterField.cpp:49
tReal mTed
Definition: EMM_MatterField.h:60
static const tUIndex NO_MATTER
Definition: EMM_MatterField.h:40
tBoolean loadFromANIFile(const tString &fileName)
load the matter index per cell in a .ani file of the form comment
Definition: EMM_MatterField.cpp:288
void initArray(const Q &f)
init the array to uniform value
Definition: CORE_Array.h:316
const tReal & getAdimensionizedElasticTime() const
get the adimenionized elastic time
Definition: EMM_MatterField.h:310
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74