git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@622 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -162,7 +162,8 @@ FixNPT::FixNPT(LAMMPS *lmp, int narg, char **arg) :
|
||||
char **newarg = new char*[3];
|
||||
newarg[0] = id_temp;
|
||||
newarg[1] = "all";
|
||||
newarg[2] = "temp";
|
||||
if (strcmp(style,"npt") == 0) newarg[2] = "temp";
|
||||
else if (strcmp(style,"npt/asphere") == 0) newarg[2] = "temp/asphere";
|
||||
modify->add_compute(3,newarg);
|
||||
delete [] newarg;
|
||||
tflag = 1;
|
||||
@ -251,6 +252,7 @@ void FixNPT::init()
|
||||
// set timesteps and frequencies
|
||||
|
||||
dtv = update->dt;
|
||||
dtq = 0.5 * update->dt;
|
||||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
dthalf = 0.5 * update->dt;
|
||||
|
||||
@ -262,10 +264,6 @@ void FixNPT::init()
|
||||
nktv2p = force->nktv2p;
|
||||
vol0 = domain->xprd * domain->yprd * domain->zprd;
|
||||
|
||||
double mass = 0.0;
|
||||
for (int i = 0; i < atom->nlocal; i++) mass += atom->mass[atom->type[i]];
|
||||
MPI_Allreduce(&mass,&total_mass,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
|
||||
if (force->kspace) kspace_flag = 1;
|
||||
else kspace_flag = 0;
|
||||
|
||||
@ -274,7 +272,7 @@ void FixNPT::init()
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
}
|
||||
|
||||
// detect if any fix rigid exist so rigid bodies move when box is dilated
|
||||
// detect if any rigid fixes exist so rigid bodies move when box is dilated
|
||||
// rfix[] = indices to each fix rigid
|
||||
|
||||
delete [] rfix;
|
||||
@ -282,14 +280,12 @@ void FixNPT::init()
|
||||
rfix = NULL;
|
||||
|
||||
for (int i = 0; i < modify->nfix; i++)
|
||||
if (strcmp(modify->fix[i]->style,"rigid") == 0 ||
|
||||
strcmp(modify->fix[i]->style,"poems") == 0) nrigid++;
|
||||
if (modify->fix[i]->rigid_flag) nrigid++;
|
||||
if (nrigid) {
|
||||
rfix = new int[nrigid];
|
||||
nrigid = 0;
|
||||
for (int i = 0; i < modify->nfix; i++)
|
||||
if (strcmp(modify->fix[i]->style,"rigid") == 0 ||
|
||||
strcmp(modify->fix[i]->style,"poems") == 0) rfix[nrigid++] = i;
|
||||
if (modify->fix[i]->rigid_flag) rfix[nrigid++] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user