diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2001-07-15 15:25:03 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2001-07-15 15:25:03 +0000 |
commit | 8f466c3f7d46c212dccd39d7e37d97aa3f765a18 (patch) | |
tree | 3d070a60cf69623ab69434bc13465878c7558204 /src/patch | |
parent | f6e469cc8f40615f395c708435d3b36f89e745ae (diff) |
change
setup_mirror_symmetry_ghost_zone()
setup_periodic_symmetry_ghost_zone()
setup_interpatch_ghost_zone()
setup_patch_frontier()
to all return references to newly-created objects
... n.b. references are to most-derived types (eg interpatch_ghost_zone
not just ghost_zone) for the benefit of
patch_system::setup_adjacent_patch_frontiers()
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@158 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch')
-rw-r--r-- | src/patch/patch.cc | 24 | ||||
-rw-r--r-- | src/patch/patch.hh | 20 |
2 files changed, 30 insertions, 14 deletions
diff --git a/src/patch/patch.cc b/src/patch/patch.cc index b9d101f..2939780 100644 --- a/src/patch/patch.cc +++ b/src/patch/patch.cc @@ -224,7 +224,8 @@ return p.minmax_ang_patch_edge(common_is_p_min_q_max, common_is_p_rho); // // This function sets up a mirror-symmetry ghost zone of this patch. // -void patch::setup_mirror_symmetry_ghost_zone(const patch_edge& my_edge_in) +symmetry_ghost_zone& patch::setup_mirror_symmetry_ghost_zone + (const patch_edge& my_edge_in) { // make sure we belong to the right patch assert(& my_edge_in.my_patch() == this); @@ -240,6 +241,8 @@ if (my_edge_in.is_min()) else if (my_edge_in.is_rho()) then max_rho_ghost_zone_ = temp; else max_sigma_ghost_zone_ = temp; + +return *temp; } //***************************************************************************** @@ -247,7 +250,7 @@ if (my_edge_in.is_min()) // // This function sets up a periodic-symmetry ghost zone of this patch. // -void patch::setup_periodic_symmetry_ghost_zone +symmetry_ghost_zone& patch::setup_periodic_symmetry_ghost_zone (const patch_edge& my_edge_in, const patch_edge& symmetry_edge_in, int my_edge_sample_ipar, int symmetry_edge_sample_ipar, bool ipar_map_sign) // one of cpm_map::{plus,minus}_map @@ -269,6 +272,8 @@ if (my_edge_in.is_min()) else if (my_edge_in.is_rho()) then max_rho_ghost_zone_ = temp; else max_sigma_ghost_zone_ = temp; + +return *temp; } //***************************************************************************** @@ -276,8 +281,9 @@ if (my_edge_in.is_min()) // // This function sets up an interpatch ghost zone of this patch. // -void patch::setup_interpatch_ghost_zone(const patch_edge& my_edge_in, - const patch_edge& other_edge_in) +interpatch_ghost_zone& patch::setup_interpatch_ghost_zone + (const patch_edge& my_edge_in, + const patch_edge& other_edge_in) { // make sure we belong to the right patch assert(& my_edge_in.my_patch() == this); @@ -294,6 +300,8 @@ if (my_edge_in.is_min()) else if (my_edge_in.is_rho()) then max_rho_ghost_zone_ = temp; else max_sigma_ghost_zone_ = temp; + +return *temp; } //***************************************************************************** @@ -301,9 +309,9 @@ if (my_edge_in.is_min()) // // This function sets up a one of our patch frontier. // -void patch::setup_patch_frontier(const patch_edge& my_edge_in, - int min_iperp_in, int max_iperp_in, - int interpolator_order_in) +patch_frontier& patch::setup_patch_frontier(const patch_edge& my_edge_in, + int min_iperp_in, int max_iperp_in, + int interpolator_order_in) { // make sure we belong to the right patch assert(& my_edge_in.my_patch() == this); @@ -321,4 +329,6 @@ if (my_edge_in.is_min()) else if (my_edge_in.is_rho()) then max_rho_patch_frontier_ = temp; else max_sigma_patch_frontier_ = temp; + +return *temp; } diff --git a/src/patch/patch.hh b/src/patch/patch.hh index b557c5a..58c83fc 100644 --- a/src/patch/patch.hh +++ b/src/patch/patch.hh @@ -284,10 +284,13 @@ public: // // set up one of our ghost zones as mirror-symmetry - void setup_mirror_symmetry_ghost_zone(const patch_edge& edge_in); + // ... return reference to new ghost zone + symmetry_ghost_zone& setup_mirror_symmetry_ghost_zone + (const patch_edge& edge_in); // set up one of our ghost zones as periodic-symmetry - void setup_periodic_symmetry_ghost_zone + // ... return reference to new ghost zone + symmetry_ghost_zone& setup_periodic_symmetry_ghost_zone (const patch_edge& my_edge_in, const patch_edge& symmetry_edge_in, int my_edge_sample_ipar, int symmetry_edge_sample_ipar, bool ipar_map_sign); // one of cpm_map::{plus,minus}_map @@ -295,13 +298,16 @@ public: // set up one of our ghost zones as interpatch // ... but don't link it to the other patch's frontier // (which doesn't exist yet) - void setup_interpatch_ghost_zone(const patch_edge& edge_in, - const patch_edge& other_edge_in); + // ... return reference to new ghost zone + interpatch_ghost_zone& setup_interpatch_ghost_zone + (const patch_edge& edge_in, + const patch_edge& other_edge_in); // set up one of our patch frontiers - void setup_patch_frontier(const patch_edge& my_edge_in, - int min_iperp_in, int max_iperp_in, - int interpolator_order); + // ... return reference to new frontier + patch_frontier& setup_patch_frontier(const patch_edge& my_edge_in, + int min_iperp_in, int max_iperp_in, + int interpolator_order); protected: |