Commit 5f2392a7 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1355 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent c40e1268
Loading
Loading
Loading
Loading
+20 −6
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ PairAIREBO::~PairAIREBO()
  memory->sfree(REBO_firstneigh);
  for (int i = 0; i < maxpage; i++) memory->sfree(pages[i]);
  memory->sfree(pages);
  delete [] nC;
  delete [] nH;
  memory->sfree(nC);
  memory->sfree(nH);

  if (allocated) {
    memory->destroy_2d_int_array(setflag);
@@ -309,14 +309,14 @@ void PairAIREBO::REBO_neigh()
    maxlocal = atom->nmax;
    memory->sfree(REBO_numneigh);
    memory->sfree(REBO_firstneigh);
    delete [] nC;
    delete [] nH;
    memory->sfree(nC);
    memory->sfree(nH);
    REBO_numneigh = (int *)
      memory->smalloc(maxlocal*sizeof(int),"AIREBO:numneigh");
    REBO_firstneigh = (int **)
      memory->smalloc(maxlocal*sizeof(int *),"AIREBO:firstneigh");
    nC = new double[maxlocal];
    nH = new double[maxlocal];
    nC = (double *) memory->smalloc(maxlocal*sizeof(double),"AIREBO:nC");
    nH = (double *) memory->smalloc(maxlocal*sizeof(double),"AIREBO:nH");
  }
  
  inum = list->inum;
@@ -4021,3 +4021,17 @@ void PairAIREBO::spline_init()
  Tf[2][2][1] = -0.035140;
  for (i = 2; i < 10; i++) Tf[2][2][i] = -0.0040480;
}

/* ----------------------------------------------------------------------
   memory usage of local atom-based arrays 
------------------------------------------------------------------------- */

double PairAIREBO::memory_usage()
{
  double bytes = 0.0;
  bytes += maxlocal * sizeof(int);
  bytes += maxlocal * sizeof(int *);
  bytes += maxpage * neighbor->pgsize * sizeof(int);
  bytes += 2 * maxlocal * sizeof(double);
  return bytes;
}
+2 −5
Original line number Diff line number Diff line
@@ -27,10 +27,7 @@ class PairAIREBO : public Pair {
  void coeff(int, char **);
  void init_style();
  double init_one(int, int);
  void write_restart(FILE *) {}
  void read_restart(FILE *) {}
  void write_restart_settings(FILE *) {}
  void read_restart_settings(FILE *) {}
  double memory_usage();

 private:
  int me;
@@ -52,7 +49,7 @@ class PairAIREBO : public Pair {

  int *REBO_numneigh;              // # of pair neighbors for each atom
  int **REBO_firstneigh;           // ptr to 1st neighbor of each atom
  double *nC,*nH;                  // sum of weighing fns with REBO neighs
  double *nC,*nH;                  // sum of weighting fns with REBO neighs

  double smin,Nmin,Nmax,NCmin,NCmax,thmin,thmax;
  double rcmin[2][2],rcmax[2][2],rcmaxsq[2][2],rcmaxp[2][2];
+2 −2
Original line number Diff line number Diff line
@@ -904,10 +904,10 @@ void PairMEAM::unpack_reverse_comm(int n, int *list, double *buf)

double PairMEAM::memory_usage()
{
  double bytes = 7 * nmax * sizeof(double);
  double bytes = 11 * nmax * sizeof(double);
  bytes += (3 + 6 + 10 + 3 + 3) * nmax * sizeof(double);
  bytes += 3*3 * nmax * sizeof(double);
  bytes += 2 * maxneigh * sizeof(double);
  bytes += 3 * maxneigh * sizeof(double);
  return bytes;
}