Conversation
Dummy-derivative selection and tearing only looked at structure, so a coordinate whose constraint-Jacobian column vanishes at the initial point could be made algebraic, or an equation solved by dividing by a coefficient such as `sin(ω*t)` that is zero at the initial time. StateSelection: `dummy_derivative_graph!` accepts a `numjac` callback returning the Jacobian of an SCC evaluated at the initial point. After the structural selection at each differentiation level, the selected columns are checked for numerical rank (row-equilibrated); only when they are rank-deficient are the candidates reordered by a greedy numerically independent set (in priority order, widened with unassigned highest derivatives incident to the SCC if needed) and selected again. ModelingToolkitTearing: `TearingState` lazily evaluates expressions at the initial point, built from bindings, initial conditions, the start of the system's `tspan` and an optional explicit `initial_point` map (guesses are not used), and `find_eq_solvables!` adds no solvable edge for a coefficient that is exactly zero there. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
To the AI bot, please run the tests of MultibodyComponents.jl with this PR before merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dummy-derivative selection and tearing only look at structure, so a coordinate whose constraint-Jacobian column vanishes at
t0can be made algebraic, or an equation can be solved by dividing by a coefficient likesin(ω t)that is zero att0(SciML/ModelingToolkit.jl#5212).StateSelection.dummy_derivative_graph!takes anumjaccallback; when the structural selection of an SCC is numerically rank-deficient at the initial point, the candidates are reordered by a greedy numerically independent set (in priority order, widened with unassigned highest derivatives incident to the SCC if needed) and re-selected. Non-singular selections are unchanged.TearingStatelazily evaluates expressions at the initial point (initial_conditions, bindings, the start of the system'stspan, and an explicitinitial_pointmap when given; guesses are not used);find_eq_solvables!adds no solvable edge for a coefficient that is exactly zero there. Evaluation is exception-safe.Tested: new unit tests in both packages; end-to-end tests live in the companion ModelingToolkit PR (car axis, pendulum and two-constraint analogs of the slider crank and Andrews problems).
🤖 Generated with Claude Code