git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10864 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -127,17 +127,7 @@ void ComputeMSD::init()
|
|||||||
|
|
||||||
// nmsd = # of atoms in group
|
// nmsd = # of atoms in group
|
||||||
|
|
||||||
int *mask = atom->mask;
|
nmsd = group->count(igroup);
|
||||||
int nlocal = atom->nlocal;
|
|
||||||
|
|
||||||
nmsd = 0;
|
|
||||||
for (int i = 0; i < nlocal; i++)
|
|
||||||
if (mask[i] & groupbit) nmsd++;
|
|
||||||
|
|
||||||
int nmsd_all;
|
|
||||||
MPI_Allreduce(&nmsd,&nmsd_all,1,MPI_INT,MPI_SUM,world);
|
|
||||||
nmsd = nmsd_all;
|
|
||||||
|
|
||||||
masstotal = group->mass(igroup);
|
masstotal = group->mass(igroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,8 @@ class ComputeMSD : public Compute {
|
|||||||
virtual void compute_vector();
|
virtual void compute_vector();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int comflag,nmsd;
|
int comflag;
|
||||||
|
bigint nmsd;
|
||||||
double masstotal;
|
double masstotal;
|
||||||
char *id_fix;
|
char *id_fix;
|
||||||
class FixStore *fix;
|
class FixStore *fix;
|
||||||
|
|||||||
@ -301,7 +301,7 @@ ComputeReduce::~ComputeReduce()
|
|||||||
|
|
||||||
void ComputeReduce::init()
|
void ComputeReduce::init()
|
||||||
{
|
{
|
||||||
// set indices and check validity of all computes,fixes,variables
|
// set indices of all computes,fixes,variables
|
||||||
|
|
||||||
for (int m = 0; m < nvalues; m++) {
|
for (int m = 0; m < nvalues; m++) {
|
||||||
if (which[m] == COMPUTE) {
|
if (which[m] == COMPUTE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user