1 #ifndef SM_MacroCellDemagnetizedOperator_H
2 #define SM_MacroCellDemagnetizedOperator_H
5 #include "SM_SliceOperator.h"
8 #include "SM_MacroCellsNetwork.h"
9 #include "SM_MacroCellsMagnetizationField.h"
10 #include "SM_MacroCellsDemagnetizedField.h"
66 CORE_UniquePointer<SM_MacroCellsNetwork> mMC_Network;
67 CORE_UniquePointer<SM_MacroCellsMagnetizationField> mMC_M;
68 CORE_UniquePointer<SM_MacroCellsDemagnetizedField> mMC_Hdem;
119 mem+=(mMC_Hdem.get()==
null)?0:mMC_Hdem->getContentsMemorySize();
120 mem+=(mMC_M.get()==
null)?0:mMC_M->getContentsMemorySize();
121 mem+=(mMC_Network.get()==
null)?0:mMC_Network->getContentsMemorySize();
134 mMC_Network=std::move(network);
139 return *mMC_Network.get();
144 return *mMC_Network.get();
168 mMC_Hdem=std::move(f);
173 return *mMC_Hdem.get();
178 return *mMC_Hdem.get();
232 const tIndex& startIndex,
233 const tIndex& endIndex,
235 const tBoolean& alpha,
237 tReal *H)
const final ;
249 const tIndex& timeIndex,
269 const tIndex& startIndex,
270 const tIndex& endIndex,
271 const tReal *S)
const override;
277 std::stringstream ret;
279 ret<<
"MCs network:"<<mMC_Network->toString()<<
"\n";
280 ret<<
"MCs M:"<<mMC_M->toString()<<
"\n";
281 ret<<
"MCs Hdem:"<<mMC_Hdem->toString()<<
"\n";
This class is an list of options.
Definition: CORE_OptionsList.h:36
This class is describes a demagnetized operator.
Definition: SM_MacroCellsDemagnetizedField.h:50
This class is describes a demagnetized operator.
Definition: SM_MacroCellsDemagnetizedOperator.h:46
SM_MacroCellsMagnetizationField & getMacroCellsMagnetizationField()
get the macro cells Magnetization field
Definition: SM_MacroCellsDemagnetizedOperator.h:155
const SM_MacroCellsNetwork & getMacroCellsNetwork() const
get the macro cell network
Definition: SM_MacroCellsDemagnetizedOperator.h:143
const SM_MacroCellsMagnetizationField & getMacroCellsMagnetizationField() const
get the macro cells Magnetization field
Definition: SM_MacroCellsDemagnetizedOperator.h:160
SM_MacroCellsDemagnetizedField & getMacroCellsDemagnetizedField()
get the macro cells demagnetized field
Definition: SM_MacroCellsDemagnetizedOperator.h:172
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_MacroCellsDemagnetizedOperator.h:105
SM_MacroCellsNetwork & getMacroCellsNetwork()
get the macro cell network
Definition: SM_MacroCellsDemagnetizedOperator.h:138
virtual void updateState(const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S) override
uodate the state of the operator at time index
Definition: SM_MacroCellsDemagnetizedOperator.cpp:55
void setMacroCellsMagnetizationField(CORE_UniquePointer< SM_MacroCellsMagnetizationField > f)
set the macro cell Magnetization field
Definition: SM_MacroCellsDemagnetizedOperator.h:150
virtual tReal computeEnergySlice(const tIndex &stepIndex, const SM_Network &network, const SM_Material &material, const tIndex &startIndex, const tIndex &endIndex, const tReal *S) const override
compute the energy by virtual method
Definition: SM_MacroCellsDemagnetizedOperator.cpp:197
virtual tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: SM_MacroCellsDemagnetizedOperator.h:117
const SM_MacroCellsDemagnetizedField & getMacroCellsDemagnetizedField() const
get the macro cells demagnetized field
Definition: SM_MacroCellsDemagnetizedOperator.h:177
virtual tReal computeSpinEnergy(const tIndex &i, const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S) const override
compute the spin energy by virtual method
Definition: SM_MacroCellsDemagnetizedOperator.cpp:155
SM_MacroCellsDemagnetizedOperator(const CORE_OptionsList &arguments)
create a network class
Definition: SM_MacroCellsDemagnetizedOperator.cpp:9
void setMacroCellsDemagnetizedField(CORE_UniquePointer< SM_MacroCellsDemagnetizedField > f)
set the macro cell demagnetized field
Definition: SM_MacroCellsDemagnetizedOperator.h:167
virtual void computeMagneticFieldSlice(const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const tIndex &startIndex, const tIndex &endIndex, const tReal *S, const tBoolean &alpha, const tIndex &nH, tReal *H) const final
compute the anisotropy magnetic field by virtual method
Definition: SM_MacroCellsDemagnetizedOperator.cpp:66
void setMacroCellsNetwork(CORE_UniquePointer< SM_MacroCellsNetwork > network)
set the macro cell network
Definition: SM_MacroCellsDemagnetizedOperator.h:133
virtual void discretize(const SM_Network &network, const SM_Material &material) override
discretize the operator on the netowek
Definition: SM_MacroCellsDemagnetizedOperator.cpp:37
virtual tString toString() const override
return string representaton of the operator
Definition: SM_MacroCellsDemagnetizedOperator.h:276
virtual ~SM_MacroCellsDemagnetizedOperator(void)
destroy
Definition: SM_MacroCellsDemagnetizedOperator.cpp:34
This class is describes a Magnetization field.
Definition: SM_MacroCellsMagnetizationField.h:23
This class is describes a macro cell network.
Definition: SM_MacroCellsNetwork.h:25
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
This class is describes a network composed by.
Definition: SM_Network.h:66
This class is describes an operator operating on slice of particles of a network SM_Network.
Definition: SM_SliceOperator.h:32
virtual tString toString() const override
return string representaton of the operator
Definition: SM_SliceOperator.h:227
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: SM_SliceOperator.h:97