aboutsummaryrefslogtreecommitdiff
path: root/src/patch/ghost_zone.hh
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-01 18:29:08 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-01 18:29:08 +0000
commitfead8c64ea8bd003fdc583e22ca42d7cfadd6b22 (patch)
tree40fa61d756eb1d872f175b332278d697dd375da2 /src/patch/ghost_zone.hh
parent4427ccc1784b4cac4113eae09db1bd70d24f218a (diff)
finish construction/setup code
--> should all be ready for test compiles now git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@418 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/ghost_zone.hh')
-rw-r--r--src/patch/ghost_zone.hh62
1 files changed, 39 insertions, 23 deletions
diff --git a/src/patch/ghost_zone.hh b/src/patch/ghost_zone.hh
index 342b230..9ce4689 100644
--- a/src/patch/ghost_zone.hh
+++ b/src/patch/ghost_zone.hh
@@ -284,9 +284,9 @@ public:
// min/max ipar that might possibly be part of this ghost zone
// (derived classes may actually use a subset of this)
- int min_possible_ipar() const
+ int ghost_zone_min_ipar() const
{ return my_edge().min_ipar_with_corners(); }
- int max_possible_ipar() const
+ int ghost_zone_max_ipar() const
{ return my_edge().max_ipar_with_corners(); }
// assert() that ghost zone is fully setup:
@@ -508,18 +508,17 @@ public:
int min_ipar(int iperp) const;
int max_ipar(int iperp) const;
- // min/max iperp of ghost zone in *other* patch's coordinate system
- // ... if the ghost zone is empty, its min/max won't be "in range",
- // so we use the *unchecked* map here
- int other_min_iperp() const
- { return other_iperp_->map_unchecked(min_iperp()); }
- int other_max_iperp() const
- { return other_iperp_->map_unchecked(max_iperp()); }
+ // convert our iperp --> other patch's iperp
+ int other_iperp(int iperp) const
+ {
+ assert(other_iperp_ != NULL);
+ return other_iperp_->map(iperp);
+ }
- // construct/setup other patch's frontier
- void setup_other_frontier
- (int ghosted_min_gfn_in, int ghosted_max_gfn_in,
- int interp_handle_in, int interp_par_table_handle_in);
+ // construct *other* patch's frontier,
+ // interlink it with this ghost zone and the other patch
+ void setup_other_frontier(int interp_handle_in,
+ int interp_par_table_handle_in);
// constructor, destructor
interpatch_ghost_zone(const patch_edge& my_edge_in,
@@ -541,24 +540,41 @@ private:
// initialized to NULL in constructor,
// set to proper value by setup_other_frontier()
// ... we do *not* own this object (the other patch does)!
- patch_frontier *other_frontier_;
+ const patch_frontier *other_frontier_;
+
+ //
+ // our remaining subobjects are all pointed-to because
+ // we won't know the range of other_iperp (which we need
+ // to initialize the subobjects) until partway into the
+ // body of our constructor
+ //
// other patch's iperp coordinates of our ghost zone points
// ... maps my_iperp --> other_iperp
- // ... we own this object
jtutil::cpm_map<fp> *other_iperp_;
- // [min,max]_ipar used at each iperp
- // = values of [min,max]_ipar() fns
- // ... index is (my_iperp)
- jtutil::array1d<int> min_ipar_used_, max_ipar_used_;
+ // other patch's [min,max]_iperp of our ghost zone points
+ int other_min_iperp_, other_max_iperp_;
+
+ // [min,max]_ipar used at each other_iperp
+ // ... we will pass these arrays by reference
+ // to the other patch's patch_frontier object
+ // ... index is (other_iperp)
+ jtutil::array1d<int>* min_ipar_used_;
+ jtutil::array1d<int>* max_ipar_used_;
// other patch's (fp) parallel coordinates of our ghost zone points
- // ... subscripts are (my_iperp, my_ipar)
- jtutil::array2d<fp> other_par_;
+ // ... we will pass this array by reference
+ // to the other patch's patch_frontier object
+ // using my_ipar as the patch_frontier's parindex
+ // ... subscripts are (other_iperp, my_ipar)
+ jtutil::array2d<fp>* other_par_;
// buffer into which the other patch's patch_frontier object
// will store the interpolated gridfn values
- // ... subscripts are (gfn, my_iperp,my_ipar)
- jtutil::array3d<fp> interp_result_buffer_;
+ // ... we will pass this array by reference
+ // to the other patch's patch_frontier object
+ // using my_ipar as the patch_frontier's parindex
+ // ... subscripts are (gfn, other_iperp,my_ipar)
+ jtutil::array3d<fp>* interp_result_buffer_;
};