1 #ifndef SMOMPI_LandauLifschitzSystem_HPP
2 #define SMOMPI_LandauLifschitzSystem_HPP
7 template<
class StochFImpl>
9 const tReal& dt,
const tReal& bdt,
const tReal& epsilon,
14 tIndex nH=H.getElementsNumber();
40 template<
class StochFImpl,
class NoiseFImpl>
44 tString routineName=
"SM_LandauLifschitzSystem::stochasticRunWithSCStochasticFunctions<StochFI,NoiseI>(const tIndex&,StochFI&,const NoiseI&)";
47 tBoolean succeeds=
true;
68 "SMOMPI_LandauLifschitzSystem::templatedStochasticRun()",
69 "atomic spin directions has bad size : "+std::to_string(St.
getSize())+
" ("+std::to_string(s)+
")" );
116 while (iStep<steppersNumber) {
163 template<
class StochFImpl,
class NoiseImpl,
class StochOutputImpl>
168 tString routineName=
"SM_LandauLifschitzSystem::stochasticRunWithSCStochasticFunctions<StochFI,NoiseI,StochoOutputI>(const tIndex&,StochI&,const NoiseI&,StochOutputI&)";
173 if (nDrawnSteps==0) nDrawnSteps=steppersNumber+1;
176 tBoolean succeeds=
true;
197 "SM_LandauLifschitzSystem::templatedStochasticRun()",
198 "atomic spin directions has bad size : "+std::to_string(St.
getSize())+
" ("+std::to_string(s)+
")");
235 tInteger iDrawnStep=0;
247 while (iStep<steppersNumber) {
261 if (iDrawnStep==nDrawnSteps) {
262 stochasticOutput.
store(*
this);
this class describes the exceptions raised for CORE package
Definition: CORE_Exception.h:17
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
virtual void computeVariationMagneticField(const tReal &dt, SM_RealField &H) const final
computes
Definition: SMOMPI_LandauLifschitzSystem.cpp:124
void computeBrownianVariationMagneticFieldWithSCStochasticFunctions(SM_MultiStochasticFunctions< StochFImpl > &stochFs, const tReal &dt, const tReal &bdt, const tReal &epsilon, const tBoolean &incdWt, tReal *dWt, SM_RealField &H)
add stochastic brownian field
Definition: SMOMPI_LandauLifschitzSystem.hpp:8
tBoolean stochasticRunWithSCStochasticFunctions(const tIndex &steppersNumber, SM_MultiStochasticFunctions< StochFImplement > &stochasticFunctions, const SM_NoiseRateFunction< NoiseFImplement > &noiseRateFunction)
compute the relaxation process by calling only virtual methods
static constexpr tDimension DIM
space dimension
Definition: SM_Constants.h:80
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
const tBoolean & isRealBrownianVariable() const
get if the brownian variable is a field or a real
Definition: SM_LandauLifschitzSystem.h:399
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 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
void computeBrownianVariationMagneticFieldSliceWithSCStochasticFunctions(SM_StochasticFunctions< StochFImpl > &randF, tIndex start, tIndex end, const tReal &dt, const tReal &bdt, const tReal &epsilon, const tBoolean &incdWt, tReal *dWt, tReal *H)
add stochastic brownian field for particle indices in [start,end[
Definition: SM_LandauLifschitzSystem.h:692
const SM_LandauLifschitzFunction & getLandauLifschitzFunction() const
get the Landau Lifschitz function return the Landau lifschitz function for reading
Definition: SM_LandauLifschitzSystem.h:423
const SM_RealField & getBrownianField() const
get the generated brownian variable for reading
Definition: SM_LandauLifschitzSystem.h:406
This class describes a materials defined by state attributes:
Definition: SM_Material.h:61
This class describes a multi stochastic functions based on same random number generator which impleme...
Definition: SM_MultiStochasticFunctions.h:26
This class is describes a network composed by.
Definition: SM_Network.h:66
const tInteger & getHaloParticlesNumber() const
return the halo particles number
Definition: SM_Network.h:355
const tInteger & getParticlesNumber() const
return the particles number
Definition: SM_Network.h:349
This class describes a templated noise rate function as static polymorphism.
Definition: SM_NoiseRateFunction.h:14
virtual tReal computeFunction(const tReal &t) const final
compute the noise rate function
Definition: SM_NoiseRateFunction.h:99
tReal computeSCFunction(const tReal &t) const
compute the noise rate function by static polymorphism
Definition: SM_NoiseRateFunction.h:91
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
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
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