From 0bbc471d8c5ccfaa55a6ef68073a1a66e35d5a23 Mon Sep 17 00:00:00 2001 From: schnetter <> Date: Sun, 18 Apr 2004 11:29:00 +0000 Subject: Remove the parameters Carpet::prolongate_initial_data; this is now Remove the parameters Carpet::prolongate_initial_data; this is now always done. Remove arguments initialise_from and do_prolongate from Regrid(). Regridding is now done in level mode instead of meta mode. Furthermore, CarpetRegrid is called in singlemape mode. darcs-hash:20040418112943-07bb3-2e392df1737ab75f3f0d553bb53bde2ed41f8773.gz --- Carpet/CarpetRegrid/src/automatic.cc | 40 ++++----- Carpet/CarpetRegrid/src/baselevel.cc | 12 +-- Carpet/CarpetRegrid/src/centre.cc | 17 +--- Carpet/CarpetRegrid/src/manualcoordinatelist.cc | 110 ++++++++++++++++-------- Carpet/CarpetRegrid/src/manualcoordinates.cc | 37 +++----- Carpet/CarpetRegrid/src/manualgridpointlist.cc | 17 +--- Carpet/CarpetRegrid/src/manualgridpoints.cc | 33 ++----- Carpet/CarpetRegrid/src/moving.cc | 17 +--- Carpet/CarpetRegrid/src/paramcheck.cc | 20 ++++- Carpet/CarpetRegrid/src/regrid.cc | 66 ++++---------- Carpet/CarpetRegrid/src/regrid.hh | 92 ++++---------------- 11 files changed, 167 insertions(+), 294 deletions(-) (limited to 'Carpet/CarpetRegrid/src') diff --git a/Carpet/CarpetRegrid/src/automatic.cc b/Carpet/CarpetRegrid/src/automatic.cc index 6add8c770..2f5651b2e 100644 --- a/Carpet/CarpetRegrid/src/automatic.cc +++ b/Carpet/CarpetRegrid/src/automatic.cc @@ -16,7 +16,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/automatic.cc,v 1.1 2004/01/25 14:57:30 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/automatic.cc,v 1.2 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_automatic_cc); } @@ -31,22 +31,12 @@ namespace CarpetRegrid { int Automatic (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map= 1); assert (bbsss.size() >= 1); @@ -64,15 +54,17 @@ namespace CarpetRegrid { assert (CCTK_VarTypeI(vi) == CCTK_VARIABLE_REAL); assert (CCTK_GroupDimI(gi) == dim); - assert (arrdata.at(gi).at(map).data.at(vi-v1)); + assert (arrdata.at(gi).at(Carpet::map).data.at(vi-v1)); const gf& errorvar = (*dynamic_cast*> - (arrdata.at(gi).at(map).data.at(vi-v1))); - + (arrdata.at(gi).at(Carpet::map).data.at(vi-v1))); + vector bbs; gh::cbnds obs; Automatic_OneLevel - (cctkGH, hh, reflevel, minwidth, minfraction, maxerror, errorvar, + (cctkGH, hh, + reflevel, min(reflevels+1, maxreflevels), + minwidth, minfraction, maxerror, errorvar, bbs, obs); // make multiprocessor aware @@ -81,10 +73,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); @@ -115,7 +104,8 @@ namespace CarpetRegrid { void Automatic_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, + const int rl, + const int numrl, const int minwidth, const CCTK_REAL minfraction, const CCTK_REAL maxerror, @@ -123,20 +113,20 @@ namespace CarpetRegrid { vector & bbs, vector & obs) { - if (reflevel+1 >= maxreflevels) return; + if (rl+1 >= numrl) return; // Arbitrary const int tl = 0; const int ml = 0; -// cout << endl << "MRA: Choosing regions to refine in " << hh.components(reflevel) << " components" << endl; +// cout << endl << "MRA: Choosing regions to refine in " << hh.components(rl) << " components" << endl; list bbl; - for (int c=0; c& errdata = *errorvar(tl,reflevel,c,ml); + const data& errdata = *errorvar(tl,rl,c,ml); Automatic_Recursive (cctkGH, hh, minwidth, minfraction, maxerror, errdata, bbl, region); diff --git a/Carpet/CarpetRegrid/src/baselevel.cc b/Carpet/CarpetRegrid/src/baselevel.cc index 18cc8a95c..c380c6844 100644 --- a/Carpet/CarpetRegrid/src/baselevel.cc +++ b/Carpet/CarpetRegrid/src/baselevel.cc @@ -9,7 +9,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/baselevel.cc,v 1.1 2004/01/25 14:57:30 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/baselevel.cc,v 1.2 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_baselevel_cc); } @@ -24,22 +24,12 @@ namespace CarpetRegrid { int BaseLevel (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map= 1); // do nothing if the levels already exist @@ -89,10 +79,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; diff --git a/Carpet/CarpetRegrid/src/manualcoordinatelist.cc b/Carpet/CarpetRegrid/src/manualcoordinatelist.cc index 92ab6900a..6cc8d719c 100644 --- a/Carpet/CarpetRegrid/src/manualcoordinatelist.cc +++ b/Carpet/CarpetRegrid/src/manualcoordinatelist.cc @@ -12,7 +12,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualcoordinatelist.cc,v 1.1 2004/01/25 14:57:30 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualcoordinatelist.cc,v 1.2 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_manualcoordinatelist_cc); } @@ -27,21 +27,12 @@ namespace CarpetRegrid { int ManualCoordinateList (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - - assert (reflevel>=0 && reflevel=0 && map= 1); @@ -50,6 +41,21 @@ namespace CarpetRegrid { assert (bbsss.size() >= 1); + jjvect nboundaryzones, is_internal, is_staggered, shiftout; + ierr = GetBoundarySpecification + (2*dim, &nboundaryzones[0][0], &is_internal[0][0], + &is_staggered[0][0], &shiftout[0][0]); + assert (!ierr); + rvect physical_min, physical_max; + rvect interior_min, interior_max; + rvect exterior_min, exterior_max; + rvect base_spacing; + ierr = GetDomainSpecification + (dim, &physical_min[0], &physical_max[0], + &interior_min[0], &interior_max[0], + &exterior_min[0], &exterior_max[0], &base_spacing[0]); + assert (!ierr); + bbsss.resize (refinement_levels); obss.resize (refinement_levels); pss.resize (refinement_levels); @@ -63,35 +69,68 @@ namespace CarpetRegrid { CCTK_WARN (0, "Could not parse parameter \"coordinates\""); } } - + vector > newobss; - if (strcmp(outerbounds, "") !=0 ) { - istringstream ob_str (outerbounds); - try { - ob_str >> newobss; - } catch (input_error) { - CCTK_WARN (0, "Could not parse parameter \"outerbounds\""); - } - bool good = newobss.size() == newbbss.size(); - if (good) { - for (size_t rl=0; rl> newobss; + } catch (input_error) { + CCTK_WARN (0, "Could not parse parameter \"outerbounds\""); + } + bool good = newobss.size() == newbbss.size(); + if (good) { + for (size_t rl=0; rl > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; diff --git a/Carpet/CarpetRegrid/src/manualcoordinates.cc b/Carpet/CarpetRegrid/src/manualcoordinates.cc index 54474d863..cf6ce3f94 100644 --- a/Carpet/CarpetRegrid/src/manualcoordinates.cc +++ b/Carpet/CarpetRegrid/src/manualcoordinates.cc @@ -11,7 +11,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualcoordinates.cc,v 1.2 2004/02/27 16:24:06 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualcoordinates.cc,v 1.3 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_manualcoordinates_cc); } @@ -26,22 +26,12 @@ namespace CarpetRegrid { int ManualCoordinates (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map 4) { CCTK_WARN (0, "Cannot currently specify manual refinement regions for more than 4 refinement levels"); } @@ -81,10 +71,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; @@ -99,27 +86,27 @@ namespace CarpetRegrid { void ManualCoordinates_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, - const int reflevels, + const int rl, + const int numrl, const rvect lower, const rvect upper, const bbvect obound, vector & bbs, vector & obs) { - if (reflevel >= reflevels) return; + if (rl >= numrl) return; - jvect const ilower = pos2int (cctkGH, hh, lower, reflevel); - jvect const iupper = pos2int (cctkGH, hh, upper, reflevel); + jvect const ilower = pos2int (cctkGH, hh, lower, rl); + jvect const iupper = pos2int (cctkGH, hh, upper, rl); ManualGridpoints_OneLevel - (cctkGH, hh, reflevel, reflevels, ilower, iupper, obound, bbs, obs); + (cctkGH, hh, rl, numrl, ilower, iupper, obound, bbs, obs); } ivect delta2int (const cGH * const cctkGH, const gh& hh, - const rvect & rpos, const int reflevel) + const rvect & rpos, const int rl) { rvect global_lower, global_upper; for (int d=0; d& hh, - const rvect & rpos, const int reflevel) + const rvect & rpos, const int rl) { rvect global_lower, global_upper; for (int d=0; d const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map= 1); // do nothing if the levels already exist @@ -120,10 +110,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; diff --git a/Carpet/CarpetRegrid/src/manualgridpoints.cc b/Carpet/CarpetRegrid/src/manualgridpoints.cc index e8cd6c17a..f8be5eb57 100644 --- a/Carpet/CarpetRegrid/src/manualgridpoints.cc +++ b/Carpet/CarpetRegrid/src/manualgridpoints.cc @@ -11,7 +11,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualgridpoints.cc,v 1.1 2004/01/25 14:57:30 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualgridpoints.cc,v 1.2 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_manualgridpoints_cc); } @@ -26,22 +26,12 @@ namespace CarpetRegrid { int ManualGridpoints (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) { DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map 4) { CCTK_WARN (0, "Cannot currently specify manual refinement regions for more than 4 refinement levels"); } @@ -72,7 +62,7 @@ namespace CarpetRegrid { gh::cbnds obs; ManualGridpoints_OneLevel - (cctkGH, hh, rl, refinement_levels, + (cctkGH, hh, rl,refinement_levels, ilower.at(rl-1), iupper.at(rl-1), ob, bbs, obs); // make multiprocessor aware @@ -81,10 +71,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; @@ -99,38 +86,36 @@ namespace CarpetRegrid { void ManualGridpoints_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, - const int reflevels, + const int rl, + const int numrl, const ivect ilower, const ivect iupper, const bbvect obound, vector & bbs, vector & obs) { - if (reflevel >= reflevels) return; - const ivect rstr = hh.baseextent.stride(); const ivect rlb = hh.baseextent.lower(); const ivect rub = hh.baseextent.upper(); - const int levfac = ipow(hh.reffact, reflevel); + const int levfac = ipow(hh.reffact, rl); assert (all (rstr % levfac == 0)); const ivect str (rstr / levfac); const ivect lb (ilower); const ivect ub (iupper); if (! all(lb>=rlb && ub<=rub)) { ostringstream buf; - buf << "The refinement region boundaries for refinement level #" << reflevel << " are not within the main grid. Allowed are the grid point boundaries " << rlb << " - " << rub << "; specified were " << lb << " - " << ub << ends; + buf << "The refinement region boundaries for refinement level #" << rl << " are not within the main grid. Allowed are the grid point boundaries " << rlb << " - " << rub << "; specified were " << lb << " - " << ub << ends; CCTK_WARN (0, buf.str().c_str()); } if (! all(lb<=ub)) { ostringstream buf; - buf << "The refinement region boundaries for refinement level #" << reflevel << " have the upper boundary (" << ub << ") less than the lower boundary (" << lb << ")" << ends; + buf << "The refinement region boundaries for refinement level #" << rl << " have the upper boundary (" << ub << ") less than the lower boundary (" << lb << ")" << ends; CCTK_WARN (0, buf.str().c_str()); } if (! all(lb%str==0 && ub%str==0)) { CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, - "The refinement region boundaries for refinement level #%d are not a multiple of the stride for that level", reflevel); + "The refinement region boundaries for refinement level #%d are not a multiple of the stride for that level", rl); } assert (all(lb>=rlb && ub<=rub)); assert (all(lb<=ub)); diff --git a/Carpet/CarpetRegrid/src/moving.cc b/Carpet/CarpetRegrid/src/moving.cc index 411286940..cfcb6496c 100644 --- a/Carpet/CarpetRegrid/src/moving.cc +++ b/Carpet/CarpetRegrid/src/moving.cc @@ -9,7 +9,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/moving.cc,v 1.2 2004/04/16 18:41:33 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/moving.cc,v 1.3 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_moving_cc); } @@ -24,13 +24,6 @@ namespace CarpetRegrid { int Moving (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss) @@ -38,9 +31,6 @@ namespace CarpetRegrid { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; - assert (reflevel>=0 && reflevel=0 && map= 1); // do nothing if the levels already exist @@ -95,10 +85,7 @@ namespace CarpetRegrid { // make multigrid aware vector > bbss; - MakeMultigridBoxes - (cctkGH, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbs, obs, bbss); + MakeMultigridBoxes (cctkGH, bbs, obs, bbss); bbsss.at(rl) = bbss; obss.at(rl) = obs; diff --git a/Carpet/CarpetRegrid/src/paramcheck.cc b/Carpet/CarpetRegrid/src/paramcheck.cc index ad2c4819e..d0a463647 100644 --- a/Carpet/CarpetRegrid/src/paramcheck.cc +++ b/Carpet/CarpetRegrid/src/paramcheck.cc @@ -1,3 +1,5 @@ +#include + #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" @@ -5,7 +7,7 @@ #include "carpet.hh" #include "regrid.hh" -static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/paramcheck.cc,v 1.1 2002/05/16 23:25:54 schnetter Exp $"; +static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/paramcheck.cc,v 1.2 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(CarpetRegrid_paramcheck_cc) @@ -22,6 +24,22 @@ namespace CarpetRegrid { if (refinement_levels > maxreflevels) { CCTK_PARAMWARN ("The parameter CarpetRegrid::refinement_levels is larger than Carpet::max_refinement_levels"); } + + if (smart_outer_boundaries) { + int type; + const CCTK_INT * const domain_from_coordbase + = (const CCTK_INT *) CCTK_ParameterGet ("domain_from_coordbase", "Carpet", &type); + assert (domain_from_coordbase); + assert (type == PARAMETER_BOOLEAN); + if (! *domain_from_coordbase) { + CCTK_PARAMWARN ("The parameter CarpetRegrid::smart_outer_boundaries can only be used when Carpet::domain_from_coordbase=yes"); + } + if (CCTK_Equals(refined_regions, "manual-coordinate-list")) { + // do nothing + } else { + CCTK_PARAMWARN ("The parameter CarpetRegrid::smart_outer_boundaries can currently only be used when CarpetRegrid::refined_regions=manual-coordinate-list"); + } + } return 0; } diff --git a/Carpet/CarpetRegrid/src/regrid.cc b/Carpet/CarpetRegrid/src/regrid.cc index 279044927..317c84381 100644 --- a/Carpet/CarpetRegrid/src/regrid.cc +++ b/Carpet/CarpetRegrid/src/regrid.cc @@ -13,7 +13,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/regrid.cc,v 1.38 2004/04/14 22:19:44 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/regrid.cc,v 1.39 2004/04/18 13:29:43 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_regrid_cc); } @@ -25,13 +25,6 @@ namespace CarpetRegrid { using namespace Carpet; CCTK_INT CarpetRegrid_Regrid (CCTK_POINTER_TO_CONST const cctkGH_, - CCTK_INT const reflevel, - CCTK_INT const map, - CCTK_INT const size, - CCTK_INT const * const nboundaryzones_, - CCTK_INT const * const is_internal_, - CCTK_INT const * const is_staggered_, - CCTK_INT const * const shiftout_, CCTK_POINTER const bbsss_, CCTK_POINTER const obss_, CCTK_POINTER const pss_) @@ -40,22 +33,13 @@ namespace CarpetRegrid { const cGH * const cctkGH = (const cGH *) cctkGH_; - assert (reflevel>=0 && reflevel=0 && map::rexts & bbsss = * (gh::rexts *) bbsss_; gh::rbnds & obss = * (gh::rbnds *) obss_; gh::rprocs & pss = * (gh::rprocs *) pss_; - gh const & hh = *vhh.at(map); + gh const & hh = *vhh.at(Carpet::map); - assert (is_meta_mode()); + assert (is_singlemap_mode()); @@ -135,59 +119,39 @@ namespace CarpetRegrid { if (CCTK_EQUALS(refined_regions, "none")) { - do_recompose = BaseLevel - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose = BaseLevel (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "centre")) { - do_recompose = Centre - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose = Centre (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "manual-gridpoints")) { - do_recompose = ManualGridpoints - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose + = ManualGridpoints (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "manual-coordinates")) { - do_recompose = ManualCoordinates - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose + = ManualCoordinates (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "manual-gridpoint-list")) { - do_recompose = ManualGridpointList - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose + = ManualGridpointList (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "manual-coordinate-list")) { - do_recompose = ManualCoordinateList - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose + = ManualCoordinateList (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "moving")) { - do_recompose = Moving - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose = Moving (cctkGH, hh, bbsss, obss, pss); } else if (CCTK_EQUALS(refined_regions, "automatic")) { - do_recompose = Automatic - (cctkGH, hh, reflevel, map, - size, nboundaryzones, is_internal, is_staggered, shiftout, - bbsss, obss, pss); + do_recompose = Automatic (cctkGH, hh, bbsss, obss, pss); } else { assert (0); diff --git a/Carpet/CarpetRegrid/src/regrid.hh b/Carpet/CarpetRegrid/src/regrid.hh index 2de83f094..9228e23c3 100644 --- a/Carpet/CarpetRegrid/src/regrid.hh +++ b/Carpet/CarpetRegrid/src/regrid.hh @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/regrid.hh,v 1.12 2004/04/14 22:19:44 schnetter Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/regrid.hh,v 1.13 2004/04/18 13:29:43 schnetter Exp $ #ifndef CARPETREGRID_HH #define CARPETREGRID_HH @@ -35,13 +35,6 @@ namespace CarpetRegrid { // gh::rbnds * obss, // gh::rprocs * pss); CCTK_INT CarpetRegrid_Regrid (CCTK_POINTER_TO_CONST const cctkGH_, - CCTK_INT const reflevel, - CCTK_INT const map, - CCTK_INT const size, - CCTK_INT const * const nboundaryzones, - CCTK_INT const * const is_internal, - CCTK_INT const * const is_staggered, - CCTK_INT const * const shiftout, CCTK_POINTER const bbsss_, CCTK_POINTER const obss_, CCTK_POINTER const pss_); @@ -51,47 +44,26 @@ namespace CarpetRegrid { int BaseLevel (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); int Centre (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); int ManualGridpoints (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); void ManualGridpoints_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, - const int reflevels, + const int rl, + const int numrl, const ivect ilower, const ivect iupper, const bbvect obound, @@ -100,87 +72,57 @@ namespace CarpetRegrid { int ManualCoordinates (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); void ManualCoordinates_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, - const int reflevels, - const rvect ilower, - const rvect iupper, + const int rl, + const int numrl, + const rvect lower, + const rvect upper, const bbvect obound, vector & bbs, vector & obs); - ivect delta2int (const cGH * const cctkGH, const gh& hh, - const rvect & rpos, const int reflevel); - ivect pos2int (const cGH* const cctkGH, const gh& hh, - const rvect & rpos, const int reflevel); + ivect delta2int (const cGH * const cctkGH, + const gh& hh, + const rvect & rpos, + const int rl); + ivect pos2int (const cGH* const cctkGH, + const gh& hh, + const rvect & rpos, + const int rl); int ManualGridpointList (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); int ManualCoordinateList (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); int Moving (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); int Automatic (cGH const * const cctkGH, gh const & hh, - int const reflevel, - int const map, - int const size, - jjvect const & nboundaryzones, - jjvect const & is_internal, - jjvect const & is_staggered, - jjvect const & shiftout, gh::rexts & bbsss, gh::rbnds & obss, gh::rprocs & pss); void Automatic_OneLevel (const cGH * const cctkGH, const gh & hh, - const int reflevel, + const int rl, + const int numrl, const int minwidth, const CCTK_REAL minfraction, const CCTK_REAL maxerror, -- cgit v1.2.3