aboutsummaryrefslogtreecommitdiff
path: root/src/patch/patch.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/patch/patch.hh')
-rw-r--r--src/patch/patch.hh50
1 files changed, 26 insertions, 24 deletions
diff --git a/src/patch/patch.hh b/src/patch/patch.hh
index 536305b..f5d906c 100644
--- a/src/patch/patch.hh
+++ b/src/patch/patch.hh
@@ -281,15 +281,24 @@ public:
{ return *min_sigma_ghost_zone_; }
ghost_zone& max_sigma_ghost_zone() const
{ return *max_sigma_ghost_zone_; }
- ghost_zone& minmax_ang_ghost_zone(bool want_min, bool want_rho)
- const
- {
- return want_min ? (want_rho ? min_rho_ghost_zone()
- : min_sigma_ghost_zone())
- : (want_rho ? max_rho_ghost_zone()
- : max_sigma_ghost_zone());
- }
- ghost_zone& ghost_zone_on_edge(const patch_edge &e) const;
+ ghost_zone& minmax_ang_ghost_zone(bool want_min, bool want_rho) const;
+ ghost_zone& ghost_zone_on_edge(const patch_edge &edge) const;
+
+
+ //
+ // ***** access to ghost zone/frontier pointers *****
+ //
+private:
+ // these are used by members/friends only for setup
+ // they return references to our ghost zone/frontier pointers
+ // ... used only from patch::setup_*_ghost_zone()
+ const ghost_zone*& ghost_zone_ptr (const patch_edge& edge) const;
+ // ... used only from (friend)
+ // interpatch_ghost_zone::setup_other_frontier()
+ const patch_frontier*& patch_frontier_ptr(const patch_edge& edge) const;
+ friend interpatch_ghost_zone::setup_other_frontier
+ (int interp_handle_in, int interp_par_table_handle_in);
+
private:
// helper function for setup_*_ghost_zone():
// assert() that ghost zone pointer on specified edge is NULL
@@ -304,7 +313,6 @@ public:
(const patch_edge &e)
const;
-
//
// ***** set up ghost zone and frontier subobjects
//
@@ -320,8 +328,8 @@ public:
// then set it up as periodic-symmetry
// ... return reference to newly-set-up ghost zone object
symmetry_ghost_zone& setup_periodic_symmetry_ghost_zone
- (const patch_edge& my_edge, const patch_edge& symmetry_edge,
- bool ipar_map_is_plus);
+ (const patch_edge& my_edge, const patch_edge& symmetry_edge,
+ bool ipar_map_is_plus);
// assert() that this ghost zone hasn't been set up yet,
// then set it up as interpatch
@@ -332,13 +340,6 @@ public:
(const patch_edge& my_edge, const patch_edge& other_edge,
int N_overlap_points);
- // assert() that this ghost zone is interpatch,
- // then set up the other patch's frontier
- // ... return reference to new frontier
- patch_frontier& setup_other_patch_frontier
- (const patch_edge& my_edge_in,
- int interp_handle_in, int interp_par_table_handle_in);
-
// assert() that all ghost zones (and frontiers, where applicable)
// are fully setup
void assert_all_ghost_zones_fully_setup() const;
@@ -405,11 +406,12 @@ private:
ghost_zone* max_sigma_ghost_zone_;
// frontiers (NULL pointers if no frontier for this ghost zone)
- // ... pointers are initialized by setup_interpatch_ghost_zone()
- patch_frontier* min_rho_patch_frontier_,
- patch_frontier* max_rho_patch_frontier_,
- patch_frontier* min_sigma_patch_frontier_,
- patch_frontier* max_sigma_patch_frontier_;
+ // ... pointers are by other patch's
+ // interpatch_ghost_zone::setup_other_frontier()
+ const patch_frontier* min_rho_patch_frontier_,
+ const patch_frontier* max_rho_patch_frontier_,
+ const patch_frontier* min_sigma_patch_frontier_,
+ const patch_frontier* max_sigma_patch_frontier_;
};
//*****************************************************************************