Included output for the potential calculated by

the poisson solver (however no metadata yet and not tested)
This commit is contained in:
2024-01-24 14:44:43 +01:00
parent 6e05d217a0
commit 9d0c7646b3
4 changed files with 63 additions and 3 deletions
@@ -129,6 +129,27 @@ std::shared_ptr<SimulationOutput> buildSimulationOutput(
}
}
// Potential
{
int intervall =
json_int(json_object_by_path(object, {"Potential", "Intervall"}));
if (intervall == 0 &&
json_string(json_object_by_path(
object, {"Potential", "Intervall"})) == "EachSync") {
intervall = 1;
}
ASSERT_POSITIVE(&intervall,
"The intervall for the potential must be positive");
bool overwrite_last = json_bool(
json_object_by_path(object, {"Potential", "OverwriteLast"}));
OutputTask task = {"potential", overwrite_last, intervall};
output->setPotentialOutput(task);
}
return output;
}