Support basic integration with a const IntegratorBase #22665
Labels
component: system framework
System, Context, and supporting code
priority: medium
type: feature request
Moving this discussion from slack.
#22601 is pushing on something that I've been meaning to push for some time: allowing a LeafSystem to use an IntegratorBase integrator, without that integrator holding undeclared state.
Currently even the simplest apis for integration are non-const -- the IntegratorBase uses member variables for state in at least a few different ways:
But if we want to use an integrator to implement integration inside a system or constraint, then this corresponds to hidden state.
After a quick experiment here, my proposal is to offer a new entry point:
IntegratorBase<T>::IntegrateWithSingleFixedStepToTime(const T& t_target, Context<T>* context) const
which:mutable
.We could consider more sweeping support for const integration APIs (e.g. the multiple step variants), but this is already a good start.
The text was updated successfully, but these errors were encountered: