JT190922, C1:

- correction of a memory issue in compute_spin.cpp
- correction of the Langevin calculation in fix_langevin_spin.cpp
This commit is contained in:
Julien Tranchida
2022-09-19 09:02:00 +02:00
parent e745c8aac4
commit 293a70b719
2 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ ComputeSpin::~ComputeSpin()
{
memory->destroy(vector);
delete [] spin_pairs;
delete [] lockprecessionspin;
}
/* ---------------------------------------------------------------------- */

View File

@ -109,7 +109,8 @@ void FixLangevinSpin::init()
double hbar = force->hplanck/MY_2PI; // eV/(rad.THz)
double kb = force->boltz; // eV/K
D = (alpha_t*gil_factor*kb*temp);
//D = (alpha_t*gil_factor*kb*temp);
D = (alpha_t*(1.0+(alpha_t)*(alpha_t))*kb*temp);
D /= (hbar*dts);
sigma = sqrt(2.0*D);
}