138 inline static SP::EMM_Matter
New() {
168 mParameters[
ALPHA]=v;
214 for (
tUSInt k=0;k<9;k++) mAnisotropyDirections[k]=dir[k];
223 for(
tUSInt index=0;index<3;index++)
224 mAnisotropyDirections[3*i+index]=dir[index];
235 mAnisotropyDirections[3*i+k]=dir;
247 mParameters[
RHO]=rho;
253 return mParameters[
RHO];
259 return mParameters[
RHOd];
380 return mAnisotropyDirections[0];
395 return mParameters[k];
419 return mAnisotropyDirections[0];
434 return mParameters[k];
442 return mParametersDimension[k];
454 return mParameters[
ALPHA];
461 return mParameters[
Ms];
469 return mParameters[
A];
486 return mParameters[
K1];
492 return mParameters[
K2];
506 return &mAnisotropyDirections[3*i];
516 if (t==UNIAXIAL_ANISOTROPY)
return 1;
517 else if (t==PLANAR_ANISOTROPY)
return 1;
518 else if (t==CUBIC_ANISOTROPY)
return 3;
530 return s+3*(r+3*(q+3*p));
532 if (p>=q) i=q+p*(p+1)/2;
535 if (r>=s) j=s+r*(r+1)/2;
540 if (p>=q) i=q+p*(p+1)/2;
543 if (r>=s) j=s+r*(r+1)/2;
546 if (i>=j)
return j+(i*(i+1)/2);
547 else return j+(i*(i+1)/2);
682 return mParameters[
Ad];
690 return mParameters[
LEX];
696 return mParameters[
K1d];
702 return mParameters[
K2d];
782 const SV::EMM_Matter& matters);
This class is a base class of E-MicromM core package.
Definition: EMM_Object.h:21
static const tFlag LAMBDA_M
Definition: EMM_Matter.h:61
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
const CORE_RealArray & getElasticTensor() const
get the elastic tensor
Definition: EMM_Matter.h:557
static SP::EMM_Matter New()
create a material object
Definition: EMM_Matter.h:138
CORE_RealArray mLambdaEd
Definition: EMM_Matter.h:103
void setVolumicMass(const tReal &rho)
set the volumic mass
Definition: EMM_Matter.h:246
CORE_RealArray mLambdaMd
Definition: EMM_Matter.h:104
static const tFlag D_LEX
Definition: EMM_Matter.h:74
tReal mAnisotropyDirections[9]
anisotropy direction
Definition: EMM_Matter.h:96
static tBoolean loadMattersFromFile(const tString &fileName, SV::EMM_Matter &matters)
load a list of matters
Definition: EMM_Matter.cpp:631
void setMagneticTensor(const vector< tReal > &lambdaM)
set the magentic tensor for magnetostriction
Definition: EMM_Matter.h:338
const tUCInt & getParameterDimension(const tFlag &k) const
get the parameter dimension
Definition: EMM_Matter.h:441
static const tFlag LEX
Definition: EMM_Matter.h:73
static const tFlag PLANAR_ANISOTROPY
Definition: EMM_Matter.h:41
const tReal & getAdimensionizedElasticTensor(const tDimension &i, const tDimension &j, const tDimension &k, const tDimension &l) const
get the adimensiized elastic tensor for magnetostriction
Definition: EMM_Matter.h:715
static const tFlag CUBIC_ANISOTROPY
Definition: EMM_Matter.h:42
void setAnisotropyDirectionCoordinate(const tSInt &i, const tSInt &k, const tReal &dir)
the k-coordinate of the i-the direction of anisotropy
Definition: EMM_Matter.h:232
const tReal & getParameter(const tUSInt &k) const
get the parameter at index k for reading
Definition: EMM_Matter.h:377
const tReal & getAdimensionizedMainAnisotropy() const
get the main adimensionized anisotropy constant
Definition: EMM_Matter.h:695
static const tFlag ANISOTROPY_DIRECTIONS
Definition: EMM_Matter.h:59
tBoolean saveToStream(ofstream &stream, const tBoolean &writeHeader) const
save the matter into a stream
Definition: EMM_Matter.cpp:553
void setAnisotropy(const tFlag &ani)
set the anisotropy type
Definition: EMM_Matter.h:195
CORE_RealArray & getAdimensionizedMagneticTensor()
get the adimensionized magnetic tensor
Definition: EMM_Matter.h:609
CORE_RealArray & getMagneticTensor()
get the magnetic tensor
Definition: EMM_Matter.h:579
void setMagneticTensor(const tUSInt &i, const tUSInt &j, const tUSInt &k, const tUSInt &l, const tReal &lambdaM)
set the magnetic tensor for magnetostriction
Definition: EMM_Matter.h:322
const tReal & getElasticTensor(const tDimension &i, const tDimension &j, const tDimension &k, const tDimension &l) const
get the elastic tensor for magnetostriction
Definition: EMM_Matter.h:624
const tReal * getAnisotropyDirections() const
get anisotropy vector in 3 direction which are not necessary normalized
Definition: EMM_Matter.h:498
EMM_Matter(void)
create
Definition: EMM_Matter.cpp:50
static const tFlag K2
Definition: EMM_Matter.h:58
static const tFlag BLOCH
Definition: EMM_Matter.h:75
const tReal * getAnistropyDirections(const tUIndex &i) const
set anisotropy vector at direction i
Definition: EMM_Matter.h:505
void setName(const tString &name)
set the name
Definition: EMM_Matter.h:157
static tUIndex getTensorIndex(const tUIndex &n, const tDimension &p, const tDimension &q, const tDimension &r, const tDimension &s)
get the index of the element (p,q,r,s) in the tensor array depending on tensor memory size ...
Definition: EMM_Matter.h:525
#define tUCInt
Definition: types.h:21
void setMagnetizationAtSaturation(const tReal &v)
set the magnetization at saturation
Definition: EMM_Matter.h:174
virtual void copy(const EMM_Matter &mat)
copy the matter
Definition: EMM_Matter.cpp:104
void setExchangeConstant(const tReal &v)
set the swap constant
Definition: EMM_Matter.h:183
void setElasticTensor(const tUSInt &n, const tReal *lambdaE)
set the elastic tensor for magnetostriction
Definition: EMM_Matter.h:299
#define tUSInt
Definition: types.h:28
static const tFlag K1
Definition: EMM_Matter.h:57
T & getValue(const tUIndex &i)
get the values of the array for writing
Definition: CORE_Array.h:961
const CORE_RealArray & getMagneticTensor() const
get the magnetic tensor
Definition: EMM_Matter.h:572
#define tBoolean
Definition: types.h:139
tBoolean saveToFile(const tString &fileName) const
Definition: EMM_Matter.cpp:533
tFlag getAnisotropy() const
get the anisotropy in
Definition: EMM_Matter.h:478
static const tFlag A
Definition: EMM_Matter.h:55
tReal & getParameter(const tUSInt &k)
get the parameter at index k for writing
Definition: EMM_Matter.h:416
void setElasticTensor(const tReal &lambdaE)
set the elastic tensor for magnetostriction
Definition: EMM_Matter.h:264
#define tDimension
Definition: EMM_Types.h:10
const CORE_RealArray & getAdimensionizedMagneticTensor() const
get the adimensionized magnetic tensor
Definition: EMM_Matter.h:602
CORE_RealArray mLambdaE
elastic magnetostriction tensor
Definition: EMM_Matter.h:101
static const tFlag UNIAXIAL_ANISOTROPY
Definition: EMM_Matter.h:40
CORE_RealArray mLambdaM
Definition: EMM_Matter.h:102
tReal mParameters[N_PARAMETERS]
Definition: EMM_Matter.h:89
void setMainAnisotropyConstant(const tReal &k)
set the main anisotropy constant
Definition: EMM_Matter.h:201
const tReal & getExchangeConstant() const
get the exchange constant
Definition: EMM_Matter.h:468
tBoolean loadFromFile(const tString &fileName)
load the matter from text file
Definition: EMM_Matter.cpp:219
static const tFlag LAMBDA_E
Definition: EMM_Matter.h:60
const tReal & getMagneticTensor(const tDimension &i, const tDimension &j, const tDimension &k, const tDimension &l) const
get the lambdaM parameter for magnetostriction
Definition: EMM_Matter.h:637
This class describes a matter for E-MicroM package.
Definition: EMM_Matter.h:34
static const tFlag K1d
Definition: EMM_Matter.h:66
const tReal & getSecondAnisotropyConstant() const
get the second anisotropy constant
Definition: EMM_Matter.h:491
void setAnisotropyDirection(const tSInt &i, const tReal dir[3])
Definition: EMM_Matter.h:221
tBoolean loadFromStream(ifstream &stream, tString &lastUnreadLine)
load the matter from a stream
Definition: EMM_Matter.cpp:240
static const tFlag Q
Definition: EMM_Matter.h:76
static const tFlag K2d
Definition: EMM_Matter.h:67
void setAbsorptionParameter(const tReal &v)
set the aborption parameter
Definition: EMM_Matter.h:167
#define tSInt
Definition: types.h:30
static const tFlag N_PARAMETERS
Definition: EMM_Matter.h:47
static const tFlag Ms
Definition: EMM_Matter.h:54
void setSecondAnisotropyConstant(const tReal &k)
set the second anisotropy constant
Definition: EMM_Matter.h:207
static const tFlag LAMBDA_Md
Definition: EMM_Matter.h:69
const tReal & getMainAnisotropyConstant() const
get the main anisotropy constant
Definition: EMM_Matter.h:485
void setElasticTensor(const tUSInt &i, const tUSInt &j, const tUSInt &k, const tUSInt &l, const tReal &lambdaE)
set the elastic tensor for magnetostriction of size 3x3x3x3
Definition: EMM_Matter.h:275
#define tUIndex
Definition: types.h:126
const tReal & getVolumicMass() const
get the volumic mass
Definition: EMM_Matter.h:252
const tReal & getAdimensionizedVolumicMass() const
get the adimznionied volumic mass
Definition: EMM_Matter.h:258
const tReal & getExchangeLength() const
get the exchange length
Definition: EMM_Matter.h:689
void setElasticTensor(const vector< tReal > &lambdaE)
set the elastic tensor for magnetostriction
Definition: EMM_Matter.h:292
const tReal & getAdimensionizedSecondAnisotropy() const
get the second adimensionized anisotropy constant
Definition: EMM_Matter.h:701
CORE_RealArray & getAdimensionizedElasticTensor()
get the adimensionized elastic tensor
Definition: EMM_Matter.h:594
static const tFlag ALPHA
Definition: EMM_Matter.h:52
#define tString
Definition: types.h:135
static const tFlag LAMBDA_Ed
Definition: EMM_Matter.h:68
const tReal & getAdimensionizedExchangeConstant() const
get the adimensionized exchange constant:
Definition: EMM_Matter.h:681
tUCInt mParametersDimension[N_PARAMETERS]
Definition: EMM_Matter.h:92
const tString & getName() const
get the name of the matter
Definition: EMM_Matter.h:447
static const tFlag CRYSTAL_TYPE
Definition: EMM_Matter.h:56
static const tFlag Ad
Definition: EMM_Matter.h:65
CORE_RealArray & getElasticTensor()
get the elastic tensor
Definition: EMM_Matter.h:564
const tReal & getAbsorptionParameter() const
get the absorption parameter
Definition: EMM_Matter.h:453
void setMagneticTensor(const tReal &lambdaM)
set the magnetic tensor for magnetostriction
Definition: EMM_Matter.h:310
virtual tString toString() const
return the class information into a string
Definition: EMM_Matter.cpp:777
tUCInt getAnisotropyDirectionsNumber() const
get the number of anisotropy directions in [0,3[
Definition: EMM_Matter.h:514
static const tFlag RHO
Definition: EMM_Matter.h:62
static const tFlag RHOd
Definition: EMM_Matter.h:70
void setValue(const tUIndex &i, const T &v)
set the value of the array at index i
Definition: CORE_Array.h:496
const tReal & getAdimensionizedMagneticTensor(const tDimension &i, const tDimension &j, const tDimension &k, const tDimension &l) const
get the adimensionized lambdaM parameter for magnetostriction
Definition: EMM_Matter.h:729
static const tString ANISOTROPY[]
Definition: EMM_Matter.h:43
const CORE_RealArray & getAdimensionizedElasticTensor() const
get the adimensionized elastic tensor
Definition: EMM_Matter.h:587
const tReal & getMagnetizationAtSaturation() const
get the magnetization at saturation
Definition: EMM_Matter.h:460
static tBoolean saveMattersToFile(const tString &fileName, const SV::EMM_Matter &matters)
write the matters into a file
Definition: EMM_Matter.cpp:593
#define tReal
Definition: types.h:118
tString mName
the name of the material used as key in the gui
Definition: EMM_Matter.h:86
#define ASSERT_IN(a)
Definition: types.h:196
void initArray(const Q &f)
init the array to uniform value
Definition: CORE_Array.h:316
void setAnisotropyDirections(const tReal dir[9])
set anisotropy vector in 3 direction which are not necessary normalized
Definition: EMM_Matter.h:213
virtual ~EMM_Matter(void)
destroy
Definition: EMM_Matter.cpp:97
void setMagneticTensor(const tUSInt &n, const tReal *lambdaM)
set the magnetic tensor for magnetostriction
Definition: EMM_Matter.h:346
void adimensionize(const tReal &Ms, const tReal &rhoVs2, const tReal &dmin, const tReal &dmax)
compute the adimensionized constants
Definition: EMM_Matter.cpp:145
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74