11 template<
class StochOutputI>
14 tString routineName=
"SM_LandauLifschitzSystem::deterministicRun<StochasticOutput>(const tIndex&,StochasticOutput&)";
23 tBoolean succeeds=
true;
43 "SM_LLSystem::deterministicRun("+std::to_string(steppersNumber)+
",...)",
77 tBoolean isRelaxationReached=
false;
82 tInteger iDrawnStep=0;
93 while ( (iStep<steppersNumber) && ( (!mIsRelaxed) || (!isRelaxationReached)) ) {
115 isRelaxationReached=(fabs(relaxationValue)<mRelaxationTolerance);
119 if (iDrawnStep==nDrawnSteps) {
121 stochasticOutput.
store(*
this);
169 template<
class StochOutputImplement>
173 tString routineName=
"SM_LandauLifschitzSystem::stochasticRun<StochasticOutput>(const tIndex&, SM_StochasticFunctions&,StochasticOutput&)";
178 if (nDrawnSteps==0) nDrawnSteps=steppersNumber+1;
181 tBoolean succeeds=
true;
234 tInteger iDrawnStep=0;
239 tBoolean incDWt=(!mIsRealBrownianVariable);
243 if (incDWt && (mDeltaWt.
getSize()>0)) iDWt=&mDeltaWt[0];
247 while (iStep<steppersNumber) {
266 if (iDrawnStep==nDrawnSteps) {
268 stochasticOutput.
store(*
this);
323 template<
class StochOutputImpl>
327 const std::function<
void(
const tReal&,
const tReal& ,
const tReal&,tReal& )>& F) {
328 tString routineName=
"SM_LandauLifschitzSystem::stochasticJRun<StochasticOutput>(const tIndex&, SM_StochasticFunctions&,StochasticOutput&)";
333 if (nDrawnSteps==0) nDrawnSteps=steppersNumber+1;
336 tBoolean succeeds=
true;
382 tInteger iDrawnStep=0;
386 while (iStep<steppersNumber) {
402 if (iDrawnStep==nDrawnSteps) {
403 stochasticOutput.
store(*
this);
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:17
tBoolean isNANContained() const
return true if one value is Not A Number
Definition: CORE_Field.h:782
tIndex getSize() const
return the number values of the container
Definition: CORE_Field.h:161
static void EndCallRoutine(const tString &routineName)
end calling routine
Definition: CORE_Profiler.h:91
static void StartCallRoutine(const tString &routineName)
start calling routine
Definition: CORE_Profiler.h:61
This class describes a landau lifschitz function of the form :
Definition: SM_LandauLifschitzFunction.h:30
void computeFunction(const tIndex &nParticles, const SM_RealField &S, const SM_RealField &B, SM_RealField &F) const
computes the magnetic function
Definition: SM_LandauLifschitzFunction.h:226
const SM_RealField & getMagneticField() const
get the magnetic field for writting
Definition: SM_LandauLifschitzSystem.h:474
const SM_RealField & getMagneticMomentDirectionsVariation() const
get the variation of the direction of the magnetic moments for writting
Definition: SM_LandauLifschitzSystem.h:480
SM_NoiseRateFunctionInterface & getNoiseRateFunction()
get the noise rate function
Definition: SM_LandauLifschitzSystem.h:278
tBoolean stochasticJRun(const tIndex &steppersNumber, SM_StochasticFunctionsInterface &stochasticFunctions, const std::function< void(const tReal &, const tReal &, const tReal &, tReal &)> &F)
compute the steppers number of system for reaching the relaxed state
Definition: SM_LandauLifschitzSystem.cpp:130
virtual void computeVariationMagneticField(const tReal &dt, SM_RealField &H) const =0
computes
tBoolean deterministicRun(const tIndex &steppersNumber, SM_StochasticOutput< StochOutputI > &stochasticOutput)
compute deterministic running of steppers number of the system with computing statistics
Definition: SM_LandauLifschitzSystem.hpp:12
const tIndex & getTimeIndex() const
get the time index
Definition: SM_LandauLifschitzSystem.h:221
virtual tBoolean computeMagneticMomentDirectionsAtNextTimeStep(const tReal &dt, const tReal &epsilon_t, const SM_RealField &deltaSt, SM_RealField &St)=0
compute direction of magnetic moments at next time
const tReal & getTime() const
get the time
Definition: SM_LandauLifschitzSystem.h:214
const tReal & getRelaxationValue() const
get the relaxation value to detect relaxation for reading
Definition: SM_LandauLifschitzSystem.h:332
virtual void computeBrownianVariationMagneticField(SM_MultiStochasticFunctionsInterface &stochFs, const tReal &dt, const tReal &bdt, const tReal &epsilon, const tBoolean &incdWt, tReal *dWt, SM_RealField &H)=0
add stochastic brownian field
const SM_TimeStepper & getTimeStepper() const
get the time stepper
Definition: SM_LandauLifschitzSystem.h:200
const tReal & getNoiseRate() const
get the noise rate
Definition: SM_LandauLifschitzSystem.h:251
tReal computeNetTorque() const
compute Net Torque
Definition: SM_LandauLifschitzSystem.h:347
const SM_LandauLifschitzFunction & getLandauLifschitzFunction() const
get the Landau Lifschitz function return the Landau lifschitz function for reading
Definition: SM_LandauLifschitzSystem.h:423
tBoolean stochasticRun(const tIndex &steppersNumber, SM_MultiStochasticFunctionsInterface &sfs)
compute the steppers number of system without stochastic output
Definition: SM_LandauLifschitzSystem.cpp:3
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
const tReal & getAdimensionizedExchangeEnergyFactor() const
get the characteristic exchange energy factor
Definition: SM_Material.h:375
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctionsInterface.h:18
This class is describes a network composed by.
Definition: SM_Network.h:66
virtual void updateConnectionValues(const tReal &noiseRate, SM_StochasticFunctionsInterface &randomF, const tReal &J, const std::function< void(const tReal &, const tReal &, const tReal &, tReal &)> &F)=0
compute the connection values of the particles in [startInddex,endIndex[
const tInteger & getParticlesNumber() const
return the particles number
Definition: SM_Network.h:349
This class describes a noise rate function.
Definition: SM_NoiseRateFunctionInterface.h:13
virtual tReal computeFunction(const tReal &t) const =0
compute the noise rate function
This class describes a stochastic functions based on same random number generator which implement ran...
Definition: SM_StochasticFunctionsInterface.h:18
const tInteger & getDrawnStepsNumber() const
get the drawn number to compute the stochastic output
Definition: SM_StochasticOutputComponent.h:243
this class implements the virtual methods of its base class SM_StochasticOutputComponent with templat...
Definition: SM_StochasticOutput.h:24
tBoolean store(const SM_System &system)
store the stochastic data during the relation method of the system
Definition: SM_StochasticOutput.h:164
const SM_RealField & getMagneticMomentDirections() const
get the unit direction of spins at time
Definition: SM_System.h:267
void updateOperatorsState(const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S)
update the operators state before computeing magnetic field
Definition: SM_System.h:573
const SM_Network & getNetwork() const
get the network
Definition: SM_System.h:170
const SM_Material & getMaterial() const
get the material of the network
Definition: SM_System.h:193
const tReal & getStochasticNoise() const
get the stochastic noise without dimension
Definition: SM_System.h:385
void computeMagneticField(const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S, SM_RealField &H) const
compute the magnetic field at time step index t by calling the virtual method SM_Operator::computeMag...
Definition: SM_System.h:593
const tIndex & getStepIndex() const
get the step index
Definition: SM_System.h:415
This class is describes a time stepper.
Definition: SM_TimeStepper.h:13
const tReal & getTimeStep() const
return the time step
Definition: SM_TimeStepper.h:108