Commit bb869885 authored by Cristian Lalescu's avatar Cristian Lalescu Committed by Cristian Lalescu
Browse files

adds debug messages

parent 30d1677c
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment