diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-10 13:22:59 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-04-10 13:22:59 +0000 |
commit | 254d22f6e323c76cd5272d4f44424bdcddfb859d (patch) | |
tree | 1886daee8c9e730e5f4c90522d21bd06efaf1ab9 /src | |
parent | 4a76851d1b003554137bd790e70751e1a84e2f79 (diff) |
finish renaming patch_frontier
--> patch_interp object, a.k.a. "patch interpolation region"
change ownership of new patch_interp from patch as owner to
interpatch_ghost_zone
change setup_*_ghost_zone() fns to return void rather than refs
to newly-constructed ghost zone objects
clarify a bunch of comments
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@477 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r-- | src/patch/ghost_zone.cc | 42 | ||||
-rw-r--r-- | src/patch/ghost_zone.hh | 47 | ||||
-rw-r--r-- | src/patch/patch.cc | 49 | ||||
-rw-r--r-- | src/patch/patch.hh | 97 | ||||
-rw-r--r-- | src/patch/patch_edge.hh | 5 | ||||
-rw-r--r-- | src/patch/patch_interp.cc | 2 | ||||
-rw-r--r-- | src/patch/patch_interp.hh | 12 | ||||
-rw-r--r-- | src/patch/patch_system.cc | 55 | ||||
-rw-r--r-- | src/patch/patch_system.hh | 10 | ||||
-rw-r--r-- | src/patch/test_patch_system.cc | 2 |
10 files changed, 117 insertions, 204 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc index 0b844ab..43d75f1 100644 --- a/src/patch/ghost_zone.cc +++ b/src/patch/ghost_zone.cc @@ -37,8 +37,8 @@ using jtutil::error_exit; #include "fd_grid.hh" #include "patch.hh" #include "patch_edge.hh" -#include "ghost_zone.hh" #include "patch_interp.hh" +#include "ghost_zone.hh" //****************************************************************************** //****************************************************************************** @@ -168,7 +168,7 @@ interpatch_ghost_zone::interpatch_ghost_zone(const patch_edge& my_edge_in, other_patch_(other_edge_in.my_patch()), other_edge_(other_edge_in), // remaining pointers are all set up properly by finish_setup() - other_frontier_(NULL), + other_patch_interp_(NULL), other_iperp_(NULL), min_ipar_used_(NULL), max_ipar_used_(NULL), other_par_(NULL), @@ -180,13 +180,13 @@ interpatch_ghost_zone::interpatch_ghost_zone(const patch_edge& my_edge_in, // // perp coordinate is common to us and the other patch, so -// ghost zone/frontier must be min in one patch, max in the other +// ghost zone must be min in one patch, max in the other if (my_edge().is_min() == other_edge().is_min()) then error_exit(ERROR_EXIT, "***** interpatch_ghost_zone::interpatch_ghost_zone:\n" " my_patch().name()=\"%s\" my_edge().name()=%s\n" " other_patch().name()=\"%s\" other_edge().name()=%s\n" -" ghost zone/frontier must be min in one patch, max in the other!\n" +" ghost zone must be min in one patch, max in the other!\n" , my_patch().name(), my_edge().name(), other_patch().name(), other_edge().name()); /*NOTREACHED*/ @@ -331,6 +331,7 @@ delete other_par_; delete max_ipar_used_; delete min_ipar_used_; delete other_iperp_; +delete other_patch_interp_; } //****************************************************************************** @@ -378,8 +379,7 @@ return max_par_adjacent_ghost_zone().is_symmetry() // object. It // - sets up the par coordinate mapping information // - sets up the interpolator data pointer and result arrays -// - constructs the *other* patch's patch_interp:: object -// and sets our patch frontier pointer to point to it +// - constructs the patch_interp object to interpolate from the *other* patch // // We use our ipar as the patch_interp's parindex. // @@ -452,28 +452,30 @@ interp_result_buffer_ ghost_zone_min_ipar(), ghost_zone_max_ipar()); // -// construct and link to the *other* patch's frontier +// construct the patch_interp object to interpolate from the *other* patch // -other_frontier_ = new patch_interp(other_edge(), - other_min_iperp, other_max_iperp, - *min_ipar_used_, *max_ipar_used_, - *other_par_, - interp_handle, interp_par_table_handle); -other_patch().set_patch_interp(other_edge(), other_frontier_); +other_patch_interp_ = new patch_interp(other_edge(), + other_min_iperp, other_max_iperp, + *min_ipar_used_, *max_ipar_used_, + *other_par_, + interp_handle, interp_par_table_handle); } //****************************************************************************** // -// 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. +// This function asserts() that +// - we have a patch_interp object +// - our and the patch_interp object's notions of the "other patch" agree +// - the other patch has an interpatch ghost zone on this edge +// - the other patch's interpatch ghost zone on this edge, +// points back to our patch // void interpatch_ghost_zone::assert_fully_setup() const { -assert(other_frontier_ != NULL); - +assert(other_patch_interp_ != NULL); +assert(other_patch() == other_patch_interp_.my_patch()); assert( other_patch() .ghost_zone_on_edge(other_edge()) .is_interpatch() ); @@ -516,8 +518,8 @@ if (! (want_min_par_corner && want_non_corner && want_max_par_corner)) want_max_par_corner); /*NOTREACHED*/ // do the interpolation into our result buffer -other_frontier_->interpolate(ghosted_min_gfn, ghosted_max_gfn, - *interp_result_buffer_); +other_patch_interp_->interpolate(ghosted_min_gfn, ghosted_max_gfn, + *interp_result_buffer_); // store the results back into our gridfns for (int gfn = ghosted_min_gfn ; gfn <= ghosted_max_gfn ; ++gfn) diff --git a/src/patch/ghost_zone.hh b/src/patch/ghost_zone.hh index e8f7a49..056d2e1 100644 --- a/src/patch/ghost_zone.hh +++ b/src/patch/ghost_zone.hh @@ -47,7 +47,7 @@ // patch's patch_interp objects. // Every patch has (points to) 4 ghost_zone objects, one for each of // the patch's sides. See the comments in "patch.hh" for a "big picture" -// discussion of patches, patch edges, ghost zones, and patch frontiers. +// discussion of patches, patch edges, ghost zones, and patch interpolators. // // @@ -162,13 +162,14 @@ // +x: (6,[-2,6]), (7,[-2,7]) // -y: ([-2, 7],[-2,-1]) // +y: ([-2,5],6), ([-2,6],7) -// * The +z patch's frontiers are +// * The regions where we will interpolate data from the +z patch are // +x: ([ 3,4],[-2,7]) // +y: ([-2,7],[ 3,4]) -// Note that in both cases the frontier includes the points computed -// by symmetry (in phase 1 of our 3-phase algorithm) on the adjacent -// edges! There are no -x or -y frontiers, since no interpolation is -// needed across those boundaries of this patch. +// Note that in both cases the interpolation region includes the points +// computed by symmetry (in phase 1 of our 3-phase algorithm) on the +// adjacent edges! There are no interpolation regions inside the -x or +// -y boundaries, since no interpolation is needed across those boundaries +// of this patch. // // Our 3-phase algorithm described above thus becomes: // Phase 1: Fill in gridfn values at points marked with "s-x" below or @@ -292,10 +293,9 @@ 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, - // that other patch has interpatch ghost zone on this edge, - // and that it points back to us + // interpatch ghost zone ==> check consistency of this and the + // other patch's ghost zones and + // patch_interp objects virtual void assert_fully_setup() const { } protected: @@ -463,12 +463,16 @@ private: // // Note that as described in the "design notes for ghost zones" // comments above, interpatch_ghost_zone objects are constructed in -// the 2nd and 3rd phase of the overall 3-phase construction process -// described at the comments at the start of this file. -// - first set up the object itslf and its links to/from the patches -// and their edges [this is done by our constructor] -// - then set up the interpatch mapping information, data pointers, -// and interpolation result buffer [this is done by finish_setup() ] +// the 2nd and 3rd phase of the overall construction process described +// at the comments at the start of "patch.hh" +// [done by our constructor] +// - set up the object itslf and its links to/from the patches and +// their edges +// [done by finish_setup()] +// - set up the interpatch mapping information, data pointers, and +// interpolation result buffer +// - construct the patch_interp object to interpolate from the other +// patch, and save a pointer to it // class patch_interp; @@ -508,9 +512,9 @@ public: return other_iperp_->map(iperp); } - // assert() that frontier pointer is non-NULL, - // that other patch has interpatch ghost zone on this edge, - // and that it points back to us + // check consistency of this and the other patch's ghost zones + // and patch_interp objects + void assert_fully_setup() const; void assert_fully_setup() const; // constructor et al, destructor @@ -521,7 +525,7 @@ public: // to exist, though not to have finish_setup() called): // - setup par coordinate mapping information // - setup interpolator data pointers & result buffer - // - create *other* patch's frontier and setup pointer to it + // - create patch_interp object to interpolate from *other* patch void finish_setup(int interp_handle, int interp_par_table_handle); ~interpatch_ghost_zone(); @@ -543,8 +547,7 @@ private: // // see comment in "patch_interp.hh" for why this is "const" - // n.b. we do *not* own this object (the other patch does)! - const patch_interp* other_frontier_; + const patch_interp* other_patch_interp_; // other patch's iperp coordinates of our ghost zone points // ... maps my_iperp --> other_iperp diff --git a/src/patch/patch.cc b/src/patch/patch.cc index 46493f7..02458ea 100644 --- a/src/patch/patch.cc +++ b/src/patch/patch.cc @@ -44,8 +44,8 @@ using jtutil::error_exit; #include "fd_grid.hh" #include "patch.hh" #include "patch_edge.hh" -#include "ghost_zone.hh" #include "patch_interp.hh" +#include "ghost_zone.hh" //****************************************************************************** //****************************************************************************** @@ -83,12 +83,7 @@ patch::patch(patch_system &my_patch_system_in, int patch_number_in, min_rho_ghost_zone_(NULL), max_rho_ghost_zone_(NULL), min_sigma_ghost_zone_(NULL), - max_sigma_ghost_zone_(NULL), - - min_rho_patch_interp_(NULL), - max_rho_patch_interp_(NULL), - min_sigma_patch_interp_(NULL), - max_sigma_patch_interp_(NULL) // no comma + max_sigma_ghost_zone_(NULL) // no comma { } @@ -106,11 +101,6 @@ delete min_sigma_ghost_zone_; delete max_rho_ghost_zone_; delete min_rho_ghost_zone_; -delete max_sigma_patch_interp_; -delete min_sigma_patch_interp_; -delete max_rho_patch_interp_; -delete min_rho_patch_interp_; - delete & max_sigma_patch_edge_; delete & min_sigma_patch_edge_; delete & max_rho_patch_edge_; @@ -218,15 +208,13 @@ return static_cast<interpatch_ghost_zone &>(g); // hasn't already been set up, then constructs it as a mirror-symmetry // ghost zone and properly links this to/from the patch. // -symmetry_ghost_zone& patch::create_mirror_symmetry_ghost_zone - (const patch_edge& my_edge) +void patch::create_mirror_symmetry_ghost_zone(const patch_edge& my_edge) { // make sure we belong to the right patch assert(& my_edge.my_patch() == this); symmetry_ghost_zone *temp = new symmetry_ghost_zone(my_edge); set_ghost_zone(my_edge, temp); -return *temp; } //****************************************************************************** @@ -236,7 +224,7 @@ return *temp; // hasn't already been set up, then creates it as a periodic-symmetry // ghost zone and properly links this to/from the patch. // -symmetry_ghost_zone& patch::create_periodic_symmetry_ghost_zone +void patch::create_periodic_symmetry_ghost_zone (const patch_edge& my_edge, const patch_edge& symmetry_edge, bool is_ipar_map_plus) { @@ -253,7 +241,6 @@ symmetry_ghost_zone *temp my_sample_ipar, symmetry_sample_ipar, is_ipar_map_plus); set_ghost_zone(my_edge, temp); -return *temp; } //****************************************************************************** @@ -264,7 +251,7 @@ return *temp; // zone (with lots of NULL pointers for info we can't compute yet) // and properly links this to/from the patch. // -interpatch_ghost_zone& patch::create_interpatch_ghost_zone +void patch::create_interpatch_ghost_zone (const patch_edge& my_edge, const patch_edge& other_edge, int N_overlap_points) { @@ -275,7 +262,6 @@ interpatch_ghost_zone *temp = new interpatch_ghost_zone(my_edge, other_edge, N_overlap_points); set_ghost_zone(my_edge, temp); -return *temp; } //****************************************************************************** @@ -299,28 +285,6 @@ ghost_zone_ptr_to_set = gzp; //****************************************************************************** // -// This is a helper function for (our friend) -// interpatch_ghost_zone::setup_other_patch_interp(). -// This function assert()s that one of the patch frontier pointers -// (which one is selected by edge ) is NULL, then stores a value in it. -// -void patch::set_patch_interp(const patch_edge& edge, - const patch_interp* pfp) - const -{ -const patch_interp*& patch_interp_ptr_to_set - = edge.is_min() ? (edge.is_rho() ? min_rho_patch_interp_ - : min_sigma_patch_interp_) - : (edge.is_rho() ? max_rho_patch_interp_ - : max_sigma_patch_interp_); - -assert(patch_interp_ptr_to_set == NULL); -patch_interp_ptr_to_set = pfp; -} - -//****************************************************************************** - -// // This function finds which patch edge is adjacent to a neighboring // patch q, or does an error_exit() if q isn't actually a neighboring patch. // The computation is done using only (rho,sigma) coordinate sets and @@ -435,8 +399,7 @@ return p.minmax_ang_patch_edge(common_is_p_min_q_max, common_is_p_rho); // // This function verifies (via assert()) that all ghost zones of this -// patch, and all frontiers to which they should point, have been fully -// set up. +// patch have been fully set up. // void patch::assert_all_ghost_zones_fully_setup() const { diff --git a/src/patch/patch.hh b/src/patch/patch.hh index 0b7d8fe..87f7d7b 100644 --- a/src/patch/patch.hh +++ b/src/patch/patch.hh @@ -61,31 +61,27 @@ // Every patch has (points to) 4 ghost_zone objects, one for each of // the patch's sides. // -// A patch_interp object represents the part of a patch *inside* -// its nominal grid from which data is interpolated to compute gridfns -// in another patch's ghost zone. A patch_interp object stores -// information about the interpolator (which interpolator to use, any -// options for it) and any cached data for the interpolator. Every -// patch has (points to) between 0 and 4 patch_interp objects, -// one for each of the patch's sides where there's an adjacent patch -// and thus from which interpolation is done. +// A patch_interp object does the actual interpolation of data from +// within a patch (for filling in data in another patch's ghost zone). +// A patch_interp object points to the patch and patch_edge where it +// will be interpolating. // // For example, suppose we have two patches p and q with a common // angular boundary. Then the desired network of pointers looks like // this (omitting the patch_edge objects for simplicity): // -// +-----+ +-----+ -// | | <--> p.interpatch_ghost_zone --> q.patch_interp <--> | | -// | p | | q | -// | | <--> p.patch_interp <-- q.interpatch_ghost_zone <--> | | -// +-----+ +-----+ +// +-----+ +-----+ +// | | <--> p.interpatch_ghost_zone ---> q.patch_interp ---> | | +// | p | | q | +// | | <--- p.patch_interp <--- q.interpatch_ghost_zone <--> | | +// +-----+ +-----+ // // Because of the mutual pointers, we can't easily construct (say) // p's interpatch_ghost_zone until after q itself has been constructed, // and vice versa. Moreover, the patch_interp:: constructor // needs the adjacent-side ghost_zone objects to already exist, -// and it needs to know the iperp range of the frontier, which can -// only be computed from the adjacent-patch interpatch_ghost_zone +// and it needs to know the iperp range of the interpolation region, +// which can only be computed from the adjacent-patch interpatch_ghost_zone // object. // // The solution adopted here is to use a 3-phase algorithm, ultimately @@ -101,9 +97,8 @@ // * The patch_system constructor calls the functions // interpatch_ghost_zone::finish_setup() // to finish setting up the interpatch_ghost_zone objects, construct -// the patch_interp objects and interlink them from their patches, -// and finish linking the interpatch_ghost_zone objects to the -// patch_interp objects. +// the other patch's patch_interp objects, and finish linking the +// interpatch_ghost_zone objects to the patch_interp objects. // //***************************************************************************** @@ -308,41 +303,33 @@ public: // - // ***** set up ghost zone and frontier subobjects + // ***** set up ghost zones // public: // assert() that this ghost zone hasn't been set up yet, // then set it up as mirror-symmetry - // ... return reference to newly-set-up ghost zone object - symmetry_ghost_zone& create_mirror_symmetry_ghost_zone - (const patch_edge& edge); + void create_mirror_symmetry_ghost_zone(const patch_edge& edge); // assert() that this ghost zone hasn't been set up yet, // then set it up as periodic-symmetry - // ... return reference to newly-set-up ghost zone object - symmetry_ghost_zone& create_periodic_symmetry_ghost_zone + void create_periodic_symmetry_ghost_zone (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 - // ... but don't link it to the other patch's frontier - // (which doesn't exist yet) - // ... return reference to newly-set-up ghost zone object - interpatch_ghost_zone& create_interpatch_ghost_zone + // ... this only sets up ghost zone in skeletal form; use + // interpatch_ghost_zone::finish_setup() to complete + // the setup process + void create_interpatch_ghost_zone (const patch_edge& my_edge, const patch_edge& other_edge, int N_overlap_points); - // assert() that all ghost zones (and frontiers, where applicable) + // assert() that all ghost zones // are fully setup void assert_all_ghost_zones_fully_setup() const; - - // - // ***** access to ghost zone/frontier pointers ***** - // - private: // helper function for setup_*_ghost_zone(): // assert() that ghost zone pointer on specified edge is NULL @@ -350,39 +337,14 @@ private: // then assign new value to it void set_ghost_zone(const patch_edge& edge, ghost_zone* gzp); - // this function is used only by - // interpatch_ghost_zone::setup_other_patch_interp(): - // it assert() that the patch frontier pointer on the specified edge - // is NULL (i.e. that we haven't already setup this patch frontier), - // then assigns a new value to it - // - // ... this function is const since it doesn't alter this - // patch's gridfn values - // - // KLUDGE: - // ... this function should really be private, and - // interpatch_ghost_zone::setup_other_patch_interp(): - // be declared a friend of this class, but .cc files need - // to #include this header file ("patch.hh") before - // "ghost_zone.hh" to get inline functions properly inlined, - // so there's no clean way to make - // interpatch_ghost_zone::setup_other_patch_interp(): - // a friend here ==> we just make it public for now :( :( - // -public: - void set_patch_interp(const patch_edge& edge, - const patch_interp* pfp) - const; - // // ***** constructor, destructor, et al ***** // protected: // ... used only from derived classes - // ... doesn't set up ghost zone or frontier info, since this - // depends on knowing our neighbouring patches, which may - // not exist yet + // ... doesn't set up ghost zone info, since this depends on + // knowing our neighbouring patches, which might not exist yet patch(patch_system &my_patch_system_in, int patch_number_in, const char* name_in, bool is_plus_in, char ctype_in, local_coords::coords_set coords_set_rho_in, @@ -434,19 +396,6 @@ private: ghost_zone* max_rho_ghost_zone_; ghost_zone* min_sigma_ghost_zone_; ghost_zone* max_sigma_ghost_zone_; - - // frontiers (NULL pointers if no frontier for this ghost zone) - // ... pointers are set to NULL by ctor, - // reset for those cases where there *is* a frontier by - // set_patch_interp(), which is called by the *other* patch's - // interpatch_ghost_zone::setup_other_patch_interp() - // ... contrary to appearance, "mutable" here refers to the pointers, - // not to the patch_interp objects to which they point! - // - mutable const patch_interp* min_rho_patch_interp_; - mutable const patch_interp* max_rho_patch_interp_; - mutable const patch_interp* min_sigma_patch_interp_; - mutable const patch_interp* max_sigma_patch_interp_; }; //***************************************************************************** diff --git a/src/patch/patch_edge.hh b/src/patch/patch_edge.hh index 08e0127..df4fe22 100644 --- a/src/patch/patch_edge.hh +++ b/src/patch/patch_edge.hh @@ -28,7 +28,7 @@ // (perp,par) and (rho,sigma), etc. Every patch has (points to) 4 patch_edge // objects, one for each of the patch's sides. See the comments in // "patch.hh" for a "big picture" discussion of patches, patch edges, -// ghost zones, and patch frontiers. +// ghost zones, and patch interpolation regions. // // Note that since patch_edge has only const member functions // (and members!), a patch_edge object is effectively always const . @@ -173,7 +173,8 @@ public: // min/max/size ipar of the edge // (these are exteme limits for any iperp, a given ghost zone - // or frontier may have tighter and/or iperp-dependent limits) + // or interpolation region may have tighter and/or iperp-dependent + // limits) // ... not including corners int min_ipar_without_corners() const { return my_patch().min_iang(par_is_rho()); } diff --git a/src/patch/patch_interp.cc b/src/patch/patch_interp.cc index 15cdd7c..40261d5 100644 --- a/src/patch/patch_interp.cc +++ b/src/patch/patch_interp.cc @@ -28,8 +28,8 @@ using jtutil::error_exit; #include "fd_grid.hh" #include "patch.hh" #include "patch_edge.hh" -#include "ghost_zone.hh" #include "patch_interp.hh" +#include "ghost_zone.hh" //***************************************************************************** diff --git a/src/patch/patch_interp.hh b/src/patch/patch_interp.hh index e1044f4..1ec1ed0 100644 --- a/src/patch/patch_interp.hh +++ b/src/patch/patch_interp.hh @@ -107,9 +107,10 @@ private: public: // // Constructor arguments: - // my_edge_in = Identifies the patch/edge to which this frontier - // is to belong. - // [min,max]_iperp_in = The range of iperp for this frontier. + // my_edge_in = Identifies the patch/edge to which this + // interpolation region is to belong. + // [min,max]_iperp_in = The range of iperp for this interpolation + // region // [min,max]_parindex_in = Extreme [min,max] range of parindex // (for sizing (iperp,parindex) arrays etc). // [min,max]_parindex_used_in(iperp) @@ -122,9 +123,6 @@ public: // We keep a reference to the passed-in interp_par_in // array, so this should have a lifetime at last as long // as that of this object. - // ghosted_[min,max]_gfn = The largest ghosted_gfn range for this - // frontier; any given interpolate() call - // may specify a subrange. // interp_handle_in = Cactus handle to the interpolation operator. // interp_par_table_handle_in // = Cactus handle to a Cactus key/value table giving @@ -190,7 +188,7 @@ private: // giving parameters for the interpolation operator // ... this starts out as a copy of the passed-in table, // then gets extra stuff added to it specific to this - // frontier; it's shared across all iperp + // interpolation region; it's shared across all iperp // ... we own this table const int interp_par_table_handle_; diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc index 478d510..0a9a3c6 100644 --- a/src/patch/patch_system.cc +++ b/src/patch/patch_system.cc @@ -46,8 +46,8 @@ using jtutil::error_exit; #include "fd_grid.hh" #include "patch.hh" #include "patch_edge.hh" -#include "ghost_zone.hh" #include "patch_interp.hh" +#include "ghost_zone.hh" #include "patch_system.hh" #include "patch_system_info.hh" @@ -99,7 +99,7 @@ if (! jtutil::is_odd(N_overlap_points)) N_overlap_points); /*NOTREACHED*/ const int N_extend_points = N_overlap_points >> 1; -// construct/interlink the patches, ghost zones, and frontiers +// construct/interlink the patches and ghost zones switch (type_in) { case full_sphere_patch_system: @@ -185,8 +185,8 @@ delete gridfn_storage_; // of this patch system. This function also correctly sets // N_grid_points_ // N_ghosted_grid_points_ -// This function does *NOT* create any of the ghost zones or frontiers, -// and does *NOT* set up any gridfns. +// This function does *NOT* create any of the ghost zones, and does +// *NOT* set up any gridfns. // void patch_system::create_patches(const struct patch_info patch_info_in[], int N_ghost_points, int N_extend_points, @@ -277,8 +277,7 @@ ghosted_N_grid_points_ = 0; // The creation of patches is done in several phases: first the patches // are constructed with no gridfn storage, then we are called to set up // the gridfn storage (taking into account the sizes of the other patches), -// then finally ghost zones and patch frontiers are constructed and -// interlinked. +// then finally ghost zones are constructed and interlinked. // // FIXME: We should pad the gridfn storage as necessary to avoid cache // conflicts, but we don't do this at present. @@ -419,8 +418,8 @@ const patch& plast = ith_patch(N_patches()-1); //****************************************************************************** // -// This function constructs and interlinks the ghost zones and patch -// frontiers for a full-sphere patch system. +// This function constructs and interlinks the ghost zones for a +// full-sphere patch system. // void patch_system::interlink_full_sphere_patch_system (int N_overlap_points, @@ -450,7 +449,7 @@ create_interpatch_ghost_zones(mz, py, N_overlap_points); create_interpatch_ghost_zones(mz, mx, N_overlap_points); create_interpatch_ghost_zones(mz, my, N_overlap_points); -// finish setting up the interpatch ghost zones and patch frontiers +// finish setting up the interpatch ghost zones CCTK_VInfo(CCTK_THORNSTRING, " finishing interpatch setup"); finish_interpatch_setup(pz, px, N_overlap_points, @@ -495,8 +494,8 @@ assert_all_ghost_zones_fully_setup(); //****************************************************************************** // -// This function constructs and interlinks the ghost zones and patch -// frontiers for a +z hemisphere patch system. +// This function constructs and interlinks the ghost zones for a +// +z hemisphere patch system. // void patch_system::interlink_plus_z_hemisphere_patch_system (int N_overlap_points, @@ -525,7 +524,7 @@ py.create_mirror_symmetry_ghost_zone(py.max_rho_patch_edge()); mx.create_mirror_symmetry_ghost_zone(mx.min_rho_patch_edge()); my.create_mirror_symmetry_ghost_zone(my.min_rho_patch_edge()); -// finish setting up the interpatch ghost zones and patch frontiers +// finish setting up the interpatch ghost zones CCTK_VInfo(CCTK_THORNSTRING, " finishing interpatch setup"); finish_interpatch_setup(pz, px, N_overlap_points, @@ -558,8 +557,8 @@ assert_all_ghost_zones_fully_setup(); //****************************************************************************** // -// This function constructs and interlinks the ghost zones and patch -// frontiers for a +xy quadrant patch system. +// This function constructs and interlinks the ghost zones for a +// +xy quadrant patch system. // void patch_system::interlink_plus_xy_quadrant_patch_system (int N_overlap_points, @@ -589,7 +588,7 @@ create_periodic_symmetry_ghost_zones(mz.max_rho_patch_edge(), mz.max_sigma_patch_edge(), true); -// finish setting up the interpatch ghost zones and patch frontiers +// finish setting up the interpatch ghost zones CCTK_VInfo(CCTK_THORNSTRING, " finishing interpatch setup"); finish_interpatch_setup(pz, px, N_overlap_points, @@ -613,8 +612,8 @@ assert_all_ghost_zones_fully_setup(); //****************************************************************************** // -// This function constructs and interlinks the ghost zones and patch -// frontiers for a +xz quadrant patch system. +// This function constructs and interlinks the ghost zones for a +// +xz quadrant patch system. // void patch_system::interlink_plus_xz_quadrant_patch_system (int N_overlap_points, @@ -644,7 +643,7 @@ create_periodic_symmetry_ghost_zones(py.max_sigma_patch_edge(), my.min_sigma_patch_edge(), false); -// finish setting up the interpatch ghost zones and patch frontiers +// finish setting up the interpatch ghost zones CCTK_VInfo(CCTK_THORNSTRING, " finishing interpatch setup"); finish_interpatch_setup(pz, px, N_overlap_points, @@ -668,8 +667,8 @@ assert_all_ghost_zones_fully_setup(); //****************************************************************************** // -// This function constructs and interlinks the ghost zones and patch -// frontiers for a +xyz octant patch system. +// This function constructs and interlinks the ghost zones for a +// +xyz octant patch system. // void patch_system::interlink_plus_xyz_octant_patch_system (int N_overlap_points, @@ -695,7 +694,7 @@ create_periodic_symmetry_ghost_zones(px.min_sigma_patch_edge(), py.max_sigma_patch_edge(), true); -// finish setting up the interpatch ghost zones and patch frontiers +// finish setting up the interpatch ghost zones CCTK_VInfo(CCTK_THORNSTRING, " finishing interpatch setup"); finish_interpatch_setup(pz, px, N_overlap_points, @@ -722,7 +721,8 @@ assert_all_ghost_zones_fully_setup(); (const patch_edge& ex, const patch_edge& ey, bool ipar_map_is_plus) { -ex.my_patch().create_periodic_symmetry_ghost_zone(ex, ey, ipar_map_is_plus); +ex.my_patch() + .create_periodic_symmetry_ghost_zone(ex, ey, ipar_map_is_plus); if (ex == ey) then { @@ -730,8 +730,8 @@ if (ex == ey) // back to itself), so we only want to set up the edge once // ==> no-op here } - else ey.my_patch().create_periodic_symmetry_ghost_zone(ey, ex, - ipar_map_is_plus); + else ey.my_patch() + .create_periodic_symmetry_ghost_zone(ey, ex, ipar_map_is_plus); } //****************************************************************************** @@ -756,8 +756,7 @@ py.create_interpatch_ghost_zone(ey, ex, N_overlap_points); // // This function automagically figures out which edges of two adjacent -// patches are adjacent, then finishes setting up both ghost zones and -// sets up the corresponding patch frontiers. +// patches are adjacent, then finishes setting up both ghost zones. // //static void patch_system::finish_interpatch_setup @@ -776,8 +775,8 @@ py.interpatch_ghost_zone_on_edge(ey) //****************************************************************************** // -// This function assert()s that all ghost zones (and frontiers, where -// applicable) of all patches have been fully set up. +// This function assert()s that all ghost zones of all patches have +// been fully set up. // void patch_system::assert_all_ghost_zones_fully_setup() const { diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh index f89f9e1..cedfe7c 100644 --- a/src/patch/patch_system.hh +++ b/src/patch/patch_system.hh @@ -163,7 +163,7 @@ public: private: // construct patches as described by patch_info[] array, // and link them into the patch system - // does *NOT* create ghost zones or frontiers + // does *NOT* create ghost zones // does *NOT* set up gridfns void create_patches(const struct patch_info patch_info_in[], int N_ghost_points, int N_extend_points, @@ -174,7 +174,7 @@ private: (int min_gfn_in, int max_gfn_in, int ghosted_min_gfn_in, int ghosted_max_gfn_in); - // create/interlink ghost zones and frontiers + // create/interlink ghost zones void interlink_full_sphere_patch_system (int N_overlap_points, int interp_handle, int interp_par_table_handle); @@ -203,8 +203,7 @@ private: void create_interpatch_ghost_zones(patch &px, patch &py, int N_overlap_points); - // finish setup of a pair of interpatch ghost zones, - // setup the corresponding patch frontiers + // finish setup of a pair of interpatch ghost zones // ... automagically figures out which edges are adjacent static void finish_interpatch_setup @@ -212,8 +211,7 @@ private: int N_overlap_points, int interp_handle, int interp_par_table_handle); - // assert() that all ghost zones (and frontiers, where applicable) - // of all patches are fully setup + // assert() that all ghost zones of all patches are fully setup void assert_all_ghost_zones_fully_setup() const; private: diff --git a/src/patch/test_patch_system.cc b/src/patch/test_patch_system.cc index be4720c..3a9ee4c 100644 --- a/src/patch/test_patch_system.cc +++ b/src/patch/test_patch_system.cc @@ -46,8 +46,8 @@ using jtutil::error_exit; #include "fd_grid.hh" #include "patch.hh" #include "patch_edge.hh" -#include "ghost_zone.hh" #include "patch_interp.hh" +#include "ghost_zone.hh" #include "patch_system.hh" //****************************************************************************** |