diff --git a/src/comm.cpp b/src/comm.cpp index ae24ab1712..01b0123810 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -513,7 +513,10 @@ void Comm::exchange() MPI_Status status; AtomVec *avec = atom->avec; - // clear global->local map since atoms move & new ghosts are created + // clear global->local map for owned and ghost atoms + // b/c atoms migrate to new procs in exchange() and + // new ghosts are created in borders() + // map_set() is done at end of borders() if (map_style) atom->map_clear(); diff --git a/src/fix_deposit.cpp b/src/fix_deposit.cpp index 8ff2c49092..b6122fd6a6 100644 --- a/src/fix_deposit.cpp +++ b/src/fix_deposit.cpp @@ -306,7 +306,8 @@ void FixDeposit::pre_exchange() // set tag # of new particle beyond all previous atoms // reset global natoms - // if global map exists, reset it + // if global map exists, reset it now instead of waiting for comm + // since deleting atoms messes up ghosts if (success && atom->tag_enable) { atom->tag_extend(); diff --git a/src/fix_evaporate.cpp b/src/fix_evaporate.cpp index 913cf7696a..2fe05a2796 100644 --- a/src/fix_evaporate.cpp +++ b/src/fix_evaporate.cpp @@ -182,10 +182,12 @@ void FixEvaporate::pre_exchange() } // reset global natoms - // if global map exists, reset it + // if global map exists, reset it now instead of waiting for comm + // since deleting atoms messes up ghosts atom->natoms -= nwhack; if (nwhack && atom->map_style) { + atom->nghost = 0; atom->map_init(); atom->map_set(); }