aboutsummaryrefslogtreecommitdiff
path: root/src/patch/patch_system.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-01-20 14:06:09 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-01-20 14:06:09 +0000
commit35079e073713b651e01c9356be4e68d7cf9dcfbf (patch)
treea69cf79a0b049a399b052ebbc1e7f041fdd5b688 /src/patch/patch_system.cc
parent90a048616eccf03ea3ba1ff48f3548139a9a4bf3 (diff)
simplify logic in patch_system::create_patches()
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@928 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/patch_system.cc')
-rw-r--r--src/patch/patch_system.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc
index e6d729f..7c7192d 100644
--- a/src/patch/patch_system.cc
+++ b/src/patch/patch_system.cc
@@ -315,6 +315,13 @@ ghosted_N_grid_points_ = 0;
for (int pn = 0 ; pn < N_patches() ; ++pn)
{
const struct patch_info& pi = patch_info_in[pn];
+ const struct grid::grid_array_pars& grid_array_pars
+ = pi.grid_array_pars(ghost_zone_width,
+ patch_extend_width,
+ N_zones_per_right_angle);
+ const struct grid::grid_pars& grid_pars
+ = pi.grid_pars(patch_extend_width,
+ N_zones_per_right_angle);
if (print_msg_flag)
then CCTK_VInfo(CCTK_THORNSTRING,
@@ -327,29 +334,17 @@ ghosted_N_grid_points_ = 0;
case 'z':
p = new z_patch(*this, pn,
pi.name, pi.is_plus,
- pi.grid_array_pars(ghost_zone_width,
- patch_extend_width,
- N_zones_per_right_angle),
- pi.grid_pars(patch_extend_width,
- N_zones_per_right_angle));
+ grid_array_pars, grid_pars);
break;
case 'x':
p = new x_patch(*this, pn,
pi.name, pi.is_plus,
- pi.grid_array_pars(ghost_zone_width,
- patch_extend_width,
- N_zones_per_right_angle),
- pi.grid_pars(patch_extend_width,
- N_zones_per_right_angle));
+ grid_array_pars, grid_pars);
break;
case 'y':
p = new y_patch(*this, pn,
pi.name, pi.is_plus,
- pi.grid_array_pars(ghost_zone_width,
- patch_extend_width,
- N_zones_per_right_angle),
- pi.grid_pars(patch_extend_width,
- N_zones_per_right_angle));
+ grid_array_pars, grid_pars);
break;
default:
error_exit(ERROR_EXIT,