Commit 62756105 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14477 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent d4a5571a
Loading
Loading
Loading
Loading
+4 −16
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ void PairGranHertzHistory::compute(int eflag, int vflag)
  double **torque = atom->torque;
  double *radius = atom->radius;
  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;
@@ -167,13 +166,8 @@ void PairGranHertzHistory::compute(int eflag, int vflag)
        // if I or J part of rigid body, use body mass
        // if I or J is frozen, meff is other particle

        if (rmass) {
        mi = rmass[i];
        mj = rmass[j];
        } else {
          mi = mass[type[i]];
          mj = mass[type[j]];
        }
        if (fix_rigid) {
          if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
          if (mass_rigid[j] > 0.0) mj = mass_rigid[j];
@@ -373,17 +367,11 @@ double PairGranHertzHistory::single(int i, int j, int itype, int jtype,
  // if I or J is frozen, meff is other particle

  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;

  if (rmass) {
  mi = rmass[i];
  mj = rmass[j];
  } else {
    mi = mass[type[i]];
    mj = mass[type[j]];
  }
  if (fix_rigid) {
    // NOTE: insure mass_rigid is current for owned+ghost atoms?
    if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
+4 −17
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ void PairGranHooke::compute(int eflag, int vflag)
  double **torque = atom->torque;
  double *radius = atom->radius;
  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;
@@ -148,13 +147,8 @@ void PairGranHooke::compute(int eflag, int vflag)
        // if I or J part of rigid body, use body mass
        // if I or J is frozen, meff is other particle

        if (rmass) {
        mi = rmass[i];
        mj = rmass[j];
        } else {
          mi = mass[type[i]];
          mj = mass[type[j]];
        }
        if (fix_rigid) {
          if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
          if (mass_rigid[j] > 0.0) mj = mass_rigid[j];
@@ -291,18 +285,11 @@ double PairGranHooke::single(int i, int j, int itype, int jtype, double rsq,
  // if I or J is frozen, meff is other particle

  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;

  if (rmass) {
  mi = rmass[i];
  mj = rmass[j];
  } else {
    mi = mass[type[i]];
    mj = mass[type[j]];
  }

  if (fix_rigid) {
    // NOTE: insure mass_rigid is current for owned+ghost atoms?
    if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
+14 −18
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ void PairGranHookeHistory::compute(int eflag, int vflag)
  double **torque = atom->torque;
  double *radius = atom->radius;
  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;
@@ -209,13 +208,8 @@ void PairGranHookeHistory::compute(int eflag, int vflag)
        // if I or J part of rigid body, use body mass
        // if I or J is frozen, meff is other particle

        if (rmass) {
        mi = rmass[i];
        mj = rmass[j];
        } else {
          mi = mass[type[i]];
          mj = mass[type[j]];
        }
        if (fix_rigid) {
          if (mass_rigid[i] > 0.0) mi = mass_rigid[i];
          if (mass_rigid[j] > 0.0) mj = mass_rigid[j];
@@ -399,8 +393,8 @@ void PairGranHookeHistory::init_style()

  // error and warning checks

  if (!atom->sphere_flag)
    error->all(FLERR,"Pair granular requires atom style sphere");
  if (!atom->radius_flag || !atom->rmass_flag)
    error->all(FLERR,"Pair granular requires atom atrributes radius, rmass");
  if (comm->ghost_velocity == 0)
    error->all(FLERR,"Pair granular requires ghost atoms store velocity");

@@ -497,6 +491,14 @@ void PairGranHookeHistory::init_style()
                MPI_DOUBLE,MPI_MAX,world);
  MPI_Allreduce(&onerad_frozen[1],&maxrad_frozen[1],atom->ntypes,
                MPI_DOUBLE,MPI_MAX,world);

  // set fix which stores history info

  if (history) {
    int ifix = modify->find_fix("SHEAR_HISTORY");
    if (ifix < 0) error->all(FLERR,"Could not find pair fix ID");
    fix_history = (FixShearHistory *) modify->fix[ifix];
  }
}

/* ----------------------------------------------------------------------
@@ -668,17 +670,11 @@ double PairGranHookeHistory::single(int i, int j, int itype, int jtype,
  // if I or J is frozen, meff is other particle

  double *rmass = atom->rmass;
  double *mass = atom->mass;
  int *type = atom->type;
  int *mask = atom->mask;

  if (rmass) {
  mi = rmass[i];
  mj = rmass[j];
  } else {
    mi = mass[type[i]];
    mj = mass[type[j]];
  }
  if (fix_rigid) {
    // NOTE: insure mass_rigid is current for owned+ghost atoms?
    if (mass_rigid[i] > 0.0) mi = mass_rigid[i];