Skip to content

Commit

Permalink
Cunningham transfer function integration (#61)
Browse files Browse the repository at this point in the history
* move and rename 2d transfer functions

* wip to move from server to personal machine

* new, performant ctf method

* transfer integration working

* julia formatting

* cleanup and remove old file

* update defaults and re-order imports

* update unit tests for new implementation

* coarser float comparison
  • Loading branch information
fjebaker authored Nov 10, 2022
1 parent 7aa1d1d commit 658c4ea
Show file tree
Hide file tree
Showing 14 changed files with 567 additions and 627 deletions.
6 changes: 4 additions & 2 deletions src/Gradus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,14 @@ include("accretion-geometry/discs.jl")
include("accretion-geometry/meshes.jl")
include("accretion-geometry/bootstrap.jl")

include("cunningham-transfer.jl")
include("transfer-functions/cunningham-transfer-functions.jl")
include("transfer-functions/integration.jl")
include("transfer-functions/precision-solvers.jl")

include("corona-to-disc/sky-geometry.jl")
include("corona-to-disc/corona-models.jl")
include("corona-to-disc/disc-profiles.jl")
include("corona-to-disc/transfer-functions.jl")
include("transfer-functions/transfer-functions-2d.jl")
include("corona-to-disc/flux-calculations.jl")

include("metrics/boyer-lindquist-ad.jl")
Expand Down
6 changes: 4 additions & 2 deletions src/const-point-functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ const filter_early_term =
A [`FilterPointFunction`](@ref) that filters geodesics which intersected with the accretion
disc. Default: `NaN`.
"""
const filter_intersected =
FilterPointFunction((m, gp, max_time; kwargs...) -> gp.status == StatusCodes.IntersectedWithGeometry, NaN)
const filter_intersected = FilterPointFunction(
(m, gp, max_time; kwargs...) -> gp.status == StatusCodes.IntersectedWithGeometry,
NaN,
)

"""
affine_time(m::AbstractMetricParams, gp::AbstractGeodesicPoint, max_time)
Expand Down
6 changes: 5 additions & 1 deletion src/corona-to-disc/disc-profiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ function VoronoiDiscProfile(
d::AbstractAccretionDisc{T},
simsols::SciMLBase.EnsembleSolution{T},
) where {T}
VoronoiDiscProfile(m, d, filter(i -> i.prob.p.status == StatusCodes.IntersectedWithGeometry, simsols.u))
VoronoiDiscProfile(
m,
d,
filter(i -> i.prob.p.status == StatusCodes.IntersectedWithGeometry, simsols.u),
)
end

@noinline function findindex(vdp::VoronoiDiscProfile{D,V}, p) where {D,V}
Expand Down
Loading

0 comments on commit 658c4ea

Please sign in to comment.