Closed lifflander closed 12 months ago
I think we should add a new std::unordered_map<PhaseType, std::shared_ptr<nlohmann::json>>
to LBDataHolder
that holds the phase-level (i.e., not object-specific) user-defined json. We should dump the string for the appropriate phase into the json file within a user_defined
block alongside the phase id, tasks, and communication that are already in the json file for each phase. Avoid use of the initializer list constructor for json strings.
We still need to figure out a good interface for this.
@lifflander @nmm0 Any thoughts on an interface to this?
@JacobDomagala I think for this issue we should add a new interface to the PhaseManager
that can add user-defined data:
thePhase()->addUserDefinedData(phase_id, key, value)
For this to output correctly to file, we need key
and value
to be jsonable. We should store this data in the LBDataHolder
by phase_id. We need to add both readers and writers for this in the toJson
and the constructor I think for LBDataHolder
.
@nmm0 The ability to add user-defined phase-level information (like t or dt from the application) is now on develop.
What Needs to be Done?
We want to be able to match up timesteps in NimbleSM with phases IDs.