From 62721e363a2a327665ec3a904abb1d809f77b0bb Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 13 Jun 2006 17:14:00 +0000 Subject: CarpetInterp: Explicitly convert from/to CCTK_INT and from/to CCTK_REAL Explicitly convert between int and CCTK_INT, and between double and CCTK_REAL, where necessary. darcs-hash:20060613171441-dae7b-814bf92e15854b162f2f0560b3ec4ea519e4c28e.gz --- Carpet/CarpetInterp/src/interp.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Carpet/CarpetInterp/src') diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index fab82330c..d4e63974f 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -751,7 +751,7 @@ namespace CarpetInterp { assert (iret == N_output_arrays); num_time_derivs = 0; for (int m = 0; m < N_output_arrays; ++m) { - num_time_derivs = max (num_time_derivs, time_deriv_order[m]); + num_time_derivs = max (num_time_derivs, (int)time_deriv_order[m]); } } @@ -848,7 +848,7 @@ namespace CarpetInterp { ivect const fact = maxspacereflevelfact / spacereffacts.at(rl) * ipow(mgfact, mglevel); ivect const ipos = ivect(floor((pos - lower.at(m)) / (delta.at(m) * - rvect(fact)) + 0.5)) * fact; + rvect(fact)) + (CCTK_REAL) 0.5)) * fact; const gh* hh = arrdata[coord_group][m].hh; assert (all (ipos % hh->bases().at(ml).at(rl).stride() == 0)); @@ -869,7 +869,8 @@ namespace CarpetInterp { if (map_onto_processors) { CCTK_VWarn (CCTK_WARN_PICKY, __LINE__, __FILE__, CCTK_THORNSTRING, "Interpolation point #%d at [%g,%g,%g] is not on " - "any grid patch", n, pos[0], pos[1], pos[2]); + "any grid patch", + n, (double)pos[0], (double)pos[1], (double)pos[2]); } found: assert (rl >= minrl and rl < maxrl); @@ -1274,12 +1275,16 @@ namespace CarpetInterp { (param_table_handle, &per_point_status.front(), "per_point_status"); assert (ierr >= 0); + vector lsh(N_dims); + for (int d=0; d