diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-06-13 17:14:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-06-13 17:14:00 +0000 |
commit | 62721e363a2a327665ec3a904abb1d809f77b0bb (patch) | |
tree | 99a3428856bb701bba37f38a6176c66f21a6d227 /Carpet/CarpetInterp | |
parent | 47f93ec84328887885b555bbd8dd24135d853e99 (diff) |
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
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r-- | Carpet/CarpetInterp/src/interp.cc | 15 |
1 files changed, 10 insertions, 5 deletions
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<CCTK_INT> lsh(N_dims); + for (int d=0; d<N_dims; ++d) { + lsh.at(d) = coord_group_data.lsh[d]; + } const int retval = CCTK_InterpLocalUniform (N_dims, local_interp_handle, param_table_handle, &lower[0], &delta[0], npoints, CCTK_VARIABLE_REAL, tmp_coords, - N_input_arrays, coord_group_data.lsh, + N_input_arrays, & lsh.front(), &input_array_type_codes.front(), &input_arrays.front(), N_output_arrays, output_array_type_codes, &tmp_output_arrays[tl].front()); @@ -1288,7 +1293,7 @@ namespace CarpetInterp { "The local interpolator returned the error code %d",retval); } - overall_retval = min (overall_retval, retval); + overall_retval = min (overall_retval, (CCTK_INT)retval); for (int n = 0; n < per_point_status.size(); n++) { overall_status = min (overall_status, per_point_status[n]); } |