1 #ifndef SM_HeissenbergOperator_H
2 #define SM_HeissenbergOperator_H
101 tReal *B)
const override {
115 tReal& E)
const override{
154 tReal iLambda2x2=2./(lambda*lambda);
170 const tReal *Mui=mu,*Mui_d=
null;
187 for (i=0;i<nParticles;i++) {
192 for (iN=0;iN<(*nNeighbors_i);iN++) {
205 for (d=0;d<dim;d++) {
208 Hex_id=(*Muj_d)*(*iJ)*iLambda2x2;
214 E-=0.5*Hex_id*(*Mui_d);
252 const tReal *mu)
const override{
264 const tReal *mu)
const {
274 tReal iLambda2=1./(lambda*lambda);
283 const tReal *Mui=mu,*Mui_d;
301 for (i=0;i<nParticles;i++) {
305 for (iN=0;iN<(*nNeighbors_i);iN++) {
315 for (d=0;d<dim;d++) {
316 E-=(*Muj_d)*(*Mui_d)*(*iJ)*iLambda2;
tUCInt tDimension
Definition: CORE_StdPtrField.h:567
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:94
This class is describes the exchange operator.
Definition: SM_HeissenbergOperator.h:27
tReal computeTemplatedEnergy(const tIndex &t, const SM_Network &network, const tReal *mu) const
compute the energy
Definition: SM_HeissenbergOperator.h:262
void computeTemplatedMagneticField(const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B) const
compute the magnetic field
Definition: SM_HeissenbergOperator.h:125
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_HeissenbergOperator.h:86
void computeTemplatedMagneticFieldAndEnergy(const tIndex &t, const SM_Network &network, const tReal *mu, tReal *H, tReal &E) const
compute the magnetic field and energy
Definition: SM_HeissenbergOperator.h:141
virtual void computeMagneticFieldAndEnergy(const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B, tReal &E) const override
compute the magnetic field at time t by virtual method
Definition: SM_HeissenbergOperator.h:111
virtual tReal computeEnergy(const tIndex &t, const SM_Network &network, const tReal *mu) const override
compute the energy at time t
Definition: SM_HeissenbergOperator.h:250
virtual void computeMagneticField(const tIndex &t, const SM_Network &network, const tReal *mu, tReal *B) const override
compute the magnetic field at time t by virtual method
Definition: SM_HeissenbergOperator.h:98
SM_HeissenbergOperator(void)
create a network class
Definition: SM_HeissenbergOperator.h:41
static CORE_UniquePointer< SM_HeissenbergOperator > New()
build a new instance of the operator
Definition: SM_HeissenbergOperator.h:59
virtual CORE_UniquePointer< SM_Operator > NewInstance() const override
create a New instance of this @retrun an unique pointer to the instance
Definition: SM_HeissenbergOperator.h:66
virtual ~SM_HeissenbergOperator(void)
destroy
Definition: SM_HeissenbergOperator.h:48
This class is describes a a network.
Definition: SM_Network.h:18
tDimension getDimension() const
return the dimension
Definition: SM_Network.h:133
const tReal & getLambda() const
get the lambda value
Definition: SM_Network.h:201
const std::valarray< tIndex > & getNeighborsIndices() const
Definition: SM_Network.h:266
const std::valarray< tUInt > & getNeighborsNumber() const
get the neighbors number
Definition: SM_Network.h:252
const std::valarray< tReal > & getHeissenbergCoefficients() const
get the Heissenberg coefficients
Definition: SM_Network.h:283
tInteger getParticlesNumber() const
return the particles number
Definition: SM_Network.h:146
void setName(const tString &name)
set the name
Definition: SM_Operator.h:95
virtual tMemSize getContentsMemorySize() const
return nthe memory size of the included associations
Definition: SM_Operator.h:80
This class is describes an implmentation of operator with the class I.
Definition: SM_TemplatedOperator.h:18
typename std::unique_ptr< T, CORE_Object::Delete > CORE_UniquePointer
Definition: sp.h:8
#define tUInt
Definition: types.h:44
#define tIndex
Definition: types.h:157
#define tMemSize
Definition: types.h:166
#define tReal
Definition: types.h:137