diff options
author | schnetter <> | 2004-04-28 13:44:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-04-28 13:44:00 +0000 |
commit | 26865c20d26f2e1ab586fbc43b720187ae923847 (patch) | |
tree | 1b5e03a26da2d3a3b0324c9b8a36c40407c27fb2 /Carpet/CarpetRegrid | |
parent | 5f7562ef0e76f2c5dddb829718a93f26255948b9 (diff) |
For smart_outer_boundaries, use the same number of boundary points on
For smart_outer_boundaries, use the same number of boundary points on
each level.
darcs-hash:20040428134459-07bb3-531d42bb67392d94993bfe9097bb1379e10973f6.gz
Diffstat (limited to 'Carpet/CarpetRegrid')
-rw-r--r-- | Carpet/CarpetRegrid/interface.ccl | 14 | ||||
-rw-r--r-- | Carpet/CarpetRegrid/src/manualcoordinatelist.cc | 10 |
2 files changed, 21 insertions, 3 deletions
diff --git a/Carpet/CarpetRegrid/interface.ccl b/Carpet/CarpetRegrid/interface.ccl index 55ce28eaf..133e3a12b 100644 --- a/Carpet/CarpetRegrid/interface.ccl +++ b/Carpet/CarpetRegrid/interface.ccl @@ -1,5 +1,5 @@ # Interface definition for thorn CarpetRegrid -# $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/interface.ccl,v 1.8 2004/04/19 18:48:07 schnetter Exp $ +# $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/interface.ccl,v 1.9 2004/04/28 15:44:59 schnetter Exp $ implements: CarpetRegrid @@ -37,6 +37,18 @@ CCTK_INT FUNCTION GetDomainSpecification \ CCTK_REAL OUT ARRAY spacing) USES FUNCTION GetDomainSpecification +# Convert between boundaries types +CCTK_INT FUNCTION ConvertFromPhysicalBoundary \ + (CCTK_INT INT size, \ + CCTK_REAL IN ARRAY physical_min, \ + CCTK_REAL IN ARRAY physical_max, \ + CCTK_REAL OUT ARRAY interior_min, \ + CCTK_REAL OUT ARRAY interior_max, \ + CCTK_REAL OUT ARRAY exterior_min, \ + CCTK_REAL OUT ARRAY exterior_max, \ + CCTK_REAL IN ARRAY spacing) +USES FUNCTION ConvertFromPhysicalBoundary + # The true prototype of the routine below: diff --git a/Carpet/CarpetRegrid/src/manualcoordinatelist.cc b/Carpet/CarpetRegrid/src/manualcoordinatelist.cc index 199636f3f..856157397 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.3 2004/04/22 11:58:42 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/manualcoordinatelist.cc,v 1.4 2004/04/28 15:44:59 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_manualcoordinatelist_cc); } @@ -80,7 +80,13 @@ namespace CarpetRegrid { newobss.at(rl).resize(newbbss.at(rl).size()); for (size_t c=0; c<newobss.at(rl).size(); ++c) { for (int d=0; d<dim; ++d) { - newobss.at(rl).at(c)[d][0] = abs(newbbss.at(rl).at(c).lower()[d] - physical_min[d]) < 1.0e-6 * base_spacing[d] / ipow(reffact, rl); + rvect spacing = base_spacing / ipow(reffact, rl); + ierr = ConvertFromPhysicalBoundary + (dim, &physical_min[0], &physical_max[0], + &interior_min[0], &interior_max[0], + &exterior_min[0], &exterior_max[0], &spacing[0]); + assert (!ierr); + newobss.at(rl).at(c)[d][0] = abs(newbbss.at(rl).at(c).lower()[d] - physical_min[d]) < 1.0e-6 * spacing[d]; if (newobss.at(rl).at(c)[d][0]) { rvect lo = newbbss.at(rl).at(c).lower(); rvect up = newbbss.at(rl).at(c).upper(); |