Skip to content

Commit

Permalink
Adapt to changes in OrbitalElements v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRoule committed Mar 25, 2024
1 parent 3c7310f commit 0f7a501
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions src/WMat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,26 @@ end
########################################################################

"""
Wintegrand(w,a,e,L,Ω1,Ω2,ψ,dψ,d2ψ,basis,params)
Wintegrand(model, w, a, e, L, Ω1, Ω2, basis, params)
Integrand computation/update for FT of basis elements
"""
function Wintegrand(model::OrbitalElements.Potential,
w::Float64,
a::Float64,e::Float64,L::Float64,
Ω1::Float64,Ω2::Float64,
basis::AstroBasis.AbstractAstroBasis,
params::LinearParameters)::Tuple{Float64,Float64}


function Wintegrand(
model::Potential,
w::Float64,
a::Float64,
e::Float64,
L::Float64,
Ω1::Float64,
Ω2::Float64,
basis::AstroBasis.AbstractAstroBasis,
params::LinearParameters
)::Tuple{Float64,Float64}
# Current location of the radius, r=r(w)
rval = OrbitalElements.radius_from_anomaly(w,a,e)
rval = OrbitalElements.radius_from_anomaly(w, a, e, model, params.Orbitalparams)

# Current value of the radial frequency integrand (almost dθ/dw)
gval = OrbitalElements.Θ(w,a,e,model,params.Orbitalparams)

gval = OrbitalElements.Θ(w, a, e, model, params.Orbitalparams)

# collect the basis elements (in place!)
AstroBasis.tabUl!(basis,params.lharmonic,rval)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
# Model Potential
const modelname = "Plummer"
const bc, M = 1.,1. # G is defined above: must agree with basis!
model = OrbitalElements.PlummerPotential()
model = OrbitalElements.NumericalPlummer()

@testset "PotentialTest" begin
@test ψ(1.0,model) -0.707106 atol=0.000001
Expand Down

0 comments on commit 0f7a501

Please sign in to comment.