Skip to content

Use adaptive k-sampling in full solve command#43

Draft
hersle wants to merge 1 commit into
mainfrom
ksampling_solve
Draft

Use adaptive k-sampling in full solve command#43
hersle wants to merge 1 commit into
mainfrom
ksampling_solve

Conversation

@hersle
Copy link
Copy Markdown
Owner

@hersle hersle commented Oct 23, 2025

using SymBoltz, Plots
M = ΛCDM(K = nothing) # flat
pars = SymBoltz.parameters_Planck18(M)
prob = CosmologyProblem(M, pars)

ks = [1.0, 2000.0]
@time sol = solve(prob, ks; adaptiveopts = (rtol = 1e-3,))
τs = sol[M.τ]
Ss = sol(M.ST0, τs, sol.ks)
surface(sol.ks, τs, Ss; ylims = (0.03, 0.08), title = "$(length(sol.ks)) ks")
image
plot(sol.ks, eachindex(sol.ks); marker = :circle, label = nothing)
image

@hersle hersle marked this pull request as draft October 23, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant