Commit 25c17663 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@481 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent e9dbae35
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -60,8 +60,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)

  molecule = NULL;
  q = NULL;
  mu = omega = torque = NULL;
  phix = phiv = phia = NULL;
  mu = NULL;
  xphi = omega = torque = NULL;
  radius = density = rmass = vfrac = NULL;

  maxspecial = 1;
@@ -142,11 +142,9 @@ Atom::~Atom()

  memory->sfree(q);
  memory->destroy_2d_double_array(mu);
  memory->destroy_2d_double_array(xphi);
  memory->destroy_2d_double_array(omega);
  memory->destroy_2d_double_array(torque);
  memory->destroy_2d_double_array(phix);
  memory->destroy_2d_double_array(phiv);
  memory->destroy_2d_double_array(phia);
  memory->sfree(radius);
  memory->sfree(density);
  memory->sfree(rmass);
+1 −2
Original line number Diff line number Diff line
@@ -43,9 +43,8 @@ class Atom : protected Pointers {

  int *molecule;
  double *q,**mu;
  double **omega,**torque;
  double **xphi,**omega,**torque;
  double *radius,*density,*rmass,*vfrac;
  double **phix,**phiv,**phia;

  int maxspecial;
  int **nspecial,**special;
+14 −15
Original line number Diff line number Diff line
@@ -41,13 +41,6 @@ int FixEnforce2D::setmask()

/* ---------------------------------------------------------------------- */

void FixEnforce2D::init()
{
  granular = atom->check_style("granular");
}

/* ---------------------------------------------------------------------- */

void FixEnforce2D::setup()
{
  if (strcmp(update->integrate_style,"verlet") == 0)
@@ -74,7 +67,9 @@ void FixEnforce2D::min_setup()
void FixEnforce2D::post_force(int vflag)
{
  double **v = atom->v;
  double **omega = atom->omega;
  double **f = atom->f;
  double **torque = atom->torque;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;

@@ -84,17 +79,21 @@ void FixEnforce2D::post_force(int vflag)
      f[i][2] = 0.0;
    }

  // for granular systems, zero xy rotational componenets
  // for omega/torque systems, zero xy rotation

  if (omega) {
    for (int i = 0; i < nlocal; i++)
      if (mask[i] & groupbit) {
	omega[i][0] = 0.0;
	omega[i][1] = 0.0;
      }
  }

  if (granular) {
    double **phiv = atom->phiv;
    double **phia = atom->phia;
  if (torque) {
    for (int i = 0; i < nlocal; i++)
      if (mask[i] & groupbit) {
	phiv[i][0] = 0.0;
	phiv[i][1] = 0.0;
	phia[i][0] = 0.0;
	phia[i][1] = 0.0;
	torque[i][0] = 0.0;
	torque[i][1] = 0.0;
      }
  }
}
+0 −4
Original line number Diff line number Diff line
@@ -22,15 +22,11 @@ class FixEnforce2D : public Fix {
 public:
  FixEnforce2D(class LAMMPS *, int, char **);
  int setmask();
  void init();
  void setup();
  void min_setup();
  void post_force(int);
  void post_force_respa(int, int, int);
  void min_post_force(int);

 private:
  int granular;
};

}