File tree 4 files changed +19
-0
lines changed
4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -840,6 +840,20 @@ haveNodeList(const NodeList<Dimension>& nodeList) const {
840
840
return itr != nodeListEnd ();
841
841
}
842
842
843
+ // ------------------------------------------------------------------------------
844
+ // Get the NodeList index for the given NodeList
845
+ // ------------------------------------------------------------------------------
846
+ template <typename Dimension>
847
+ int
848
+ DataBase<Dimension>::
849
+ nodeListIndex (const NodeList<Dimension>& nodeList) const {
850
+ ConstNodeListIterator itr = find (nodeListBegin (),
851
+ nodeListEnd (),
852
+ &nodeList);
853
+ VERIFY (itr != nodeListEnd ());
854
+ return std::distance (nodeListBegin (), itr);
855
+ }
856
+
843
857
// ------------------------------------------------------------------------------
844
858
// Return the const list of NodeList pointers.
845
859
// ------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ public:
198
198
void deleteNodeList (NodeList<Dimension>& nodeList);
199
199
200
200
bool haveNodeList (const NodeList<Dimension>& nodeList) const ;
201
+ int nodeListIndex (const NodeList<Dimension>& nodeList) const ;
201
202
202
203
// Allow const access to the list of NodeList pointers.
203
204
const std::vector<NodeList<Dimension>*>& nodeListPtrs () const ;
Original file line number Diff line number Diff line change 7
7
MIN = - 1
8
8
MAX = - 2
9
9
SUM = - 3
10
+ MINLOC = - 4
11
+ MAXLOC = - 5
10
12
11
13
def is_fake_mpi ():
12
14
return True
Original file line number Diff line number Diff line change 29
29
MIN = MPI .MIN
30
30
MAX = MPI .MAX
31
31
SUM = MPI .SUM
32
+ MINLOC = MPI .MINLOC
33
+ MAXLOC = MPI .MAXLOC
32
34
33
35
#-------------------------------------------------------------------------------
34
36
# Prepare files to keep the stdout and stderr streams in.
You can’t perform that action at this time.
0 commit comments