Use NonlinearAliasSpecifier for NonlinearProblem #1138
Merged
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.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
This adds support for using the NonlinearAliasSpecifier to specify if
u0
is aliased or not.The reason I want to put it here for now is because with the current way that NonlinearSolve is structured, it would take significant refactoring to do this in a similar way this was done in OrdinaryDiffEq, LinearSolve etc. as well as supporting aliasing other variables.
alias_u0
is an argument to many of the internal NonlinearSolve functions, and it would take major changes to change it to using aNonlinearAliasSpecifier
, if it even makes sense to do so. Additionally, the__init
functions are spread out between the different solving algorithms, so there's no single place in NonlinearSolve to put this, like in the other packages.This will deprecate the
alias_u0
kwarg, and allow users to use aNonlinearAliasSpecifier
to specify ifu0
is aliased.A
Bool
alias
kwarg is supported as well.