git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1725 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -54,18 +54,14 @@ FixNVTSphere::~FixNVTSphere()
|
||||
void FixNVTSphere::init()
|
||||
{
|
||||
FixNVT::init();
|
||||
dtfrotate = dtf / INERTIA;
|
||||
|
||||
if (!atom->shape)
|
||||
error->all("Fix nvt/sphere requires atom attribute shape");
|
||||
|
||||
double *mass = atom->mass;
|
||||
double **shape = atom->shape;
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
if (shape[i][0] != shape[i][1] || shape[i][0] != shape[i][2])
|
||||
error->all("Fix nvt/sphere requires spherical particle shapes");
|
||||
dttype[i] = dtfrotate / (0.25*shape[i][0]*shape[i][0]*mass[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -101,6 +97,14 @@ void FixNVTSphere::initial_integrate(int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
||||
|
||||
// recompute timesteps since dt may have changed or come via rRESPA
|
||||
|
||||
double dtfrotate = dtf / INERTIA;
|
||||
int ntypes = atom->ntypes;
|
||||
double **shape = atom->shape;
|
||||
for (int i = 1; i <= ntypes; i++)
|
||||
dttype[i] = dtfrotate / (0.25*shape[i][0]*shape[i][0]*mass[i]);
|
||||
|
||||
if (which == NOBIAS) {
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
@ -164,6 +168,14 @@ void FixNVTSphere::final_integrate()
|
||||
int nlocal = atom->nlocal;
|
||||
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
|
||||
|
||||
// recompute timesteps since dt may have changed or come via rRESPA
|
||||
|
||||
double dtfrotate = dtf / INERTIA;
|
||||
int ntypes = atom->ntypes;
|
||||
double **shape = atom->shape;
|
||||
for (int i = 1; i <= ntypes; i++)
|
||||
dttype[i] = dtfrotate / (0.25*shape[i][0]*shape[i][0]*mass[i]);
|
||||
|
||||
if (which == NOBIAS) {
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
@ -211,11 +223,3 @@ void FixNVTSphere::final_integrate()
|
||||
eta_dot += f_eta*dthalf;
|
||||
eta_dot *= drag_factor;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixNVTSphere::reset_dt()
|
||||
{
|
||||
FixNVT::reset_dt();
|
||||
dtfrotate = dtf / INERTIA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user