Commit 140cdf94 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5504 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent beabb5e0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

#include "stdlib.h"
#include "atom_vec_ellipsoid.h"
#include "lmptype.h"
#include "math_extra.h"
#include "atom.h"
#include "force.h"
@@ -62,6 +63,8 @@ void AtomVecEllipsoid::grow(int n)
  if (n == 0) nmax += DELTA;
  else nmax = n;
  atom->nmax = nmax;
  if (nmax < 0 || nmax > MAXSMALLINT)
    error->one("Per-processor system is too big");

  tag = atom->tag = (int *)
    memory->srealloc(atom->tag,nmax*sizeof(int),"atom:tag");
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include "stdlib.h"
#include "atom_vec_colloid.h"
#include "lmptype.h"
#include "atom.h"
#include "force.h"
#include "domain.h"
@@ -58,6 +59,8 @@ void AtomVecColloid::grow(int n)
  if (n == 0) nmax += DELTA;
  else nmax = n;
  atom->nmax = nmax;
  if (nmax < 0 || nmax > MAXSMALLINT)
    error->one("Per-processor system is too big");

  tag = atom->tag = (int *)
    memory->srealloc(atom->tag,nmax*sizeof(int),"atom:tag");
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@

#include "stdlib.h"
#include "atom_vec_dipole.h"
#include "lmptype.h"
#include "atom.h"
#include "domain.h"
#include "modify.h"
@@ -57,6 +58,8 @@ void AtomVecDipole::grow(int n)
  if (n == 0) nmax += DELTA;
  else nmax = n;
  atom->nmax = nmax;
  if (nmax < 0 || nmax > MAXSMALLINT)
    error->one("Per-processor system is too big");

  tag = atom->tag = (int *) 
    memory->srealloc(atom->tag,nmax*sizeof(int),"atom:tag");
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include "stdlib.h"
#include "string.h"
#include "atom_vec_granular.h"
#include "lmptype.h"
#include "atom.h"
#include "domain.h"
#include "modify.h"
@@ -80,6 +81,8 @@ void AtomVecGranular::grow(int n)
  if (n == 0) nmax += DELTA;
  else nmax = n;
  atom->nmax = nmax;
  if (nmax < 0 || nmax > MAXSMALLINT)
    error->one("Per-processor system is too big");

  tag = atom->tag = (int *)
    memory->srealloc(atom->tag,nmax*sizeof(int),"atom:tag");
+9 −7
Original line number Diff line number Diff line
@@ -484,20 +484,22 @@ void FixPour::pre_exchange()
    }
  }

  // set tag # of new particles beyond all previous atoms
  // reset global natoms
  // set tag # of new particles beyond all previous atoms
  // if global map exists, reset it now instead of waiting for comm
  // since deleting atoms messes up ghosts

  if (nnear - nprevious > 0) {
    atom->natoms += nnear - nprevious;
    if (atom->tag_enable) {
      atom->tag_extend();
    atom->natoms += nnear - nprevious;
      if (atom->map_style) {
	atom->nghost = 0;
	atom->map_init();
	atom->map_set();
      }
    }
  }

  // free local memory

Loading