diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-30 22:16:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-30 22:16:00 +0000 |
commit | 3846b73a6eb37aea4c86e3285021fbe71182e448 (patch) | |
tree | 0fa7892da8594fd4627b5f211af0ff975d9c6a13 /Carpet/CarpetLib/src/region.hh | |
parent | 79e0fbfa9f84f05aa77e24c685e5a23b763b7866 (diff) |
CarpetLib: Move pseudoregion datatypes to region.hh
Rename the datatypes pseudoregion and sendrecv_pseudoregion to
pseudoregion_t and sendrecv_pseudoregion_t, respectively. Move their
declaration and definition to region.hh and region.cc, respectively.
Instantiate templates for stream output.
darcs-hash:20080130221653-dae7b-8eb25cacc8f7750ac470179c9575785bdb32b575.gz
Diffstat (limited to 'Carpet/CarpetLib/src/region.hh')
-rw-r--r-- | Carpet/CarpetLib/src/region.hh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/region.hh b/Carpet/CarpetLib/src/region.hh index d32b13a82..73b60004e 100644 --- a/Carpet/CarpetLib/src/region.hh +++ b/Carpet/CarpetLib/src/region.hh @@ -34,4 +34,39 @@ ostream & operator<< (ostream & os, region_t const & reg); +// A pseudoregion is almost a region; it is a bbox that lives on a +// certain processor. Pseudoregions are a compact way to store +// information about what processors needs to send data to what other +// processor during synchronisation or regridding. +struct pseudoregion_t { + ibbox extent; + int processor; + pseudoregion_t () + { + } + pseudoregion_t (ibbox const & extent_, int const processor_) + : extent (extent_), processor (processor_) + { + } +}; + +ostream & operator<< (ostream & os, pseudoregion_t const & p); + +struct sendrecv_pseudoregion_t { + pseudoregion_t send, recv; + sendrecv_pseudoregion_t () + { + } + sendrecv_pseudoregion_t (ibbox const & send_extent, int const send_processor, + ibbox const & recv_extent, int const recv_processor) + : send (pseudoregion_t (send_extent, send_processor)), + recv (pseudoregion_t (recv_extent, recv_processor)) + { + } +}; + +ostream & operator<< (ostream & os, sendrecv_pseudoregion_t const & srp); + + + #endif // #ifndef REGION_HH |