diff options
author | schnetter <> | 2004-02-27 15:24:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-02-27 15:24:00 +0000 |
commit | 74b048439499e74537078750d980c73c84367326 (patch) | |
tree | 60c57df4ada47d0c853b06dedc13ae3c07b57c6a /Carpet/CarpetRegrid/src/manualcoordinates.cc | |
parent | b7d54f232d07d58bf01551709f9687946c19bf1b (diff) |
Use vect::floor instead of vect::map(floor,)
darcs-hash:20040227152406-07bb3-4fdcba1dfe48b9ecde3df534abea800c54ffc460.gz
Diffstat (limited to 'Carpet/CarpetRegrid/src/manualcoordinates.cc')
-rw-r--r-- | Carpet/CarpetRegrid/src/manualcoordinates.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Carpet/CarpetRegrid/src/manualcoordinates.cc b/Carpet/CarpetRegrid/src/manualcoordinates.cc index 1e3719f18..54474d863 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.1 2004/01/25 14:57:30 schnetter Exp $"; + 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 $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_manualcoordinates_cc); } @@ -132,15 +132,13 @@ namespace CarpetRegrid { } const ivect global_extent (hh.baseextent.upper() - hh.baseextent.lower()); - CCTK_REAL (* const rfloor) (CCTK_REAL const) = floor; - const rvect scale = rvect(global_extent) / (global_upper - global_lower); const int levfac = ipow(hh.reffact, reflevel); assert (all (hh.baseextent.stride() % levfac == 0)); const ivect istride = hh.baseextent.stride() / levfac; const ivect ipos - = ivect(::map(rfloor, rpos * scale / rvect(istride) + 0.5)) * istride; + = ivect(floor(rpos * scale / rvect(istride) + 0.5)) * istride; const rvect apos = rpos * scale; assert (all(abs(apos - rvect(ipos)) < rvect(istride)*0.01)); @@ -164,16 +162,14 @@ namespace CarpetRegrid { } const ivect global_extent (hh.baseextent.upper() - hh.baseextent.lower()); - CCTK_REAL (* const rfloor) (CCTK_REAL const) = floor; - const rvect scale = rvect(global_extent) / (global_upper - global_lower); const int levfac = ipow(hh.reffact, reflevel); assert (all (hh.baseextent.stride() % levfac == 0)); const ivect istride = hh.baseextent.stride() / levfac; const ivect ipos - = ivect(::map(rfloor, (rpos - global_lower) * scale / rvect(istride) - + 0.5)) * istride; + = (ivect(floor((rpos - global_lower) * scale / rvect(istride) + 0.5)) + * istride); return ipos; } |