diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-29 23:52:39 -0600 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-29 23:52:39 -0600 |
commit | e690bb6fb2ef027f20b542eb93a3fce645115a80 (patch) | |
tree | 5efd35e69985d3e58af82d7bb1239b96ba676a6f /Carpet/CarpetLib/src/dh.hh | |
parent | e92d39f436e8094305d3cdfba13354c679626d6a (diff) |
Move communication schedule into its own data structure
Splite the grid hierarchy and communication schedule into two separate
data structures.
Correct error in determining the processor owning a certain region when
calculating the communication schedule.
Diffstat (limited to 'Carpet/CarpetLib/src/dh.hh')
-rw-r--r-- | Carpet/CarpetLib/src/dh.hh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/dh.hh b/Carpet/CarpetLib/src/dh.hh index 09d3579e5..8e6f67e06 100644 --- a/Carpet/CarpetLib/src/dh.hh +++ b/Carpet/CarpetLib/src/dh.hh @@ -61,6 +61,12 @@ public: ibset ghosts; // ghost zones, as seen from Cactus ibbox interior; // interior (without ghost zones) + size_t memory () const; + ostream & output (ostream & os) const; + }; + + struct fast_dboxes { + // Communication schedule: srpvect fast_mg_rest_sendrecv; @@ -85,6 +91,10 @@ private: typedef vector<cboxes> rboxes; // ... for each refinement level typedef vector<rboxes> mboxes; // ... for each multigrid level + typedef vector<fast_dboxes> fast_cboxes; // ... for each component + typedef vector<fast_cboxes> fast_rboxes; // ... for each refinement level + typedef vector<fast_rboxes> fast_mboxes; // ... for each multigrid level + void @@ -101,6 +111,8 @@ public: // should be readonly mboxes boxes; // grid hierarchy mboxes oldboxes; // old grid hierarchy, used during regridding + fast_mboxes fast_boxes; // grid hierarchy + fast_mboxes fast_oldboxes; list<ggf*> gfs; // list of all grid functions @@ -121,6 +133,12 @@ public: void regrid (); void recompose (int rl, bool do_prolongate); +private: + int this_proc (int rl, int c) const; + bool on_this_proc (int rl, int c) const; + bool on_this_proc (int rl, int c, int cc) const; + +public: // Grid function management void add (ggf * f); void remove (ggf * f); @@ -137,6 +155,11 @@ inline size_t memoryof (dh::dboxes const & b) return b.memory (); } +inline size_t memoryof (dh::fast_dboxes const & b) +{ + return b.memory (); +} + inline size_t memoryof (dh const & d) { return d.memory (); @@ -147,6 +170,11 @@ inline ostream & operator<< (ostream & os, dh::dboxes const & b) return b.output (os); } +inline ostream & operator<< (ostream & os, dh::fast_dboxes const & b) +{ + return b.output (os); +} + inline ostream & operator<< (ostream & os, dh const & d) { return d.output (os); |