bug fixes to added rendezvous algorithms

This commit is contained in:
Steve Plimpton 2019-03-26 10:09:16 -06:00
parent fff28a8666
commit efad31f474
2 changed files with 11 additions and 10 deletions

View File

@ -595,15 +595,6 @@ void FixRigidSmall::init()
}
}
// error if maxextent > comm->cutghost
// NOTE: could just warn if an override flag set
// NOTE: this could fail for comm multi mode if user sets a wrong cutoff
// for atom types in rigid bodies - need a more careful test
double cutghost = MAX(neighbor->cutneighmax,comm->cutghostuser);
if (maxextent > cutghost)
error->all(FLERR,"Rigid body extent > ghost cutoff - use comm_modify cutoff");
// error if npt,nph fix comes before rigid fix
for (i = 0; i < modify->nfix; i++) {
@ -662,6 +653,16 @@ void FixRigidSmall::setup(int vflag)
{
int i,n,ibody;
// error if maxextent > comm->cutghost
// NOTE: could just warn if an override flag set
// NOTE: this could fail for comm multi mode if user sets a wrong cutoff
// for atom types in rigid bodies - need a more careful test
// must check here, not in init, b/c neigh/comm values set after fix init
double cutghost = MAX(neighbor->cutneighmax,comm->cutghostuser);
if (maxextent > cutghost)
error->all(FLERR,"Rigid body extent > ghost cutoff - use comm_modify cutoff");
//check(1);
// sum fcm, torque across all rigid bodies

View File

@ -257,8 +257,8 @@ void Special::onetwo_build_newton()
// output datums = pairs of atoms that are 1-2 neighbors
for (i = 0; i < nlocal; i++) {
nspecial[i][0] = num_bond[i];
for (j = 0; j < num_bond[i]; j++) {
nspecial[i][0]++;
m = atom->map(bond_atom[i][j]);
if (m >= 0 && m < nlocal) nspecial[m][0]++;
}