diff --git a/sPuReMD/src/grid.c b/sPuReMD/src/grid.c index 1b61ccfa76dab6fd8526d99fda78134c46a814b7..9ac8eed8e36f43a493b99e9f2cae91166e30a875 100644 --- a/sPuReMD/src/grid.c +++ b/sPuReMD/src/grid.c @@ -71,7 +71,7 @@ static void Allocate_Space_for_Grid( reax_system *system ) int i, j, k, l; grid *g; - g = &(system->g); + g = &system->g; g->max_nbrs = (2 * g->spread[0] + 1) * (2 * g->spread[1] + 1) * (2 * g->spread[2] + 1) + 3; @@ -491,9 +491,12 @@ void Bin_Atoms( reax_system* system, static_storage *workspace ) { int i, j, k, l; int max_atoms; - grid *g = &( system->g ); + grid *g; + + g = &system->g; Reset_Grid( g ); + for ( l = 0; l < system->N; l++ ) { i = (int)(system->atoms[l].x[0] * g->inv_len[0]); diff --git a/sPuReMD/src/integrate.c b/sPuReMD/src/integrate.c index 62d4fc642143685d3fe4d92b753b5cd3bd74ae7a..fa47995ebdf545d18eae1f41065df578b07efaaf 100644 --- a/sPuReMD/src/integrate.c +++ b/sPuReMD/src/integrate.c @@ -58,8 +58,8 @@ void Velocity_Verlet_NVE(reax_system *system, control_params *control, rvec_ScaledSum( dx, dt, system->atoms[i].v, 0.5 * dt_sqr * -F_CONV * inv_m, system->atoms[i].f ); -// Inc_on_T3( system->atoms[i].x, dx, &system->box ); - rvec_Add( system->atoms[i].x, dx ); + Inc_on_T3( system->atoms[i].x, dx, &system->box ); +// rvec_Add( system->atoms[i].x, dx ); rvec_ScaledAdd( system->atoms[i].v, 0.5 * dt * -F_CONV * inv_m, system->atoms[i].f ); }