Merge pull request #901 from timattox/bugfix_atom_vec_dpd

USER-DPD: bugfix for AtomVecDPD::unpack_restart() and the Kokkos version
This commit is contained in:
Steve Plimpton
2018-05-16 16:45:35 -06:00
committed by GitHub
2 changed files with 9 additions and 2 deletions

View File

@ -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++;

View File

@ -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) {