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
@@ -53,7 +53,9 @@ blitz::Array<double, 3> readComponentFromFile(json_t* object, int component) {
std::shared_ptr<VectorField> buildVectorField(json_t* object) {
if (json_object_by_path(object, {"VectorFieldConstant"})) {
#ifdef debug_level2
DEBUG_LEVEL_2("Creating Vector field: VectorFieldConstant");
#endif
blitz::TinyVector<double, 3> constant = json_blitz_vector<3>(
json_object_by_path(object, {"VectorFieldConstant", "constant"}));
@@ -61,13 +63,17 @@ std::shared_ptr<VectorField> buildVectorField(json_t* object) {
new VectorFieldConstant(CylinderVector(constant)));
} else if (json_object_by_path(object, {"VectorFieldFunctionInZ"})) {
#ifdef debug_level2
DEBUG_LEVEL_2("Creating Vector field: VectorFieldFunctionInZ");
#endif
std::function<double(double, double, double)> z_function = function3D(
json_object_by_path(object, {"VectorFieldFunctionInZ", "zFunction"}));
return std::shared_ptr<VectorField>(new VectorFieldFunctionInZ(z_function));
} else if (json_object_by_path(object, {"VectorFieldFromArray"})) {
#ifdef debug_level2
DEBUG_LEVEL_2("Creating Vector field: VectorFieldFromArray");
#endif
blitz::Array<double, 3> v_radial = readComponentFromFile(
json_object_by_path(object,