Skip to content

Commit

Permalink
fix: Correct scale factor on last half step
Browse files Browse the repository at this point in the history
There is a missing `; a = a(t)` in the argument to `outer_step!` that
does the closing half step.  This is never an issue if there is no
background expansion.

Add it in.

This should maybe not be an optional argument; it shouldn't be possible
to accidentally call with the wrong `a(t)`.
  • Loading branch information
musoke committed Mar 9, 2023
1 parent cf1800e commit ac6416b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UltraDark"
uuid = "1c8d022d-dfc0-4b41-80ab-3fc7e88cdfea"
authors = ["Nathan Musoke <[email protected]>"]
version = "0.9.2"
version = "0.9.3"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
2 changes: 1 addition & 1 deletion src/UltraDark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function take_steps!(grids, t_start, Δt, n, output_config, a, constants, extern
output_summary_row(grids, output_config, t, a(t), Δt, constants, external_states)
end

outer_step!(Δt / 2, grids, constants)
outer_step!(Δt / 2, grids, constants; a = a(t))
for s in external_states
outer_step!(Δt / 2, grids, constants, s; a = a(t))
end
Expand Down

2 comments on commit ac6416b

@musoke
Copy link
Owner Author

@musoke musoke commented on ac6416b Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/79227

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.3 -m "<description of version>" ac6416be5ac3a2afd05f107b25baf0c2f2116d14
git push origin v0.9.3

Please sign in to comment.