~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/compute_msd.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2013-11-20 22:41:36 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131120224136-tzx7leh606fqnckm
Tags: 0~20131119.git7162cf0-1
* [e65b919] Imported Upstream version 0~20131119.git7162cf0
* [f7bddd4] Fix some problems, introduced by upstream recently.
* [3616dfc] Use wrap-and-sort script.
* [7e92030] Ignore quilt dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "group.h"
19
19
#include "domain.h"
20
20
#include "modify.h"
21
 
#include "fix.h"
22
21
#include "fix_store.h"
23
22
#include "error.h"
24
23
 
128
127
 
129
128
  // nmsd = # of atoms in group
130
129
 
131
 
  int *mask = atom->mask;
132
 
  int nlocal = atom->nlocal;
133
 
 
134
 
  nmsd = 0;
135
 
  for (int i = 0; i < nlocal; i++)
136
 
    if (mask[i] & groupbit) nmsd++;
137
 
 
138
 
  int nmsd_all;
139
 
  MPI_Allreduce(&nmsd,&nmsd_all,1,MPI_INT,MPI_SUM,world);
140
 
  nmsd = nmsd_all;
141
 
 
 
130
  nmsd = group->count(igroup);
142
131
  masstotal = group->mass(igroup);
143
132
}
144
133