enable more correct natoms computation when atoms are lost
This commit is contained in:
@ -754,6 +754,18 @@ void Group::read_restart(FILE *fp)
|
||||
// computations on a group of atoms
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
count atoms in group all
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
bigint Group::count_all()
|
||||
{
|
||||
bigint nme = atom->nlocal;
|
||||
bigint nall;
|
||||
MPI_Allreduce(&nme,&nall,1,MPI_LMP_BIGINT,MPI_SUM,world);
|
||||
return nall;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
count atoms in group
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user