From ffa3b8c1eef3041e7f6fade54a0bcd0cd76222c3 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 19 Mar 2009 14:54:04 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2689 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/comm.cpp | 5 ++++- src/fix_deposit.cpp | 3 ++- src/fix_evaporate.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) 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(); }