Unverified Commit 585a164e authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #901 from timattox/bugfix_atom_vec_dpd

USER-DPD: bugfix for AtomVecDPD::unpack_restart() and the Kokkos version
parents 307e4714 96c5c92b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ void AtomVecDPDKokkos::copy(int i, int j, int delflag)
{
  sync(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK |
            MASK_MASK | IMAGE_MASK | DPDTHETA_MASK |
            UCG_MASK | UCGNEW_MASK |
            UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK);

  h_tag[j] = h_tag[i];
@@ -183,6 +184,7 @@ void AtomVecDPDKokkos::copy(int i, int j, int delflag)

  modified(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK |
                MASK_MASK | IMAGE_MASK | DPDTHETA_MASK |
                UCG_MASK | UCGNEW_MASK |
                UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK);
}

@@ -1029,7 +1031,7 @@ int AtomVecDPDKokkos::pack_comm_hybrid(int n, int *list, double *buf)
  int i,j,m;

  sync(Host,DPDTHETA_MASK | UCOND_MASK |
            UMECH_MASK | UCHEM_MASK | UCG_MASK | UCGNEW_MASK);
            UMECH_MASK | UCHEM_MASK);

  m = 0;
  for (i = 0; i < n; i++) {
@@ -1234,7 +1236,7 @@ int AtomVecDPDKokkos::unpack_comm_hybrid(int n, int first, double *buf)
  }

  modified(Host,DPDTHETA_MASK | UCOND_MASK |
                UMECH_MASK | UCHEM_MASK | UCG_MASK | UCGNEW_MASK);
                UMECH_MASK | UCHEM_MASK );

  return m;
}
@@ -1645,6 +1647,8 @@ int AtomVecDPDKokkos::unpack_restart(double *buf)
  h_uCond[nlocal] = buf[m++];
  h_uMech[nlocal] = buf[m++];
  h_uChem[nlocal] = buf[m++];
  h_uCG[nlocal] = 0.0;
  h_uCGnew[nlocal] = 0.0;

  double **extra = atom->extra;
  if (atom->nextra_store) {
@@ -1654,6 +1658,7 @@ int AtomVecDPDKokkos::unpack_restart(double *buf)

  modified(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK |
                MASK_MASK | IMAGE_MASK | DPDTHETA_MASK |
                UCG_MASK | UCGNEW_MASK |
                UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK);

  atom->nlocal++;
+2 −0
Original line number Diff line number Diff line
@@ -757,6 +757,8 @@ int AtomVecDPD::unpack_restart(double *buf)
  uCond[nlocal] = buf[m++];
  uMech[nlocal] = buf[m++];
  uChem[nlocal] = buf[m++];
  uCG[nlocal] = 0.0;
  uCGnew[nlocal] = 0.0;

  double **extra = atom->extra;
  if (atom->nextra_store) {