Assumed Implicit ordering in Cache is not guaranteed
register_variables!(cache, dynamic_variablenames=(:a,:b),
rhs_variablenames=(:rhs_a,:rhs_b))
Because VariablesDict
currently uses an unsorted Dict under the hood,
wrapping arrays with wrap_dynamic_variables!(cache, u), wrap_rhs_variables!(cache, u)
does not guarantee that
the vectors are wrapped as u = [<a>, <b>], du = [<rhs_a>, <rhs_b>]
.
I think that is what happened in !6 (merged) and lead to the problem of LLF not working (which is just a coincidence,
since the real problem lies in the variables q,E
not evolving).
TODO: Move to ordered dicts in VariablesDict
to remove the ambiguity when wrapping.