Commit 08577f42 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2996 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 1bd17c65
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "comm.h"
#include "modify.h"
#include "fix_gravity.h"
#include "fix_shear_history.h"
#include "domain.h"
#include "region.h"
#include "region_block.h"
@@ -270,15 +269,6 @@ void FixPour::init()
	fabs(zgrav) > EPSILON)
      error->all("Gravity must point in -y to use with fix pour in 2d");
  }

  // check if a shear history fix exists

  fix_history = NULL;
  if (force->pair_match("gran/hooke/history",1) || 
      force->pair_match("gran/hertz/history",1))
    for (int i = 0; i < modify->nfix; i++)
      if (strcmp(modify->fix[i]->style,"SHEAR_HISTORY") == 0)
	fix_history = (FixShearHistory *) modify->fix[i];
}

/* ----------------------------------------------------------------------
@@ -419,12 +409,15 @@ void FixPour::pre_exchange()
  // set npartner for new atom to 0 (assume not touching any others)

  AtomVec *avec = atom->avec;
  int m,flag;
  int j,m,flag;
  double denstmp,vxtmp,vytmp,vztmp;
  double g = 1.0;
  double *sublo = domain->sublo;
  double *subhi = domain->subhi;

  int nfix = modify->nfix;
  Fix **fix = modify->fix;

  for (i = nprevious; i < nnear; i++) {
    coord[0] = xnear[i][0];
    coord[1] = xnear[i][1];
@@ -464,7 +457,8 @@ void FixPour::pre_exchange()
      atom->v[m][0] = vxtmp;
      atom->v[m][1] = vytmp;
      atom->v[m][2] = vztmp;
      if (fix_history) fix_history->npartner[m] = 0;
      for (j = 0; j < nfix; j++)
	if (fix[j]->create_attribute) fix[j]->set_arrays(m);
    }
  }

+11 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
    error->all("Fix wall/gran requires atom attributes radius, omega, torque");

  restart_peratom = 1;
  create_attribute = 1;

  // wall/particle coefficients

@@ -689,6 +690,15 @@ void FixWallGran::copy_arrays(int i, int j)
  shear[j][2] = shear[i][2];
}

/* ----------------------------------------------------------------------
   initialize one atom's array values, called when atom is created
------------------------------------------------------------------------- */

void FixWallGran::set_arrays(int i)
{
  shear[i][0] = shear[i][1] = shear[i][2] = 0.0;
}

/* ----------------------------------------------------------------------
   pack values in local atom-based arrays for exchange with another proc 
------------------------------------------------------------------------- */
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ class FixWallGran : public Fix {
  double memory_usage();
  void grow_arrays(int);
  void copy_arrays(int, int);
  void set_arrays(int);
  int pack_exchange(int, double *);
  int unpack_exchange(int, double *);
  int pack_restart(int, double *);
+1 −0
Original line number Diff line number Diff line
@@ -569,6 +569,7 @@ void AtomVecAngle::create_atom(int itype, double *coord)
  molecule[nlocal] = 0;
  num_bond[nlocal] = 0;
  num_angle[nlocal] = 0;
  nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0;

  atom->nlocal++;
}
+1 −0
Original line number Diff line number Diff line
@@ -512,6 +512,7 @@ void AtomVecBond::create_atom(int itype, double *coord)

  molecule[nlocal] = 0;
  num_bond[nlocal] = 0;
  nspecial[nlocal][0] = nspecial[nlocal][1] = nspecial[nlocal][2] = 0;

  atom->nlocal++;
}
Loading