Skip to content

Commit

Permalink
Merge pull request #12 from jlapeyre/fix/style
Browse files Browse the repository at this point in the history
Make some small style/effciency improvements
  • Loading branch information
matthewware committed Apr 8, 2020
2 parents 67ff8a5 + fe81a24 commit 6c5c806
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/char-values.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ function charλ(q::Real, nu_::Real; k::UnitRange=1:1) # reduced = true
D = (0.24 + 0.0214*nu0)/(1 + 0.059*nu0)
N = ceil(Int, (nu0 + 2 + C*abs(q)^D)/2) # matrix size is 2N+1

(two, q2, nu2) = float.(promote(2, q, nu))
(two, q2, nu2) = float.(promote(2, q, nu)) # d0 and d1 must be of the same type
d0 = (two .* (-N:N) .- nu2).^2
d1 = q2 .* ones(eltype(q2), 2 * N)
d1 = fill(q2, 2 * N)
A = SymTridiagonal(d0, d1)
a = eigvals(A, k)
a = eigvals!(A, k)
return a
end

Expand Down

0 comments on commit 6c5c806

Please sign in to comment.