diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-03-01 14:42:21 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:09 +0100 |
commit | a557c6e45e252d8817e0ec148ef3598c0d901aa9 (patch) | |
tree | 0acfc036cf3b44c9e0c196ca9dcbd0f3faf1f284 /Carpet/CarpetInterp2 | |
parent | d62e07315a55f758bc0d3b90d1fddbc0f59aa56f (diff) |
CarpetInterp2: Make compile with CCTK_REAL=float
Diffstat (limited to 'Carpet/CarpetInterp2')
-rw-r--r-- | Carpet/CarpetInterp2/src/fasterp.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/CarpetInterp2/src/fasterp.cc b/Carpet/CarpetInterp2/src/fasterp.cc index ba46eec69..94f6146d0 100644 --- a/Carpet/CarpetInterp2/src/fasterp.cc +++ b/Carpet/CarpetInterp2/src/fasterp.cc @@ -236,12 +236,13 @@ namespace CarpetInterp2 { } else { // Potentially shift the stencil anchor for odd interpolation // orders (i.e., for even numbers of stencil points) - ivect const ioffset (iloc.offset < 0.0); + ivect const ioffset (iloc.offset < CCTK_REAL(0.0)); iorigin = - ivect((order-1)/2) - ioffset; } rvect const offset = iloc.offset - rvect(iorigin); // Ensure that the stencil is centred - assert (all (offset >= 0.5*(order-1) and offset < 0.5*(order+1))); + assert (all (offset >= CCTK_REAL(0.5)*(order-1) and + offset < CCTK_REAL(0.5)*(order+1))); for (int d=0; d<dim; ++d) { // C_n = PRODUCT_m,m!=n [(x - x_m) / (x_n - x_m)] @@ -609,7 +610,7 @@ namespace CarpetInterp2 { gh const * const hh = Carpet::vhh.AT(m); ibbox const & baseext = hh->baseextent(Carpet::mglevel, 0); delta.AT(m) /= baseext.stride(); - idelta.AT(m) = 1.0 / delta.AT(m); + idelta.AT(m) = CCTK_REAL(1.0) / delta.AT(m); if (veryverbose) { cout << "GetCoordRange[" << m << "]: lower=" << lower.AT(m) << " upper=" << upper.AT(m) << " delta=" << delta.AT(m) << endl; } |