-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #414 from SciML/ap/linearsolve_retcode
Robust Singular Jacobian Handling
- Loading branch information
Showing
16 changed files
with
259 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
DescentResult(; δu = missing, u = missing, success::Bool = true, | ||
linsolve_success::Bool = true, extras = (;)) | ||
Construct a `DescentResult` object. | ||
### Keyword Arguments | ||
- `δu`: The descent direction. | ||
- `u`: The new iterate. This is provided only for multi-step methods currently. | ||
- `success`: Certain Descent Algorithms can reject a descent direction for example | ||
[`GeodesicAcceleration`](@ref). | ||
- `linsolve_success`: Whether the line search was successful. | ||
- `extras`: A named tuple containing intermediates computed during the solve. | ||
For example, [`GeodesicAcceleration`](@ref) returns `NamedTuple{(:v, :a)}` containing | ||
the "velocity" and "acceleration" terms. | ||
""" | ||
@concrete struct DescentResult | ||
δu | ||
u | ||
success::Bool | ||
linsolve_success::Bool | ||
extras | ||
end | ||
|
||
function DescentResult(; δu = missing, u = missing, success::Bool = true, | ||
linsolve_success::Bool = true, extras = (;)) | ||
@assert δu !== missing || u !== missing | ||
return DescentResult(δu, u, success, linsolve_success, extras) | ||
end |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.