feat(loading): robust error reporting and mutation

cfg now reports which fields are missing when loading. Further, the mutate method has been added for easier mutation of the underlying configuration struct
This commit is contained in:
2026-04-07 09:28:27 -04:00
parent 46dce35eaf
commit d4bbd9cb3a
9 changed files with 382 additions and 10 deletions

View File

@@ -4,8 +4,8 @@
struct PhysicsConfigOptions {
bool diffusion;
bool convection;
bool radiation;
std::optional<bool> convection;
std::optional<bool> radiation;
std::array<int, 3> flags;
};
@@ -18,7 +18,7 @@ struct SimulationConfigOptions {
struct OutputConfigOptions {
std::string directory = "./output";
std::string format = "hdf5";
bool save_plots = false;
std::optional<bool> save_plots = false;
};
struct TestConfigSchema {
@@ -28,4 +28,4 @@ struct TestConfigSchema {
PhysicsConfigOptions physics;
SimulationConfigOptions simulation;
OutputConfigOptions output;
};
};