diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-03-29 17:42:42 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-03-29 17:42:42 +0000 |
commit | 191eb838746fcf9a478fb92ae10c07e51fc3f2a8 (patch) | |
tree | e5db93e8e3c1ad7afe7be6ad98d1d615fcff85ec /src/patch/ghost_zone.cc | |
parent | 0754c62dbcc06a9f424b7eb5c18fc75b7fe1c6ee (diff) |
change symmetry_ghost_zone to new synchronize() API
just getting started on interpatch_ghost_zone::
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@399 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/ghost_zone.cc')
-rw-r--r-- | src/patch/ghost_zone.cc | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/src/patch/ghost_zone.cc b/src/patch/ghost_zone.cc index 561ab15..8aeb16d 100644 --- a/src/patch/ghost_zone.cc +++ b/src/patch/ghost_zone.cc @@ -5,12 +5,12 @@ // symmetry_ghost_zone::symmetry_ghost_zone (mirror symmetry) // symmetry_ghost_zone::symmetry_ghost_zone (periodic BC) // symmetry_ghost_zone::~symmetry_ghost_zone -// symmetry_ghost_zone::extend_scalar_gridfn_to_ghost_zone +// symmetry_ghost_zone::synchronize // // interpatch_ghost_zone::interpatch_ghost_zone // interpatch_ghost_zone::~interpatch_ghost_zone // interpatch_ghost_zone::assert_fully_setup -// interpatch_ghost_zone::extend_scalar_gridfn_to_ghost_zone +// interpatch_ghost_zone::synchronize // #include <stdio.h> @@ -108,21 +108,19 @@ delete iperp_map_; //****************************************************************************** // -// This function symmetry-maps a scalar gridfn in a specified part -// of the ghost zone. +// This function "synchronizes" a ghost zone, i.e. it updates the +// ghost-zone values of the specified gridfns via the appropriate +// symmetry operations.The flags specify which part(s) of the ghost zone +// we want. // -// N.b. "scalar" here refers solely to the symmetry properties of the -// gridfn under the ghost zone's "const +/-" coordinate transformations; -// it need not be an actual scalar under more general coordinate -// transformations. -// -void symmetry_ghost_zone::extend_scalar_gridfn_to_ghost_zone - (int gfn, - bool want_min_par_corner, - bool want_non_corner, - bool want_max_par_corner) +void symmetry_ghost_zone::synchronize(int ghosted_min_gfn, int ghosted_max_gfn, + bool want_min_par_corner, + bool want_non_corner, + bool want_max_par_corner) const { + for (int gfn = ghosted_min_gfn ; gfn <= ghosted_max_gfn ; ++gfn) + { for (int iperp = min_iperp() ; iperp <= max_iperp() ; ++iperp) { for (int ipar = min_ipar() ; ipar <= max_ipar() ; ++ipar) @@ -147,6 +145,7 @@ void symmetry_ghost_zone::extend_scalar_gridfn_to_ghost_zone my_patch().gridfn(gfn, irho,isigma) = sym_gridfn; } } + } } //****************************************************************************** @@ -312,7 +311,7 @@ other_iperp_ = new jtutil::cpm_map<fp>(min_iperp(), max_iperp(), // (since that depends on the type of our patch's adjacent ghost zones) // ==> we include the corners on the chance we may want them later, // and use the appropriate parts of them in -// extend_scalar_gridfn_to_ghost_zone() +// synchronize() // below const int ghost_zone_min_ipar = my_edge().min_ipar_with_corners(); const int ghost_zone_max_ipar = my_edge().max_ipar_with_corners(); @@ -379,23 +378,19 @@ assert(& oigz.other_patch() == & my_patch()); //****************************************************************************** // -// This function extends a scalar gridfn defined on the other patch's -// nominal grid, to a specified part of this ghost zone, by interpatch -// interpolating it from the neighboring patch's frontier. +// This function "synchronizes" a ghost zone, i.e. it updates the +// ghost-zone values of the specified gridfns via the appropriate +// interpatch interpolations. The flags specify which part(s) of the +// ghost zone we want. // -// N.b. "scalar" here refers solely to the symmetry properties of the -// gridfn under the interpatch coordinate transformations; it need not -// be an actual scalar under more general coordinate transformations. -// -void interpatch_ghost_zone::extend_scalar_gridfn_to_ghost_zone - (int gfn, +void interpatch_ghost_zone::synchronize + (int ghosted_min_gfn, int ghosted_max_gfn, bool want_min_par_corner, bool want_non_corner, bool want_max_par_corner) const { -other_frontier_->setup_interpolation_for_gridfn(gfn); - +// for (int iperp = min_iperp() ; iperp <= max_iperp() ; ++iperp) { for (int ipar = min_ipar(iperp) ; ipar <= max_ipar(iperp) ; ++ipar) |