Bugfixes;

Restarts now reproduce longer Sims
This commit is contained in:
2024-09-11 14:56:14 +02:00
parent 75bb2e4d85
commit b4cbd8c44c
9 changed files with 53 additions and 14 deletions
+2 -1
View File
@@ -34,8 +34,9 @@ std::shared_ptr<Injector> buildInjector(
json_path_append(path_to_injector, {"CreatedSpecies", std::string(key),
"CreationVelocityDistribution"}));
// missing a check if the value is positive
info.multiplicity = json_int(json_object_by_path(value, {"Multiplicity"}), 1);
ASSERT_POSITIVE(&info.multiplicity, "The multiplicity has to be positive. " +
specie_name + " multiplicity: " + std::to_string(info.multiplicity));
injector_infos.push_back(info);
}
+3 -2
View File
@@ -7,11 +7,12 @@ namespace generator {
DEBUG_LEVEL_3("Build Restart.");
bool do_restart = json_bool(json_object_by_path(object, {"Do"}));
if (!do_restart) {
DEBUG_LEVEL_3("No Restart desired");
DEBUG_LEVEL_0("No Restart desired.");
return Restart(false, "", "");
}
std::string filepath = readAbsoluteFilename(json_object_by_path(object, {"PathToH5"}));
std::string filepath = readAbsoluteFilename(json_object_by_path(object, {"PathToH5"}))
+ ".h5";
DEBUG_LEVEL_3("Restart: file path:" + filepath);
std::string identifier;