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

This commit is contained in:
sjplimp 2015-04-16 14:32:49 +00:00
parent 08ce833afd
commit 74350d06da
2 changed files with 11 additions and 1 deletions

View File

@ -741,7 +741,7 @@ void FixRigidNHSmall::final_integrate()
// include Langevin thermostat forces
// fflag,tflag = 0 for some dimensions in 2d
for (ibody = 0; ibody < nbody; ibody++) {
for (ibody = 0; ibody < nlocal_body; ibody++) {
Body *b = &body[ibody];
// update vcm by 1/2 step

View File

@ -1459,6 +1459,16 @@ void FixRigidSmall::create_bodies()
frsptr = this;
comm->ring(m,sizeof(double),buf,1,ring_bbox,NULL);
// check if any bbox is size 0.0, meaning rigid body is a single particle
flag = 0;
for (i = 0; i < n; i++)
if (bbox[i][0] == bbox[i][1] && bbox[i][2] == bbox[i][3] &&
bbox[i][4] == bbox[i][5]) flag = 1;
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
if (flagall)
error->all(FLERR,"One or more rigid bodies are a single particle");
// ctr = center pt of each rigid body my atoms are part of
memory->create(ctr,n,6,"rigid/small:bbox");