Commit 102be8dd authored by julient31's avatar julient31
Browse files

Commit JT 052318

parent 1641f78e
Loading
Loading
Loading
Loading
+1 −0
Changes for src/SPIN/compute_spin.cpp: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ void ComputeSpin::compute_vector()
  magtot[2] *= scale;
  magtot[3] = sqrt((magtot[0]*magtot[0])+(magtot[1]*magtot[1])+(magtot[2]*magtot[2]));
  spintemperature = hbar*tempnumtot;    
  //spintemperature /= (2.0*kb*tempdenomtot);
  spintemperature /= (kb*tempdenomtot);
 
  vector[0] = magtot[0];
+10 −3
Changes for src/SPIN/fix_langevin_spin.cpp: 10 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -134,8 +134,10 @@ void FixLangevinSpin::init()
  double hbar = force->hplanck/MY_2PI;	// eV/(rad.THz)
  double kb = force->boltz;		// eV/K
  D = (MY_2PI*alpha_t*gil_factor*kb*temp);
  //D = (alpha_t*gil_factor*kb*temp);
  D /= (hbar*dts);
  sigma = sqrt(2.0*D);
  //sigma = sqrt(D);
}

/* ---------------------------------------------------------------------- */
@@ -171,9 +173,14 @@ void FixLangevinSpin::add_tdamping(double spi[3], double fmi[3])
void FixLangevinSpin::add_temperature(double fmi[3]) 
{

  double rx = sigma*(-1.0+2.0*random->uniform());
  double ry = sigma*(-1.0+2.0*random->uniform());
  double rz = sigma*(-1.0+2.0*random->uniform());
  double rx = sigma*(2.0*random->uniform() - 1.0);
  double ry = sigma*(2.0*random->uniform() - 1.0);
  double rz = sigma*(2.0*random->uniform() - 1.0);
  //printf("test rd : %g \n",2.0*random->uniform() - 1.0);
  //printf("test gaussian : %g \n", random->gaussian());
  //double rx = sigma*(random->gaussian());
  //double ry = sigma*(random->gaussian());
  //double rz = sigma*(random->gaussian());

  // adding the random field 

+1 −0
Changes for src/SPIN/fix_nve_spin.cpp: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ void FixNVESpin::init()
  dtv = update->dt;
  dtf = 0.5 * update->dt * force->ftm2v;
  dts = 0.25 * update->dt;
  npairs = npairspin = 0;

  // set ptrs on Pair/Spin styles

+2 −0
Changes for src/SPIN/pair_spin_exchange.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -173,6 +173,8 @@ void PairSpinExchange::init_style()
    }
  }

  printf("test lattice flag: %d \n",lattice_flag);

}

/* ----------------------------------------------------------------------
+1 −1
Changes for src/SPIN/pair_spin_neel.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ void PairSpinNeel::compute(int eflag, int vflag)

      local_cut2 = cut_spin_neel[itype][jtype]*cut_spin_neel[itype][jtype];

      // compute magnetic and mechanical components of soc_neel
      // compute magnetic and mechanical components of neel

      if (rsq <= local_cut2) {
	compute_neel(i,j,rsq,eij,fmi,spi,spj);