1 #ifndef SM_TemplatedSystem_HPP
2 #define SM_TemplatedSystem_HPP
3 template<
class SystemImpl>
4 template<
class StochImpl,
class NoiseImpl>
34 const SM_RealField & mu0=this->getInitialMagneticMoment();
39 ASSERT_IN(getMagneticField().getElementsNumber()==nParticles);
42 tReal *B=&getMagneticField()[0];
56 memcpy(mu_t,&mu0[0],N*
sizeof(
tReal));
59 tReal *mu_tpdt=&mu[N];
63 tIndex nE=getOperatorsNumber()+1;
68 memset(E,0,nE*nTimeSteps*
sizeof(
tReal));
79 for (
tIndex iT=0;iT<nTimeSteps;iT++) {
89 computeTemplatedMagneticFieldAndEnergies(iT,network,mu_t,B,E_t);
105 if (!computeTemplatedMuAtNextTimeStep(dt,epsilon_t,nParticles,dim,mu_t,mu_tpdt)) {
tIndex getElementsNumber() const
return the number values of the container
Definition: CORE_Field.h:118
This class describes a landau lifschitz function of the form :
Definition: SM_LandauLifschitzFunction.h:26
void computeFunction(const SM_RealField &Mu, const SM_RealField &B, SM_RealField &F) const
computes the magnetic function
Definition: SM_LandauLifschitzFunction.h:161
This class is describes a a network.
Definition: SM_Network.h:18
tDimension getDimension() const
return the dimension
Definition: SM_Network.h:133
tInteger getParticlesNumber() const
return the particles number
Definition: SM_Network.h:146
This class describes a templated noise rate function as static polymorphism.
Definition: SM_TemplatedNoiseRateFunction.h:14
tReal computeTemplatedFunction(const tReal &t) const
compute the noise rate function by static polymorphism
Definition: SM_TemplatedNoiseRateFunction.h:91
This class describes a templated stochastic function to generate random numbers.
Definition: SM_TemplatedStochasticFunction.h:15
tReal templatedRandom() const
compute a random number
Definition: SM_TemplatedStochasticFunction.h:64
tBoolean makeTemplatedRelaxation(const SM_TemplatedStochasticFunction< StochImpl > &randomFunction, tReal *mu, tReal *Es)
compute the relaxation process by calling only templated methods
Definition: SM_TemplatedSystem.h:124
This class is describes a time stepper.
Definition: SM_TimeStepper.h:13
const tReal & getTimeStep() const
return the time step
Definition: SM_TimeStepper.h:103
const tIndex & getMaximumTimeStepsNumber() const
return the time steps number
Definition: SM_TimeStepper.h:130
#define ASSERT_IN(a)
Definition: functions.h:601
#define tIndex
Definition: types.h:157
#define tUSInt
Definition: types.h:38
#define tBoolean
Definition: types.h:151
#define tReal
Definition: types.h:137