Commit c79a2197 authored by sjplimp's avatar sjplimp
Browse files

sync latest bug fixes from GHub

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16043 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent c771e00a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -354,7 +354,6 @@ void DomainKokkos::pbc()
  }

  atomKK->sync(Device,X_MASK|V_MASK|MASK_MASK|IMAGE_MASK);
  atomKK->modified(Device,X_MASK|V_MASK|IMAGE_MASK);

  if (xperiodic || yperiodic || zperiodic) {
    if (deform_vremap) {
@@ -385,8 +384,9 @@ void DomainKokkos::pbc()
      Kokkos::parallel_for(nlocal,f);
    }
  }

  LMPDeviceType::fence();

  atomKK->modified(Device,X_MASK|V_MASK|IMAGE_MASK);
}

/* ----------------------------------------------------------------------
+0 −2
Original line number Diff line number Diff line
@@ -360,9 +360,7 @@ void ModifyKokkos::post_run()
  for (int i = 0; i < nfix; i++) {
    atomKK->sync(fix[i]->execution_space,
                 fix[i]->datamask_read);
    if (!fix[i]->kokkosable) lmp->kokkos->auto_sync = 1;
    fix[i]->post_run();
    lmp->kokkos->auto_sync = 0;
    atomKK->modified(fix[i]->execution_space,
                     fix[i]->datamask_modify);
  }
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ void VerletKokkos::setup()

  modify->setup(vflag);
  output->setup();
  lmp->kokkos->auto_sync = 0;
  lmp->kokkos->auto_sync = 1;
  update->setupflag = 1;
}

+7 −1
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ using namespace LAMMPS_NS;
PairDPDfdt::PairDPDfdt(LAMMPS *lmp) : Pair(lmp)
{
  random = NULL;
  splitFDT_flag = false;
  a0_is_zero = false;
}

/* ---------------------------------------------------------------------- */
@@ -94,7 +96,7 @@ void PairDPDfdt::compute(int eflag, int vflag)
  // loop over neighbors of my atoms

  if (splitFDT_flag) {
    for (ii = 0; ii < inum; ii++) {
    if (!a0_is_zero) for (ii = 0; ii < inum; ii++) {
      i = ilist[ii];
      xtmp = x[i][0];
      ytmp = x[i][1];
@@ -287,6 +289,8 @@ void PairDPDfdt::coeff(int narg, char **arg)
  double sigma_one = force->numeric(FLERR,arg[3]);
  double cut_one = cut_global;

  a0_is_zero = (a0_one == 0.0); // Typical use with SSA is to set a0 to zero

  if (narg == 5) cut_one = force->numeric(FLERR,arg[4]);

  int count = 0;
@@ -371,6 +375,7 @@ void PairDPDfdt::read_restart(FILE *fp)

  allocate();

  a0_is_zero = true; // start with assumption that a0 is zero
  int i,j;
  int me = comm->me;
  for (i = 1; i <= atom->ntypes; i++)
@@ -386,6 +391,7 @@ void PairDPDfdt::read_restart(FILE *fp)
        MPI_Bcast(&a0[i][j],1,MPI_DOUBLE,0,world);
        MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
        MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
        a0_is_zero = a0_is_zero && (a0[i][j] == 0.0); // verify the zero assumption
      }
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class PairDPDfdt : public Pair {
  double cut_global;
  int seed;
  bool splitFDT_flag;
  bool a0_is_zero;

  void allocate();

Loading