git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7184 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "atom_vec_tri.h"
|
||||
#include "math_extra.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "modify.h"
|
||||
#include "force.h"
|
||||
@ -84,6 +85,8 @@ void AtomVecTri::grow(int n)
|
||||
if (n == 0) nmax += DELTA;
|
||||
else nmax = n;
|
||||
atom->nmax = nmax;
|
||||
if (nmax < 0 || nmax > MAXSMALLINT)
|
||||
error->one(FLERR,"Per-processor system is too big");
|
||||
|
||||
tag = memory->grow(atom->tag,nmax,"atom:tag");
|
||||
type = memory->grow(atom->type,nmax,"atom:type");
|
||||
@ -91,12 +94,12 @@ void AtomVecTri::grow(int n)
|
||||
image = memory->grow(atom->image,nmax,"atom:image");
|
||||
x = memory->grow(atom->x,nmax,3,"atom:x");
|
||||
v = memory->grow(atom->v,nmax,3,"atom:v");
|
||||
f = memory->grow(atom->f,nmax,3,"atom:f");
|
||||
f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f");
|
||||
|
||||
molecule = memory->grow(atom->molecule,nmax,"atom:molecule");
|
||||
rmass = memory->grow(atom->rmass,nmax,"atom:rmass");
|
||||
angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom");
|
||||
torque = memory->grow(atom->torque,nmax,3,"atom:torque");
|
||||
torque = memory->grow(atom->torque,nmax*comm->nthreads,3,"atom:torque");
|
||||
tri = memory->grow(atom->tri,nmax,"atom:tri");
|
||||
|
||||
if (atom->nextra_grow)
|
||||
@ -1547,12 +1550,12 @@ bigint AtomVecTri::memory_usage()
|
||||
if (atom->memcheck("image")) bytes += memory->usage(image,nmax);
|
||||
if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3);
|
||||
if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3);
|
||||
if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3);
|
||||
if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3);
|
||||
|
||||
if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax);
|
||||
if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax);
|
||||
if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3);
|
||||
if (atom->memcheck("torque")) bytes += memory->usage(torque,nmax,3);
|
||||
if (atom->memcheck("torque")) bytes += memory->usage(torque,nmax*comm->nthreads,3);
|
||||
if (atom->memcheck("tri")) bytes += memory->usage(tri,nmax);
|
||||
|
||||
bytes += nmax_bonus*sizeof(Bonus);
|
||||
|
||||
Reference in New Issue
Block a user