forked from lijiext/lammps
Merge pull request #1561 from akohlmey/fix-user-intel-nve-bug
Fix bug in fix nve/intel
This commit is contained in:
commit
6742f371ad
|
@ -335,7 +335,7 @@ void FixNHIntel::reset_dt()
|
|||
if (nlocal > _nlocal_max) {
|
||||
if (_nlocal_max) memory->destroy(_dtfm);
|
||||
_nlocal_max = static_cast<int>(1.20 * nlocal);
|
||||
memory->create(_dtfm, _nlocal_max * 3, "fix_nve_intel:dtfm");
|
||||
memory->create(_dtfm, _nlocal_max * 3, "fix_nh_intel:dtfm");
|
||||
}
|
||||
|
||||
_nlocal3 = nlocal * 3;
|
||||
|
|
|
@ -75,6 +75,7 @@ void FixNVEIntel::initial_integrate(int /*vflag*/)
|
|||
x[i] += dtv * v[i];
|
||||
}
|
||||
} else if (igroup == 0) {
|
||||
if (neighbor->ago == 0) reset_dt();
|
||||
#if defined(LMP_SIMD_COMPILER)
|
||||
#pragma vector aligned
|
||||
#pragma simd
|
||||
|
@ -84,6 +85,7 @@ void FixNVEIntel::initial_integrate(int /*vflag*/)
|
|||
x[i] += dtv * v[i];
|
||||
}
|
||||
} else {
|
||||
if (neighbor->ago == 0) reset_dt();
|
||||
#if defined(LMP_SIMD_COMPILER)
|
||||
#pragma vector aligned
|
||||
#pragma simd
|
||||
|
@ -114,6 +116,15 @@ void FixNVEIntel::final_integrate()
|
|||
#endif
|
||||
for (int i = 0; i < _nlocal3; i++)
|
||||
v[i] += dtfm * f[i];
|
||||
} else if (igroup == 0) {
|
||||
if (neighbor->ago == 0) reset_dt();
|
||||
#if defined(LMP_SIMD_COMPILER)
|
||||
#pragma vector aligned
|
||||
#pragma simd
|
||||
#endif
|
||||
for (int i = 0; i < _nlocal3; i++) {
|
||||
v[i] += _dtfm[i] * f[i];
|
||||
}
|
||||
} else {
|
||||
if (neighbor->ago == 0) reset_dt();
|
||||
#if defined(LMP_SIMD_COMPILER)
|
||||
|
|
Loading…
Reference in New Issue