preprocessor now filters debug output

This commit is contained in:
2025-05-28 15:27:00 +02:00
parent e2167fb75b
commit f510d0a39a
39 changed files with 375 additions and 14 deletions
+7 -1
View File
@@ -186,12 +186,14 @@ bool DynamicDensityField::changedPitchAngleBin(double old_mu,
const int old_bin = pitch_angle_binning_.bin(old_mu);
const int new_bin = pitch_angle_binning_.bin(new_mu);
#ifdef debug_level3
if(!(old_bin == new_bin)) {
DEBUG_LEVEL_3("old mu: " + std::to_string(old_mu));
DEBUG_LEVEL_3("old bin: " + std::to_string(old_bin));
DEBUG_LEVEL_3("new mu: " + std::to_string(new_mu));
DEBUG_LEVEL_3("new bin: " + std::to_string(new_bin));
}
#endif
return !(old_bin == new_bin);
}
@@ -225,7 +227,9 @@ void DynamicDensityField::logMovement(const Coordinate& position,
// }
blitz::Array<double, 3> DynamicDensityField::densityArray() {
#ifdef debug_level3
DEBUG_LEVEL_3("recalc Density array");
#endif
recalculateDensityArray();
blitz::TinyVector<int,3> lowerbound(density_per_m3_.lbound(0),
@@ -237,7 +241,7 @@ blitz::Array<double, 3> DynamicDensityField::densityArray() {
blitz::Array<double, 3> density(lowerbound, extent);
blitz::fourthIndex iE;
DEBUG_LEVEL_3("density sum");
// DEBUG_LEVEL_3("density sum");
density = blitz::sum(density_per_m3_, iE);
return density.copy();
}
@@ -303,7 +307,9 @@ void DynamicDensityField::recalculateDensityArray() {
double DynamicDensityField::particleNumber() {
blitz::Array<double, 3> density = densityArray();
double particleNumber = blitz::sum(density * bin_volume_m3_);
#ifdef debug_level3
DEBUG_LEVEL_3("particle number: " + std::to_string(particleNumber));
#endif
return particleNumber;
}