Skip to content

celltrace and parttrace Macro

Mladen Ivkovic requested to merge celltrace_macro into master

I present to you a small macro that I recently used a lot and found quite convenient and helpful.

I'm not sure whether you'll agree on its usefulness, so if you think this has little to no merit for everybody else, feel free to close this merge request.

I've been working a lot on tracing what happens where inside the code with particular cells recently, so I wrote a macro that essentially works like message(), but takes a cell as a first argument, and automatically checks whether the cell has the ID that I'm tracing before printing out data that I want.

Which cells are being looked for is also defined in error.h. The advantage of this macro is that I can easily switch which cells I'm tracing, without having to go through all files individually that are printing debugging messages for me. This also means that I can easily turn off the printouts by "looking" for a cell ID that doesn't exist, like 0 or -1.

In more rare cases I also used the same thing for particles. I can easily add that too if you think somebody could find this useful.

Edited by Mladen Ivkovic

Merge request reports