From bb8698854cea483949a7f864fa7881e99f61cb95 Mon Sep 17 00:00:00 2001
From: Cristian Lalescu <Cristian.Lalescu@ds.mpg.de>
Date: Fri, 30 Oct 2020 08:53:14 +0100
Subject: [PATCH] adds debug messages

---
 cpp/particles/interpolation/particles_field_computer.hpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpp/particles/interpolation/particles_field_computer.hpp b/cpp/particles/interpolation/particles_field_computer.hpp
index 93e056ff..6dc7df3e 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;
     }
-- 
GitLab