aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-02 17:50:15 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-02 17:50:15 +0000
commit0e9a2f21b3a3c0160ffb71e096c0bfe2a60139e3 (patch)
treeb4254e623667a8e25f707f6984681c4d8f588b71 /src
parentaed60fcd6605970b0b9482ce6a10fc9d788a8cbc (diff)
add missing interpatch_ghost_zone::assert_fully_setup()
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@424 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r--src/patch/ghost_zone.cc20
-rw-r--r--src/patch/ghost_zone.hh18
2 files changed, 29 insertions, 9 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc
index 486ad57..bb3e99e 100644
--- a/src/patch/ghost_zone.cc
+++ b/src/patch/ghost_zone.cc
@@ -11,6 +11,7 @@
// interpatch_ghost_zone::~interpatch_ghost_zone
// interpatch_ghost_zone::[min,max]_ipar
// interpatch_ghost_zone::setup_other_patch_frontier
+// interpatch_ghost_zone::assert_fully_setup
// interpatch_ghost_zone::synchronize
//
@@ -454,6 +455,25 @@ other_patch().set_patch_frontier(other_edge(), other_frontier_);
//******************************************************************************
//
+// This function asserts() that our frontier pointer is non-NULL,
+// that the other patch has an interpatch ghost zone on this edge, and
+// that that interpatch ghost zone points back to us.
+//
+void interpatch_ghost_zone::assert_fully_setup() const
+{
+assert(other_frontier_ != NULL);
+
+assert( other_patch()
+ .ghost_zone_on_edge(other_edge())
+ .is_interpatch() );
+assert( my_patch() == other_patch()
+ .interpatch_ghost_zone_on_edge(other_edge())
+ .other_patch() );
+}
+
+//******************************************************************************
+
+//
// This function "synchronizes" a ghost zone, i.e. it updates the
// ghost-zone values of the specified gridfns via the appropriate
// interpatch interpolations.
diff --git a/src/patch/ghost_zone.hh b/src/patch/ghost_zone.hh
index df0c9dd..ef1bc32 100644
--- a/src/patch/ghost_zone.hh
+++ b/src/patch/ghost_zone.hh
@@ -292,10 +292,10 @@ public:
// assert() that ghost zone is fully setup:
// defined here ==> no-op
// symmetry ghost zone ==> unchanged ==> no-op
- // interpatch ghost zone ==> assert() that frontier pointer is non-NULL,
- // assert() that other patch has interpatch
- // ghost zone on this edge, and that it
- // points back to us
+ // interpatch ghost zone ==>
+ // assert() that frontier pointer is non-NULL,
+ // that other patch has interpatch ghost zone on this edge,
+ // and that it points back to us
virtual void assert_fully_setup() const { }
protected:
@@ -496,11 +496,6 @@ public:
{ return other_patch_; }
const patch_edge& other_edge() const
{ return other_edge_; }
- const patch_frontier& other_frontier() const
- {
- assert(other_frontier_ != NULL);
- return *other_frontier_;
- }
// min/max/size ipar of the ghost zone for specified iperp
// taking into account how we treat the corners
@@ -520,6 +515,11 @@ public:
void setup_other_frontier(int interp_handle,
int interp_par_table_handle);
+ // assert() that frontier pointer is non-NULL,
+ // that other patch has interpatch ghost zone on this edge,
+ // and that it points back to us
+ void assert_fully_setup() const;
+
// constructor, destructor
interpatch_ghost_zone(const patch_edge& my_edge_in,
const patch_edge& other_edge_in,