Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eigenvalues.jl #17

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ explicit_unsteady_cache
implicit_unsteady
implicit_unsteady_cache
provide_rule
```
```
6 changes: 3 additions & 3 deletions src/eigenvalues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Make eigenvalue problems AD compatible with ForwardDiff and ReverseDiff
implicit_eigval(A, B, eigsolve) = eigsolve(A, B)[1] # If no AD, just solve normally. Returns only eigenvalue.

# forward cases
implicit_eigval(A::AbstractArray{<:ForwardDiff.Dual{T}}, B::AbstractArray{<:ForwardDiff.Dual{T}}, eigsolve) where {T} = eigval_fwd(A, B, eigsolve)
implicit_eigval(A, B::AbstractArray{<:ForwardDiff.Dual{T}}, eigsolve) where {T} = eigval_fwd(A, B, eigsolve)
implicit_eigval(A::AbstractArray{<:ForwardDiff.Dual{T}}, B, eigsolve) where {T} = eigval_fwd(A, B, eigsolve)
implicit_eigval(A::AbstractArray{<:ForwardDiff.Dual}, B::AbstractArray{<:ForwardDiff.Dual}, eigsolve) = eigval_fwd(A, B, eigsolve)
implicit_eigval(A, B::AbstractArray{<:ForwardDiff.Dual}, eigsolve) = eigval_fwd(A, B, eigsolve)
implicit_eigval(A::AbstractArray{<:ForwardDiff.Dual}, B, eigsolve) = eigval_fwd(A, B, eigsolve)

# reverse cases
implicit_eigval(A::Union{ReverseDiff.TrackedArray, AbstractArray{<:ReverseDiff.TrackedReal}}, B::Union{ReverseDiff.TrackedArray, AbstractArray{<:ReverseDiff.TrackedReal}}, eigsolve) = eigval_rev(A, B, eigsolve)
Expand Down
Loading