Closed white238 closed 2 years ago
This is a great idea.
Some other thoughts to consider: depending on your physics and time integrator, solution fields may not all be specified at the same point in time (e.g. velocity is often recorded at the half-step). That being said, it would still make more sense to put the time on the FiniteElementState
than the physics in this case.
In a multiphysics simulation, having the time on the BasePhysics
might make some sense, since the different physics could be integrated through time in some nonuniform way.
There should still be one source of truth now: the time on the highest-level physics module (e.g. ThermalSolid::time_
in your example)
Having time stored in
BasePhysics
is confusing once you get past more than one physics. For example,ThermalSolid
has threetime_
member variables,ThermalSolid::time_
,Solid::time_
, andThermalConduction::time_
. This seems like it would continue to be a headache to keep in sync.Can we store time in
StateManager
and keep that as the one source of truth?