Skip to content

Commit

Permalink
WMat refactoring
Browse files Browse the repository at this point in the history
Independant Fourier transform w.r.t. angle from basis FT computations
remove the basisFT structures
moved the angle_gradients and v to vp mappings to OrbitalElements
  • Loading branch information
MathieuRoule committed Mar 27, 2024
1 parent 0f7a501 commit 396ba6c
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 844 deletions.
8 changes: 4 additions & 4 deletions src/GFunc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function MakeGu(ndFdJ::Function,

# vp -> v
vp = δvp*(kvval-0.5)
vval = vFromvp(vp,vmin,vmax,params.VMAPN)
vval = v_from_vp(vp, vmin, vmax, n=params.VMAPN)

####
# (u,v) -> (a,e)
Expand All @@ -76,12 +76,12 @@ function MakeGu(ndFdJ::Function,
# compute Jacobians
#####
# vp -> v
Jacv = DvDvp(vp,vmin,vmax,params.VMAPN)
_, Jacv = v_from_vp_derivative(vp, vmin, vmax, n=params.VMAPN)

# (u,v) -> (α,β).
# Renormalized. (2/(ωmax-ωmin) * |∂(α,β)/∂(u,v)|)
resonance = OrbitalElements.Resonance(n1,n2,Wdata.ωmin,Wdata.ωmax)
RenormalizedJacαβ = (2/(Wdata.ωmax-Wdata.ωmin))*OrbitalElements.uv_to_αβ_jacobian(uval,vval,resonance)
resonance = Resonance(n1,n2,Wdata.ωmin,Wdata.ωmax)
RenormalizedJacαβ = (2/(Wdata.ωmax-Wdata.ωmin)) * uv_to_αβ_jacobian(uval,vval,resonance)

# (α,β) -> (E,L): this is the most expensive function here,
# so we have pre-tabulated it
Expand Down
Loading

0 comments on commit 396ba6c

Please sign in to comment.