Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ n(\omega, \omega_{\textrm{th}}) = \frac{1}{e^{\omega/\omega_{\textrm{th}}} - 1},
```
where ``\hbar`` is the reduced Planck constant, and ``k_B`` is the Boltzmann constant.
"""
function n_thermal(ω::Real, ω_th::Real)::Float64
function n_thermal(ω::T1, ω_th::T2) where {T1<:Real,T2<:Real}
x = exp(ω / ω_th)
n = ((x != 1) && (ω_th > 0)) ? (1.0 / (x - 1.0)) : 0.0
return n
n = ((x != 1) && (ω_th > 0)) ? 1 / (x - 1) : 0
return _FType(promote_type(T1, T2))(n)
end

_get_dense_similar(A::AbstractArray, args...) = similar(A, args...)
Expand Down