git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12068 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-06-04 16:06:53 +00:00
parent 63aad352fa
commit 88a3f9d326
2 changed files with 21 additions and 0 deletions

View File

@ -54,6 +54,7 @@ int FixMeso::setmask() {
int mask = 0;
mask |= INITIAL_INTEGRATE;
mask |= FINAL_INTEGRATE;
mask |= PRE_FORCE;
return mask;
}
@ -64,6 +65,25 @@ void FixMeso::init() {
dtf = 0.5 * update->dt * force->ftm2v;
}
void FixMeso::setup_pre_force(int vflag)
{
// set vest equal to v
double **v = atom->v;
double **vest = atom->vest;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if (igroup == atom->firstgroup)
nlocal = atom->nfirst;
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) {
vest[i][0] = v[i][0];
vest[i][1] = v[i][1];
vest[i][2] = v[i][2];
}
}
}
/* ----------------------------------------------------------------------
allow for both per-type and per-atom mass
------------------------------------------------------------------------- */

View File

@ -29,6 +29,7 @@ class FixMeso : public Fix {
FixMeso(class LAMMPS *, int, char **);
int setmask();
virtual void init();
virtual void setup_pre_force(int);
virtual void initial_integrate(int);
virtual void final_integrate();
void reset_dt();