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

This commit is contained in:
sjplimp
2011-10-24 20:28:02 +00:00
parent 11806a92a1
commit c6bbdcfbf2
71 changed files with 279 additions and 190 deletions

View File

@ -14,6 +14,7 @@
#include "string.h"
#include "bond.h"
#include "atom.h"
#include "comm.h"
#include "force.h"
#include "memory.h"
#include "error.h"
@ -80,12 +81,12 @@ void Bond::ev_setup(int eflag, int vflag)
if (eflag_atom && atom->nmax > maxeatom) {
maxeatom = atom->nmax;
memory->destroy(eatom);
memory->create(eatom,maxeatom,"bond:eatom");
memory->create(eatom,comm->nthreads*maxeatom,"bond:eatom");
}
if (vflag_atom && atom->nmax > maxvatom) {
maxvatom = atom->nmax;
memory->destroy(vatom);
memory->create(vatom,maxvatom,6,"bond:vatom");
memory->create(vatom,comm->nthreads*maxvatom,6,"bond:vatom");
}
// zero accumulators
@ -198,7 +199,7 @@ void Bond::ev_tally(int i, int j, int nlocal, int newton_bond,
double Bond::memory_usage()
{
double bytes = maxeatom * sizeof(double);
bytes += maxvatom*6 * sizeof(double);
double bytes = comm->nthreads*maxeatom * sizeof(double);
bytes += comm->nthreads*maxvatom*6 * sizeof(double);
return bytes;
}