diff --git a/src/metrics/dilaton-axion-ad.jl b/src/metrics/dilaton-axion-ad.jl index 6bacbbbb..c770effe 100644 --- a/src/metrics/dilaton-axion-ad.jl +++ b/src/metrics/dilaton-axion-ad.jl @@ -22,12 +22,12 @@ A(a, θ, δ, W, Δhat) = δ^2 - Δhat * (W * a * sin(θ))^2 R = M # check these for the normalisation term R - βb = β / b - βa = β / a - βab = β / (a * b) + βb = β == zero(β) ? zero(β) : β / b + βa = β == zero(β) ? zero(β) : β / a + βab = β == zero(β) ? zero(β) : β / (a * b) Σ₀ = Σ(r, a, θ) - Δ₀ = Δ(r, R, a) + Δ₀ = Δ(r, 2R, a) Δhat₀ = Δhat(Δ₀, β, b, r, βb, R) Σhat₀ = Σhat(Σ₀, β, b, r, βb, a, θ, R) δ₀ = δ(r, b, a) @@ -68,7 +68,9 @@ end metric_components(m::DilatonAxion{T}, rθ) where {T} = __DilatonAxionAD.metric_components(m.M, m.a, m.β, m.b, rθ) -inner_radius(m::DilatonAxion{T}) where {T} = - m.M + m.b + √((m.M + m.b)^2 - m.a^2 + m.β^2 - (m.M - 2m.b) * m.M * (m.β / m.b)^2) +function inner_radius(m::DilatonAxion{T}) where {T} + βb = m.β == zero(m.β) ? zero(m.β) : m.β / m.b + m.M + m.b + √((m.M + m.b)^2 - m.a^2 + m.β^2 - (m.M - 2m.b) * m.M * βb^2) +end export DilatonAxion diff --git a/test/smoke-tests/special-radii.jl b/test/smoke-tests/special-radii.jl index 3d89ce83..e08cdfaf 100644 --- a/test/smoke-tests/special-radii.jl +++ b/test/smoke-tests/special-radii.jl @@ -13,6 +13,8 @@ using StaticArrays JohannsenMetric(M = 1.0, a = 0.998, α13 = 1.0), JohannsenMetric(M = 1.0, a = 0.998, α22 = 1.0), DilatonAxion(M = 1.0, a = 0.6, β = -0.5, b = 0.1), + KerrMetric(M = 1.0, a = 0.0), + DilatonAxion(M = 1.0, a = 0.0, b = 0.0, β = 0.0), ) @testset "iscos" begin @@ -26,7 +28,9 @@ using StaticArrays 8.99437445480357, 2.8482863127671534, 1.1306596884484472, - 32.95283734688169, + 29.701502242023523, + 6.00000000, + 6.00000000, ], ) isco_r = Gradus.isco(m)