aboutsummaryrefslogtreecommitdiff
path: root/src/patch/ghost_zone.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-16 18:46:19 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-07-16 18:46:19 +0000
commita6568bd7750d7a7c3b5ffbb5ac12d8aa061f18c9 (patch)
tree45a346911bfdf4b74f1192276f7566d155aecf83 /src/patch/ghost_zone.cc
parentac62c6e45f5d1d716156e8dccfdd0529fb348a90 (diff)
add
patch_edge::ipar_is_in_selected_corner() and change symmetry_ghost_zone::setup_scalar_gridfn_in_ghost_zone() interpatch_ghost_zone::setup_scalar_gridfn_in_ghost_zone() to use this git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@198 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/ghost_zone.cc')
-rw-r--r--src/patch/ghost_zone.cc36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc
index 3604cbe..d39ca87 100644
--- a/src/patch/ghost_zone.cc
+++ b/src/patch/ghost_zone.cc
@@ -22,6 +22,7 @@
#include "jt/array.hh"
#include "jt/cpm_map.hh"
#include "jt/linear_map.hh"
+#include "jt/interpolate.hh"
using jtutil::error_exit;
@@ -32,6 +33,7 @@ using jtutil::error_exit;
#include "patch.hh"
#include "patch_edge.hh"
#include "ghost_zone.hh"
+#include "patch_frontier.hh"
//******************************************************************************
//******************************************************************************
@@ -63,7 +65,7 @@ symmetry_ghost_zone::symmetry_ghost_zone
(const patch_edge& my_edge_in, const patch_edge& symmetry_edge_in,
int my_edge_sample_ipar, int symmetry_edge_sample_ipar,
bool ipar_map_sign)
- : ghost_zone(my_edge_in, ghost_zone_is_interpatch),
+ : ghost_zone(my_edge_in, ghost_zone_is_symmetry),
symmetry_patch_(symmetry_edge_in.my_patch()),
symmetry_edge_(symmetry_edge_in)
{
@@ -137,14 +139,12 @@ void symmetry_ghost_zone::setup_scalar_gridfn_in_ghost_zone
{
for (int ipar = min_ipar(iperp) ; ipar <= max_ipar(iperp) ; ++ipar)
{
- // are we supposed to do this point?
- if ( (want_min_par_corner && ipar_is_in_min_ipar_corner(ipar))
- || (want_non_corner && ipar_is_in_non_corner(ipar))
- || (want_max_par_corner && ipar_is_in_max_ipar_corner(ipar)) )
- then {
- // we want to do this point ==> nop here
- }
- else continue; // *** LOOP CONTROL ***
+ // do we want to do this point?
+ if (! my_edge().ipar_is_in_selected_corner(want_min_par_corner,
+ want_non_corner,
+ want_max_par_corner,
+ ipar) )
+ then continue; // *** LOOP CONTROL ***
const int sym_iperp = iperp_map_of_iperp(iperp);
const int sym_ipar = ipar_map_of_ipar (ipar );
@@ -170,7 +170,7 @@ void symmetry_ghost_zone::setup_scalar_gridfn_in_ghost_zone
//
interpatch_ghost_zone::interpatch_ghost_zone(const patch_edge& my_edge_in,
const patch_edge& other_edge_in)
- : ghost_zone(my_edge_in),
+ : ghost_zone(my_edge_in, ghost_zone_is_interpatch),
other_patch_(other_edge_in.my_patch()),
other_edge_(other_edge_in),
other_frontier_(NULL) // other frontier object
@@ -240,7 +240,7 @@ if (fuzzy<fp>::NE(my_edge().grid_outer_perp(), other_edge().grid_outer_perp()))
my_patch().name(), my_edge().name(),
other_patch().name(), other_edge().name(),
double(my_edge().grid_outer_perp()),
- double(other_edge.grid_outer_perp())); /*NOTREACHED*/
+ double(other_edge().grid_outer_perp())); /*NOTREACHED*/
//
@@ -358,14 +358,12 @@ other_frontier_->setup_interpolation_for_gridfn(gfn);
{
for (int ipar = min_ipar(iperp) ; ipar <= max_ipar(iperp) ; ++ipar)
{
- // are we supposed to do this point?
- if ( (want_min_par_corner && ipar_is_in_min_ipar_corner(ipar))
- || (want_non_corner && ipar_is_in_non_corner(ipar))
- || (want_max_par_corner && ipar_is_in_max_ipar_corner(ipar)) )
- then {
- // we want to do this point ==> nop here
- }
- else continue; // *** LOOP CONTROL ***
+ // do we want to do this point?
+ if (! my_edge().ipar_is_in_selected_corner(want_min_par_corner,
+ want_non_corner,
+ want_max_par_corner,
+ ipar) )
+ then continue; // *** LOOP CONTROL ***
int oiperp = (*other_iperp_)(iperp);
fp opar = (*other_par_)(iperp,ipar);