TugJulia/julia/tug/Core/Utils.jl
2023-11-30 13:53:39 +01:00

13 lines
349 B
Julia

function calcAlphaIntercell(alpha1::T, alpha2::T) where {T}
2 / ((1 / alpha1) + (1 / alpha2))
end
function calcAlphaIntercell(alpha1::Vector{T}, alpha2::Vector{T}) where {T}
2 ./ ((1 ./ alpha1) .+ (1 ./ alpha2))
end
function calcAlphaIntercell(alpha1::Matrix{T}, alpha2::Matrix{T}) where {T}
2 ./ ((1 ./ alpha1) .+ (1 ./ alpha2))
end