Skip to content

Commit

Permalink
Merge pull request #17 from byuflowlab/BTV25-patch-1
Browse files Browse the repository at this point in the history
Update eigenvalues.jl
  • Loading branch information
andrewning authored Jun 12, 2024
2 parents 3550cb3 + 31f6c3a commit 2a479ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 2a479ae

Please sign in to comment.