I think I'm pretty much at 2b now
This commit is contained in:
@@ -22,6 +22,7 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
|
||||
sign = dF >= 0 ? 1 : -1
|
||||
ΔE_new = ΔE - n*F / ( dF + sign * √(abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
|
||||
i += 1
|
||||
if i > 100 throw(ErrorException("LaGuerre-Conway did not converge!")) end
|
||||
end
|
||||
F = 1 - a/r0_mag * (1-cos(ΔE))
|
||||
G = a * σ0/ √(μ) * (1-cos(ΔE)) + r0_mag * √(a) / √(μ) * sin(ΔE)
|
||||
@@ -40,6 +41,7 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
|
||||
sign = dF >= 0 ? 1 : -1
|
||||
ΔH_new = ΔH - n*F / ( dF + sign * √(abs((n-1)^2*dF^2 - n*(n-1)*F*d2F )))
|
||||
i += 1
|
||||
if i > 100 throw(ErrorException("LaGuerre-Conway did not converge!")) end
|
||||
end
|
||||
F = 1 - a/r0_mag * (1-cos(ΔH))
|
||||
G = a * σ0/ √(μ) * (1-cos(ΔH)) + r0_mag * √(-a) / √(μ) * sin(ΔH)
|
||||
@@ -48,9 +50,6 @@ function laguerre_conway(state::Vector{T}, μ::Float64, time::Float64) where T
|
||||
Gt = 1 - a/r * (1-cos(ΔH))
|
||||
end
|
||||
|
||||
if i > 100
|
||||
throw(ErrorException("LaGuerre-Conway did not converge!"))
|
||||
end
|
||||
|
||||
return [ F*state[1:3] + G*state[4:6]; Ft*state[1:3] + Gt*state[4:6]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user