diff --git a/cpp/particles/interpolation/particles_field_computer.hpp b/cpp/particles/interpolation/particles_field_computer.hpp index 93e056ffef5dfce1b3a1920cf9d61bbfcc9ea1f8..6dc7df3ec2dc6439d923996afc9deae7251d8b1c 100644 --- a/cpp/particles/interpolation/particles_field_computer.hpp +++ b/cpp/particles/interpolation/particles_field_computer.hpp @@ -109,10 +109,15 @@ public: real_number get_norm_pos_in_cell(const real_number in_pos, const int idx_pos) const { const real_number shifted_pos = in_pos - spatial_box_offset[idx_pos]; + DEBUG_MSG("particles_field_computer::get_norm_pos_in_cell, shifted_pos = %g\n", shifted_pos); const real_number nb_box_repeat = floor(shifted_pos/spatial_box_width[idx_pos]); + DEBUG_MSG("particles_field_computer::get_norm_pos_in_cell, nb_box_repeat = %g\n", nb_box_repeat); const real_number pos_in_box = shifted_pos - nb_box_repeat*spatial_box_width[idx_pos]; + DEBUG_MSG("particles_field_computer::get_norm_pos_in_cell, pos_in_box = %g\n", pos_in_box); const real_number cell_idx = floor(pos_in_box/box_step_width[idx_pos]); + DEBUG_MSG("particles_field_computer::get_norm_pos_in_cell, cell_idx = %g\n", cell_idx); const real_number pos_in_cell = (pos_in_box - cell_idx*box_step_width[idx_pos]) / box_step_width[idx_pos]; + DEBUG_MSG("particles_field_computer::get_norm_pos_in_cell, pos_in_cell = %g\n", pos_in_cell); assert(0 <= pos_in_cell && pos_in_cell < 1); return pos_in_cell; }