diff --git a/src/DataBase/DataBase.cc b/src/DataBase/DataBase.cc index 117ea69b0..65e50beb7 100644 --- a/src/DataBase/DataBase.cc +++ b/src/DataBase/DataBase.cc @@ -840,6 +840,20 @@ haveNodeList(const NodeList& nodeList) const { return itr != nodeListEnd(); } +//------------------------------------------------------------------------------ +// Get the NodeList index for the given NodeList +//------------------------------------------------------------------------------ +template +int +DataBase:: +nodeListIndex(const NodeList& nodeList) const { + ConstNodeListIterator itr = find(nodeListBegin(), + nodeListEnd(), + &nodeList); + VERIFY(itr != nodeListEnd()); + return std::distance(nodeListBegin(), itr); +} + //------------------------------------------------------------------------------ // Return the const list of NodeList pointers. //------------------------------------------------------------------------------ diff --git a/src/DataBase/DataBase.hh b/src/DataBase/DataBase.hh index b9edc1d20..d3d7739a2 100644 --- a/src/DataBase/DataBase.hh +++ b/src/DataBase/DataBase.hh @@ -198,6 +198,7 @@ public: void deleteNodeList(NodeList& nodeList); bool haveNodeList(const NodeList& nodeList) const; + int nodeListIndex(const NodeList& nodeList) const; // Allow const access to the list of NodeList pointers. const std::vector*>& nodeListPtrs() const; diff --git a/src/Distributed/fakempi.py b/src/Distributed/fakempi.py index 11d0eaa62..e5dcfa822 100644 --- a/src/Distributed/fakempi.py +++ b/src/Distributed/fakempi.py @@ -7,6 +7,8 @@ MIN = -1 MAX = -2 SUM = -3 +MINLOC = -4 +MAXLOC = -5 def is_fake_mpi(): return True diff --git a/src/Distributed/mpi_mpi4py.py b/src/Distributed/mpi_mpi4py.py index 5f99f1755..3b4e168af 100644 --- a/src/Distributed/mpi_mpi4py.py +++ b/src/Distributed/mpi_mpi4py.py @@ -29,6 +29,8 @@ MIN = MPI.MIN MAX = MPI.MAX SUM = MPI.SUM +MINLOC = MPI.MINLOC +MAXLOC = MPI.MAXLOC #------------------------------------------------------------------------------- # Prepare files to keep the stdout and stderr streams in.