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
@@ -10,7 +10,9 @@ namespace generator {
std::shared_ptr<PoissonSolver> buildPoissonSolver(
Parameter& parameter) {
#ifdef debug_level2
DEBUG_LEVEL_2("Generating Poisson solver.");
#endif
std::shared_ptr<Geometry> geometry;
json_t* object = json_object_by_path(
@@ -48,7 +50,9 @@ namespace generator {
std::map<std::string, GlobalBoundary> buildBoundaries(Parameter& parameter,
const json_path& path_to_boundaries) {
#ifdef debug_level3
DEBUG_LEVEL_3("Creating Boundaries.");
#endif
std::map<std::string, GlobalBoundary> boundary_map {
{"Bottom", {0., BoundaryType::dirichlet}},
{"Top", {0., BoundaryType::dirichlet}},
@@ -63,7 +67,9 @@ namespace generator {
json_t* value;
json_object_foreach(parameter.jsonObjectFromBase(path_to_boundaries),
key, value) {
#ifdef debug_level3
DEBUG_LEVEL_3("Creating " + std::string(key) + ": ");
#endif
if(!(boundary_map.find(std::string(key)) == boundary_map.end())) {
double boundary_value =
json_double(json_object_by_path(value, {"value"}));
@@ -82,8 +88,10 @@ namespace generator {
". Using default boundary (dirichtlet, value 0)");
continue;
}
#ifdef debug_level3
DEBUG_LEVEL_3("with type: " + boundary_type);
DEBUG_LEVEL_3("with value: " + std::to_string(boundary_value));
#endif
} else {
SIM_INFO(std::string(key) + ": unknown location. Is ignored.");