now understand how respa works in lammps

(cherry picked from commit c829027e83)
This commit is contained in:
Steven Strong 2016-09-23 18:12:47 -06:00 committed by Axel Kohlmeyer
parent 23781d6ec9
commit 3ce178d43f
1 changed files with 3 additions and 4 deletions

View File

@ -144,13 +144,13 @@ void FixFlowGauss::setup(int vflag)
if (mTot <= 0.0) if (mTot <= 0.0)
error->all(FLERR,"Invalid group mass in fix flow/gauss"); error->all(FLERR,"Invalid group mass in fix flow/gauss");
if (strstr(update->integrate_style,"verlet")) if (strstr(update->integrate_style,"respa")) {
post_force(vflag);
else {
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
post_force_respa(vflag,ilevel_respa,0); post_force_respa(vflag,ilevel_respa,0);
((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa);
} }
else
post_force(vflag);
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
@ -171,7 +171,6 @@ void FixFlowGauss::post_force(int vflag)
int ii,jj; int ii,jj;
//find the total force on all atoms //find the total force on all atoms
//initialize to zero //initialize to zero
double f_thisProc[3]; double f_thisProc[3];
for (ii=0; ii<3; ii++) for (ii=0; ii<3; ii++)