Commit3 JT 110419

- comments in precession
This commit is contained in:
julient31
2019-11-04 17:38:32 -07:00
parent 74e502eb63
commit 816546d008
4 changed files with 11 additions and 11 deletions

View File

@ -104,7 +104,7 @@ void ComputeSpin::compute_vector()
mag[0] += sp[i][0];
mag[1] += sp[i][1];
mag[2] += sp[i][2];
magenergy -= (sp[i][0]*fm[i][0] + sp[i][1]*fm[i][1] + sp[i][2]*fm[i][2]);
magenergy -= 2.0*(sp[i][0]*fm[i][0] + sp[i][1]*fm[i][1] + sp[i][2]*fm[i][2]);
tx = sp[i][1]*fm[i][2]-sp[i][2]*fm[i][1];
ty = sp[i][2]*fm[i][0]-sp[i][0]*fm[i][2];
tz = sp[i][0]*fm[i][1]-sp[i][1]*fm[i][0];

View File

@ -32,17 +32,17 @@ class FixLangevinSpin : public Fix {
void init();
void setup(int);
void post_force_respa(int, int, int);
void add_tdamping(double spi[3], double fmi[3]); // add transverse damping
void add_temperature(double fmi[3]); // add temperature
int tdamp_flag, ldamp_flag, temp_flag; // damping and temperature flags
void add_tdamping(double spi[3], double fmi[3]); // add transverse damping
void add_temperature(double fmi[3]); // add temperature
int tdamp_flag, ldamp_flag, temp_flag; // damping and temperature flags
protected:
double *spi, *fmi;
double alpha_t; // transverse mag. damping
double dts; // magnetic timestep
double temp; // spin bath temperature
double D,sigma; // bath intensity var.
double gil_factor; // gilbert's prefactor
double alpha_t; // transverse mag. damping
double dts; // magnetic timestep
double temp; // spin bath temperature
double D,sigma; // bath intensity var.
double gil_factor; // gilbert's prefactor
char *id_temp;
class Compute *temperature;

View File

@ -240,7 +240,6 @@ void FixPrecessionSpin::post_force(int /* vflag */)
}
int *mask = atom->mask;
double *emag = atom->emag;
double **fm = atom->fm;
double **sp = atom->sp;
const int nlocal = atom->nlocal;
@ -272,7 +271,6 @@ void FixPrecessionSpin::post_force(int /* vflag */)
}
eprec += epreci;
emag[i] += epreci;
fm[i][0] += fmi[0];
fm[i][1] += fmi[1];
fm[i][2] += fmi[2];

View File

@ -351,6 +351,8 @@ void PairSpinExchange::compute_exchange(int i, int j, double rsq, double fmi[3],
Jex *= (1.0-J2[itype][jtype]*ra);
Jex *= exp(-ra);
printf("Exchange : %g %g \n",Jex,Jex*hbar);
fmi[0] += 2.0*Jex*spj[0];
fmi[1] += 2.0*Jex*spj[1];
fmi[2] += 2.0*Jex*spj[2];