Commit bd37304a authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13332 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 8d078d06
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ void ComputeTempAsphere::setup()
{
  dynamic = 0;
  if (dynamic_user || group->dynamic[igroup]) dynamic = 1;
  fix_dof = -1;
  dof_compute();
}

@@ -141,7 +140,7 @@ void ComputeTempAsphere::setup()

void ComputeTempAsphere::dof_compute()
{
  if (fix_dof) adjust_dof_fix();
  fix_dof = modify->adjust_dof_fix(igroup);

  // 6 dof for 3d, 3 dof for 2d
  // which dof are included also depends on mode
@@ -268,6 +267,8 @@ double ComputeTempAsphere::compute_scalar()

  MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
  if (dynamic || tempbias == 2) dof_compute();
  if (tfactor == 0.0 && scalar != 0.0) 
    error->all(FLERR,"Temperature compute degrees of freedom < 0");
  scalar *= tfactor;
  return scalar;
}
+3 −2
Original line number Diff line number Diff line
@@ -201,7 +201,6 @@ void ComputeTempCS::setup()

  // calculate DOF for temperature

  fix_dof = -1;
  dof_compute();
}

@@ -209,7 +208,7 @@ void ComputeTempCS::setup()

void ComputeTempCS::dof_compute()
{
  if (fix_dof) adjust_dof_fix();
  fix_dof = modify->adjust_dof_fix(igroup);
  int nper = domain->dimension;
  double natoms = group->count(igroup);
  dof = nper * natoms;
@@ -257,6 +256,8 @@ double ComputeTempCS::compute_scalar()

  MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
  if (dynamic) dof_compute();
  if (tfactor == 0.0 && scalar != 0.0) 
    error->all(FLERR,"Temperature compute degrees of freedom < 0");
  scalar *= tfactor;
  return scalar;
}
+37 −1
Original line number Diff line number Diff line
@@ -249,6 +249,41 @@ void FixDeposit::init()
      error->all(FLERR,"Fix deposit and fix shake not using "
                 "same molecule template ID");
  }

  // for finite size spherical particles:
  // warn if near < 2 * maxrad of existing and inserted particles
  //   since may lead to overlaps
  // if inserted molecule does not define diameters, 
  //   use AtomVecSphere::create_atom() default radius = 0.5

  if (atom->radius_flag) {
    double *radius = atom->radius;
    int nlocal = atom->nlocal;

    double maxrad = 0.0;
    for (int i = 0; i < nlocal; i++)
      maxrad = MAX(maxrad,radius[i]);

    double maxradall;
    MPI_Allreduce(&maxrad,&maxradall,1,MPI_DOUBLE,MPI_MAX,world);

    double maxradinsert = 0.0;
    if (mode == MOLECULE) {
      for (int i = 0; i < nmol; i++) {
        if (onemols[i]->radiusflag)
          maxradinsert = MAX(maxradinsert,onemols[i]->maxradius);
        else maxradinsert = MAX(maxradinsert,0.5);
      }
    } else maxradinsert = 0.5;

    double separation = MAX(2.0*maxradinsert,maxradall+maxradinsert);
    if (sqrt(nearsq) < separation && comm->me == 0) {
      char str[128];
      sprintf(str,"Fix deposit near setting < possible overlap separation %g",
              separation);
      error->warning(FLERR,str);
    }
  }
}

/* ----------------------------------------------------------------------
@@ -389,7 +424,8 @@ void FixDeposit::pre_exchange()
      }
    }

    // if distance to any inserted atom is less than near, try again
    // check distance between any existing atom and any inserted atom
    // if less than near, try again
    // use minimum_image() to account for PBC

    double **x = atom->x;
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) :
  time_integrate = 1;
  rigid_flag = 1;
  virial_flag = 1;
  dof_flag = 1;

  MPI_Comm_rank(world,&me);

+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
  rigid_flag = 1;
  virial_flag = 1;
  create_attribute = 1;
  dof_flag = 1;

  MPI_Comm_rank(world,&me);
  MPI_Comm_size(world,&nprocs);
Loading