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

This commit is contained in:
sjplimp
2011-03-23 14:02:40 +00:00
parent 72289a2606
commit 6023ea7ff6
2 changed files with 15 additions and 16 deletions

View File

@ -793,23 +793,23 @@ int AtomVecElectron::data_vel_hybrid(int m, char **values)
return # of bytes of allocated memory
------------------------------------------------------------------------- */
double AtomVecElectron::memory_usage()
bigint AtomVecElectron::memory_usage()
{
double bytes = 0.0;
bigint bytes = 0;
if (atom->memcheck("tag")) bytes += nmax * sizeof(int);
if (atom->memcheck("type")) bytes += nmax * sizeof(int);
if (atom->memcheck("mask")) bytes += nmax * sizeof(int);
if (atom->memcheck("image")) bytes += nmax * sizeof(int);
if (atom->memcheck("x")) bytes += nmax*3 * sizeof(double);
if (atom->memcheck("v")) bytes += nmax*3 * sizeof(double);
if (atom->memcheck("f")) bytes += nmax*3 * sizeof(double);
if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax);
if (atom->memcheck("type")) bytes += memory->usage(type,nmax);
if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax);
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("q")) bytes += nmax * sizeof(double);
if (atom->memcheck("spin")) bytes += nmax * sizeof(int);
if (atom->memcheck("eradius")) bytes += nmax * sizeof(double);
if (atom->memcheck("ervel")) bytes += nmax * sizeof(double);
if (atom->memcheck("erforce")) bytes += nmax * sizeof(double);
if (atom->memcheck("q")) bytes += memory->usage(q,nmax);
if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax);
if (atom->memcheck("eradius")) bytes += memory->usage(eradius,nmax);
if (atom->memcheck("ervel")) bytes += memory->usage(ervel,nmax);
if (atom->memcheck("erforce")) bytes += memory->usage(erforce,nmax);
return bytes;
}

View File

@ -57,7 +57,7 @@ class AtomVecElectron : public AtomVec {
int data_atom_hybrid(int, char **);
void data_vel(int, char **);
int data_vel_hybrid(int, char **);
double memory_usage();
bigint memory_usage();
private:
double PI;
@ -71,4 +71,3 @@ class AtomVecElectron : public AtomVec {
#endif
#endif