diff options
author | Roland Haas <rhaas@tapir.caltech.edu> | 2013-10-08 17:31:22 -0700 |
---|---|---|
committer | Roland Haas <rhaas@tapir.caltech.edu> | 2013-10-15 09:14:34 -0700 |
commit | 8237792551e9f5f9ca95e98d78a709b5722ed25f (patch) | |
tree | 6854b81359a9e350e4dd89047a9e301355d7a891 /Carpet/CarpetLib/src/dh.hh | |
parent | b13c69008fd5d9b0d04f417cec3c21f507e3a6f4 (diff) |
CarpetLib: use map instead of set for dh::gfs
some routines assume that elements in gfs are sorted by variable index
when traversing the container (eg recompose_allocate does)
Diffstat (limited to 'Carpet/CarpetLib/src/dh.hh')
-rw-r--r-- | Carpet/CarpetLib/src/dh.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/dh.hh b/Carpet/CarpetLib/src/dh.hh index b558b013f..55b75218c 100644 --- a/Carpet/CarpetLib/src/dh.hh +++ b/Carpet/CarpetLib/src/dh.hh @@ -5,6 +5,7 @@ #include <cstdlib> #include <iostream> #include <set> +#include <map> #include <string> #include <vector> @@ -248,7 +249,12 @@ public: // should be readonly level_mboxes level_boxes; // grid hierarchy [ml][rl] fast_mboxes fast_boxes; // grid hierarchy [ml][rl][p] - set<ggf*> gfs; // all grid functions +private: + + // this needs to be sorted by varindex so that when iteration through the + // container in order with a forward iterator, vector leaders are processed + // first + map<int,ggf*> gfs; // all grid functions public: |