From ae7b18fb772c17c6df105ba7f1f76fac420e998d Mon Sep 17 00:00:00 2001 From: jrgissing <jrgiss05@gmail.com> Date: Wed, 5 Sep 2018 00:11:50 -0600 Subject: [PATCH] only one call to extract needed --- src/USER-MISC/fix_bond_react.cpp | 8 ++++---- src/USER-MISC/fix_bond_react.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index 469e1d6347..a6f08a7376 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -961,6 +961,10 @@ void FixBondReact::superimpose_algorithm() local_num_mega = 0; ghostly_num_mega = 0; + // indicates local ghosts of other procs + int tmp; + localsendlist = (int *) comm->extract("localsendlist",tmp); + // quick description of important global indices you'll see floating about: // 'pion' is the pioneer loop index // 'neigh' in the first neighbor index @@ -1863,10 +1867,6 @@ void FixBondReact::glove_ghostcheck() int ghostly = 0; if (comm->style == 0) { - int tmp; - int *localsendlist = (int *) comm->extract("localsendlist",tmp); - - // create an indexed sendlist for (int i = 0; i < onemol->natoms; i++) { int ilocal = atom->map(glove[i][1]); if (ilocal >= atom->nlocal || localsendlist[ilocal] == 1) { diff --git a/src/USER-MISC/fix_bond_react.h b/src/USER-MISC/fix_bond_react.h index 8ff71141f8..08756f8131 100644 --- a/src/USER-MISC/fix_bond_react.h +++ b/src/USER-MISC/fix_bond_react.h @@ -122,6 +122,7 @@ class FixBondReact : public Fix { tagint **local_mega_glove; // consolidation local of reaction instances tagint **ghostly_mega_glove; // consolidation nonlocal of reaction instances tagint **global_mega_glove; // consolidation (inter-processor) of gloves containing nonlocal atoms + int *localsendlist; // indicates ghosts of other procs int local_num_mega; // num of local reaction instances int ghostly_num_mega; // num of ghostly reaction instances int global_megasize; // num of reaction instances in global_mega_glove -- GitLab