aboutsummaryrefslogtreecommitdiff
path: root/src/patch/patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-08 14:48:47 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-08 14:48:47 +0000
commit4337542a085f69ad013654b44d707142a043ddd5 (patch)
tree581e08744e4f59fea535aeacd25a6e4d365de9e1 /src/patch/patch_system.cc
parent9fcd9cbadfc7aca474f98c358b4dba85a9740456 (diff)
move a bunch of logic out of interpatch_ghost_zone::interpatch_ghost_zone()
down into interpatch_ghost_zone::finish_setup() since it needs to look at types of adjacent-side ghost zones, also rename a bunch of other patch-system-setup logic git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@466 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/patch_system.cc')
-rw-r--r--src/patch/patch_system.cc442
1 files changed, 223 insertions, 219 deletions
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index c904c64..43172c4 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -3,15 +3,15 @@
//
// patch_system::patch_system
// patch_system::~patch_system
-// patch_system::construct_patches
+// patch_system::create_patches
// patch_system::setup_gridfn_storage
// patch_system::setup_full_sphere_patch_system
// patch_system::setup_plus_z_hemisphere_patch_system
// patch_system::setup_plus_xy_quadrant_patch_system
// patch_system::setup_plus_xz_quadrant_patch_system
// patch_system::setup_octant_patch_system
-// patch_system::setup_adjacent_ghost_zones
-// patch_system::setup_adjacent_patch_frontiers
+// patch_system::create_interpatch_ghost_zones
+// patch_system::finish_interpatch_setup
// patch_system::assert_all_ghost_zones_fully_setup
//
// patch_system::N_patches_of_type
@@ -102,9 +102,9 @@ const int N_extend_points = N_overlap_points >> 1;
switch (type_in)
{
case full_sphere_patch_system:
- construct_patches(patch_system_info::full_sphere::patch_info_array,
- N_ghost_points, N_extend_points,
- delta_drho_dsigma);
+ create_patches(patch_system_info::full_sphere::patch_info_array,
+ N_ghost_points, N_extend_points,
+ delta_drho_dsigma);
setup_gridfn_storage(min_gfn_in, max_gfn_in,
ghosted_min_gfn_in, ghosted_max_gfn_in);
interlink_full_sphere_patch_system(N_overlap_points,
@@ -112,10 +112,9 @@ case full_sphere_patch_system:
interp_par_table_handle);
break;
case plus_z_hemisphere_patch_system:
- construct_patches(patch_system_info::plus_z_hemisphere
- ::patch_info_array,
- N_ghost_points, N_extend_points,
- delta_drho_dsigma);
+ create_patches(patch_system_info::plus_z_hemisphere::patch_info_array,
+ N_ghost_points, N_extend_points,
+ delta_drho_dsigma);
setup_gridfn_storage(min_gfn_in, max_gfn_in,
ghosted_min_gfn_in, ghosted_max_gfn_in);
interlink_plus_z_hemisphere_patch_system(N_overlap_points,
@@ -123,9 +122,9 @@ case plus_z_hemisphere_patch_system:
interp_par_table_handle);
break;
case plus_xy_quadrant_patch_system:
- construct_patches(patch_system_info::plus_xy_quadrant::patch_info_array,
- N_ghost_points, N_extend_points,
- delta_drho_dsigma);
+ create_patches(patch_system_info::plus_xy_quadrant::patch_info_array,
+ N_ghost_points, N_extend_points,
+ delta_drho_dsigma);
setup_gridfn_storage(min_gfn_in, max_gfn_in,
ghosted_min_gfn_in, ghosted_max_gfn_in);
interlink_plus_xy_quadrant_patch_system(N_overlap_points,
@@ -133,9 +132,9 @@ case plus_xy_quadrant_patch_system:
interp_par_table_handle);
break;
case plus_xz_quadrant_patch_system:
- construct_patches(patch_system_info::plus_xz_quadrant::patch_info_array,
- N_ghost_points, N_extend_points,
- delta_drho_dsigma);
+ create_patches(patch_system_info::plus_xz_quadrant::patch_info_array,
+ N_ghost_points, N_extend_points,
+ delta_drho_dsigma);
setup_gridfn_storage(min_gfn_in, max_gfn_in,
ghosted_min_gfn_in, ghosted_max_gfn_in);
interlink_plus_xz_quadrant_patch_system(N_overlap_points,
@@ -143,9 +142,9 @@ case plus_xz_quadrant_patch_system:
interp_par_table_handle);
break;
case plus_xyz_octant_patch_system:
- construct_patches(patch_system_info::plus_xyz_octant::patch_info_array,
- N_ghost_points, N_extend_points,
- delta_drho_dsigma);
+ create_patches(patch_system_info::plus_xyz_octant::patch_info_array,
+ N_ghost_points, N_extend_points,
+ delta_drho_dsigma);
setup_gridfn_storage(min_gfn_in, max_gfn_in,
ghosted_min_gfn_in, ghosted_max_gfn_in);
interlink_plus_xyz_octant_patch_system(N_overlap_points,
@@ -188,9 +187,9 @@ delete gridfn_storage_;
// This function does *NOT* create any of the ghost zones or frontiers,
// and does *NOT* set up any gridfns.
//
-void patch_system::construct_patches(const struct patch_info patch_info_in[],
- int N_ghost_points, int N_extend_points,
- fp delta_drho_dsigma)
+void patch_system::create_patches(const struct patch_info patch_info_in[],
+ int N_ghost_points, int N_extend_points,
+ fp delta_drho_dsigma)
{
CCTK_VInfo(CCTK_THORNSTRING,
"constructing %s patch system",
@@ -237,7 +236,7 @@ ghosted_N_grid_points_ = 0;
break;
default:
error_exit(ERROR_EXIT,
-"***** patch_system::construct_patches():\n"
+"***** patch_system::create_patches():\n"
" unknown patch_info_in[pn=%d].ctype=0x%02d='%c'!\n"
,
pn, pi.ctype, pi.ctype); /*NOTREACHED*/
@@ -436,58 +435,59 @@ patch& my = ith_patch(patch_number_of_name("-y"));
patch& mz = ith_patch(patch_number_of_name("-z"));
// create the ghost zones
-CCTK_VInfo(CCTK_THORNSTRING, " setting up ghost zones");
-setup_adjacent_ghost_zones(pz, px, N_overlap_points);
-setup_adjacent_ghost_zones(pz, py, N_overlap_points);
-setup_adjacent_ghost_zones(pz, mx, N_overlap_points);
-setup_adjacent_ghost_zones(pz, my, N_overlap_points);
-setup_adjacent_ghost_zones(px, py, N_overlap_points);
-setup_adjacent_ghost_zones(py, mx, N_overlap_points);
-setup_adjacent_ghost_zones(mx, my, N_overlap_points);
-setup_adjacent_ghost_zones(my, px, N_overlap_points);
-setup_adjacent_ghost_zones(mz, px, N_overlap_points);
-setup_adjacent_ghost_zones(mz, py, N_overlap_points);
-setup_adjacent_ghost_zones(mz, mx, N_overlap_points);
-setup_adjacent_ghost_zones(mz, my, N_overlap_points);
-
-// create the patch frontiers
-CCTK_VInfo(CCTK_THORNSTRING, " setting up patch frontiers");
-setup_adjacent_patch_frontiers(pz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, mx,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(py, mx,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mx, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(my, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, mx,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
+CCTK_VInfo(CCTK_THORNSTRING, " creating ghost zones");
+create_interpatch_ghost_zones(pz, px, N_overlap_points);
+create_interpatch_ghost_zones(pz, py, N_overlap_points);
+create_interpatch_ghost_zones(pz, mx, N_overlap_points);
+create_interpatch_ghost_zones(pz, my, N_overlap_points);
+create_interpatch_ghost_zones(px, py, N_overlap_points);
+create_interpatch_ghost_zones(py, mx, N_overlap_points);
+create_interpatch_ghost_zones(mx, my, N_overlap_points);
+create_interpatch_ghost_zones(my, px, N_overlap_points);
+create_interpatch_ghost_zones(mz, px, N_overlap_points);
+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
+CCTK_VInfo(CCTK_THORNSTRING,
+ " finishing setting up interpatch ghost zones + patch frontiers");
+finish_interpatch_setup(pz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, mx,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(py, mx,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mx, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(my, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, mx,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
assert_all_ghost_zones_fully_setup();
}
@@ -511,46 +511,47 @@ patch& mx = ith_patch(patch_number_of_name("-x"));
patch& my = ith_patch(patch_number_of_name("-y"));
// create the ghost zones
-CCTK_VInfo(CCTK_THORNSTRING, " setting up ghost zones");
-setup_adjacent_ghost_zones(pz, px, N_overlap_points);
-setup_adjacent_ghost_zones(pz, py, N_overlap_points);
-setup_adjacent_ghost_zones(pz, mx, N_overlap_points);
-setup_adjacent_ghost_zones(pz, my, N_overlap_points);
-setup_adjacent_ghost_zones(px, py, N_overlap_points);
-setup_adjacent_ghost_zones(py, mx, N_overlap_points);
-setup_adjacent_ghost_zones(mx, my, N_overlap_points);
-setup_adjacent_ghost_zones(my, px, N_overlap_points);
-px.setup_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
-py.setup_mirror_symmetry_ghost_zone(py.max_rho_patch_edge());
-mx.setup_mirror_symmetry_ghost_zone(mx.min_rho_patch_edge());
-my.setup_mirror_symmetry_ghost_zone(my.min_rho_patch_edge());
-
-// create the patch frontiers
-CCTK_VInfo(CCTK_THORNSTRING, " setting up patch frontiers");
-setup_adjacent_patch_frontiers(pz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, mx,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(py, mx,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mx, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(my, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
+CCTK_VInfo(CCTK_THORNSTRING, " creating ghost zones");
+create_interpatch_ghost_zones(pz, px, N_overlap_points);
+create_interpatch_ghost_zones(pz, py, N_overlap_points);
+create_interpatch_ghost_zones(pz, mx, N_overlap_points);
+create_interpatch_ghost_zones(pz, my, N_overlap_points);
+create_interpatch_ghost_zones(px, py, N_overlap_points);
+create_interpatch_ghost_zones(py, mx, N_overlap_points);
+create_interpatch_ghost_zones(mx, my, N_overlap_points);
+create_interpatch_ghost_zones(my, px, N_overlap_points);
+px.create_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
+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
+CCTK_VInfo(CCTK_THORNSTRING,
+ " finishing setting up interpatch ghost zones + patch frontiers");
+finish_interpatch_setup(pz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, mx,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(py, mx,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mx, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(my, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
assert_all_ghost_zones_fully_setup();
}
@@ -573,39 +574,40 @@ patch& py = ith_patch(patch_number_of_name("+y"));
patch& mz = ith_patch(patch_number_of_name("-z"));
// create the ghost zones
-CCTK_VInfo(CCTK_THORNSTRING, " setting up ghost zones");
-setup_adjacent_ghost_zones(pz, px, N_overlap_points);
-setup_adjacent_ghost_zones(pz, py, N_overlap_points);
-setup_adjacent_ghost_zones(px, py, N_overlap_points);
-setup_adjacent_ghost_zones(mz, px, N_overlap_points);
-setup_adjacent_ghost_zones(mz, py, N_overlap_points);
-setup_periodic_symmetry_ghost_zones(pz.min_rho_patch_edge(),
- pz.min_sigma_patch_edge(),
- true);
-setup_periodic_symmetry_ghost_zones(px.min_sigma_patch_edge(),
- py.max_sigma_patch_edge(),
- true);
-setup_periodic_symmetry_ghost_zones(mz.max_rho_patch_edge(),
- mz.max_sigma_patch_edge(),
- true);
-
-// create the patch frontiers
-CCTK_VInfo(CCTK_THORNSTRING, " setting up patch frontiers");
-setup_adjacent_patch_frontiers(pz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(mz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
+CCTK_VInfo(CCTK_THORNSTRING, " creating ghost zones");
+create_interpatch_ghost_zones(pz, px, N_overlap_points);
+create_interpatch_ghost_zones(pz, py, N_overlap_points);
+create_interpatch_ghost_zones(px, py, N_overlap_points);
+create_interpatch_ghost_zones(mz, px, N_overlap_points);
+create_interpatch_ghost_zones(mz, py, N_overlap_points);
+create_periodic_symmetry_ghost_zones(pz.min_rho_patch_edge(),
+ pz.min_sigma_patch_edge(),
+ true);
+create_periodic_symmetry_ghost_zones(px.min_sigma_patch_edge(),
+ py.max_sigma_patch_edge(),
+ true);
+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
+CCTK_VInfo(CCTK_THORNSTRING,
+ " finishing setting up interpatch ghost zones + patch frontiers");
+finish_interpatch_setup(pz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(mz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
assert_all_ghost_zones_fully_setup();
}
@@ -628,39 +630,40 @@ patch& py = ith_patch(patch_number_of_name("+y"));
patch& my = ith_patch(patch_number_of_name("-y"));
// create the ghost zones
-CCTK_VInfo(CCTK_THORNSTRING, " setting up ghost zones");
-setup_adjacent_ghost_zones(pz, px, N_overlap_points);
-setup_adjacent_ghost_zones(pz, py, N_overlap_points);
-setup_adjacent_ghost_zones(pz, my, N_overlap_points);
-setup_adjacent_ghost_zones(px, py, N_overlap_points);
-setup_adjacent_ghost_zones(px, my, N_overlap_points);
-px.setup_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
-py.setup_mirror_symmetry_ghost_zone(py.max_rho_patch_edge());
-my.setup_mirror_symmetry_ghost_zone(my.min_rho_patch_edge());
-setup_periodic_symmetry_ghost_zones(pz.min_sigma_patch_edge(),
- pz.min_sigma_patch_edge(),
- false);
-setup_periodic_symmetry_ghost_zones(py.max_sigma_patch_edge(),
- my.min_sigma_patch_edge(),
- false);
-
-// create the patch frontiers
-CCTK_VInfo(CCTK_THORNSTRING, " setting up patch frontiers");
-setup_adjacent_patch_frontiers(pz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, my,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
+CCTK_VInfo(CCTK_THORNSTRING, " creating ghost zones");
+create_interpatch_ghost_zones(pz, px, N_overlap_points);
+create_interpatch_ghost_zones(pz, py, N_overlap_points);
+create_interpatch_ghost_zones(pz, my, N_overlap_points);
+create_interpatch_ghost_zones(px, py, N_overlap_points);
+create_interpatch_ghost_zones(px, my, N_overlap_points);
+px.create_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
+py.create_mirror_symmetry_ghost_zone(py.max_rho_patch_edge());
+my.create_mirror_symmetry_ghost_zone(my.min_rho_patch_edge());
+create_periodic_symmetry_ghost_zones(pz.min_sigma_patch_edge(),
+ pz.min_sigma_patch_edge(),
+ false);
+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
+CCTK_VInfo(CCTK_THORNSTRING,
+ " finishing setting up interpatch ghost zones + patch frontiers");
+finish_interpatch_setup(pz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, my,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
assert_all_ghost_zones_fully_setup();
}
@@ -682,30 +685,31 @@ patch& px = ith_patch(patch_number_of_name("+x"));
patch& py = ith_patch(patch_number_of_name("+y"));
// create the ghost zones
-CCTK_VInfo(CCTK_THORNSTRING, " setting up ghost zones");
-setup_adjacent_ghost_zones(pz, px, N_overlap_points);
-setup_adjacent_ghost_zones(pz, py, N_overlap_points);
-setup_adjacent_ghost_zones(px, py, N_overlap_points);
-px.setup_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
-py.setup_mirror_symmetry_ghost_zone(py.max_rho_patch_edge());
-setup_periodic_symmetry_ghost_zones(pz.min_rho_patch_edge(),
- pz.min_sigma_patch_edge(),
- true);
-setup_periodic_symmetry_ghost_zones(px.min_sigma_patch_edge(),
- py.max_sigma_patch_edge(),
- true);
-
-// create the patch frontiers
-CCTK_VInfo(CCTK_THORNSTRING, " setting up patch frontiers");
-setup_adjacent_patch_frontiers(pz, px,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(pz, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
-setup_adjacent_patch_frontiers(px, py,
- N_overlap_points,
- interp_handle, interp_par_table_handle);
+CCTK_VInfo(CCTK_THORNSTRING, " creating ghost zones");
+create_interpatch_ghost_zones(pz, px, N_overlap_points);
+create_interpatch_ghost_zones(pz, py, N_overlap_points);
+create_interpatch_ghost_zones(px, py, N_overlap_points);
+px.create_mirror_symmetry_ghost_zone(px.max_rho_patch_edge());
+py.create_mirror_symmetry_ghost_zone(py.max_rho_patch_edge());
+create_periodic_symmetry_ghost_zones(pz.min_rho_patch_edge(),
+ pz.min_sigma_patch_edge(),
+ true);
+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
+CCTK_VInfo(CCTK_THORNSTRING,
+ " finishing setting up interpatch ghost zones + patch frontiers");
+finish_interpatch_setup(pz, px,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(pz, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
+finish_interpatch_setup(px, py,
+ N_overlap_points,
+ interp_handle, interp_par_table_handle);
assert_all_ghost_zones_fully_setup();
}
@@ -718,11 +722,11 @@ assert_all_ghost_zones_fully_setup();
// This function creates a pair of periodic-symmetry ghost zones.
//
//static
- void patch_system::setup_periodic_symmetry_ghost_zones
+ void patch_system::create_periodic_symmetry_ghost_zones
(const patch_edge& ex, const patch_edge& ey,
bool ipar_map_is_plus)
{
-ex.my_patch().setup_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,7 +734,7 @@ if (ex == ey)
// back to itself), so we only want to set up the edge once
// ==> no-op here
}
- else ey.my_patch().setup_periodic_symmetry_ghost_zone(ey, ex,
+ else ey.my_patch().create_periodic_symmetry_ghost_zone(ey, ex,
ipar_map_is_plus);
}
@@ -738,29 +742,29 @@ if (ex == ey)
//
// This function automagically figures out which edges of two adjacent
-// patches are adjacent, then sets up both patches' ghost zones on those
-// edges.
+// patches are adjacent, then creates both patches' ghost zones on those
+// edges and interlinks them with their respective patches.
//
//static
- void patch_system::setup_adjacent_ghost_zones(patch &px, patch &py,
- int N_overlap_points)
+ void patch_system::create_interpatch_ghost_zones(patch &px, patch &py,
+ int N_overlap_points)
{
const patch_edge& ex = px.edge_adjacent_to_patch(py, N_overlap_points);
const patch_edge& ey = py.edge_adjacent_to_patch(px, N_overlap_points);
-px.setup_interpatch_ghost_zone(ex, ey, N_overlap_points);
-py.setup_interpatch_ghost_zone(ey, ex, N_overlap_points);
+px.create_interpatch_ghost_zone(ex, ey, N_overlap_points);
+py.create_interpatch_ghost_zone(ey, ex, N_overlap_points);
}
//******************************************************************************
//
// This function automagically figures out which edges of two adjacent
-// patches are adjacent, then sets up the appropriate pair of patch
-// frontiers and interlinks them with their ghost zones and patches.
+// patches are adjacent, then finishes setting up both ghost zones and
+// sets up the corresponding patch frontiers.
//
//static
- void patch_system::setup_adjacent_patch_frontiers
+ void patch_system::finish_interpatch_setup
(patch &px, patch &py,
int N_overlap_points,
int interp_handle, int interp_par_table_handle)
@@ -768,9 +772,9 @@ py.setup_interpatch_ghost_zone(ey, ex, N_overlap_points);
const patch_edge& ex = px.edge_adjacent_to_patch(py, N_overlap_points);
const patch_edge& ey = py.edge_adjacent_to_patch(px, N_overlap_points);
px.interpatch_ghost_zone_on_edge(ex)
- .setup_other_patch_frontier(interp_handle, interp_par_table_handle);
+ .finish_setup(interp_handle, interp_par_table_handle);
py.interpatch_ghost_zone_on_edge(ey)
- .setup_other_patch_frontier(interp_handle, interp_par_table_handle);
+ .finish_setup(interp_handle, interp_par_table_handle);
}
//******************************************************************************