Skip to content

Commit

Permalink
fix SphericalSystem total mass, release v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
islent committed Dec 12, 2024
1 parent 6a3f7cd commit 17d991c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
version:
- '1.11.1'
- '1.11.2'
os:
- ubuntu-latest
- macOS-latest
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AstroIC"
uuid = "5b3ca070-48c3-41ea-b469-89825dd01fde"
authors = ["islent <[email protected]>"]
version = "0.1.3"
version = "0.1.4"

[deps]
AstroIO = "c85a633c-0c3f-44a2-bffe-7f9d0681b3e7"
Expand Down
4 changes: 2 additions & 2 deletions src/spherical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function generate(config::SphericalSystem, units = uAstro;
dx = x[2] - x[1]
if config.mass_shell isa Function
shell_masses = config.mass_shell.(x)
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, shell_masses) * ustrip(uLen, dx)
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, shell_masses)
elseif config.mass_shell isa Dict || config.mass_shell isa DataFrame
spl = Spline1D(ustrip.(uLen, config.mass_shell["r"]), ustrip.(uMass/uLen, config.mass_shell["m"]))
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, spl(ustrip.(uLen, x))*uMass/uLen) * ustrip(uLen, dx)
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, spl(ustrip.(uLen, x))*uMass/uLen)
end

pos = rand_pos_3d.(R)
Expand Down

2 comments on commit 17d991c

@islent
Copy link
Member Author

@islent islent commented on 17d991c Dec 12, 2024

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:
fix SphericalSystem total mass

@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/121259

Tagging

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.1.4 -m "<description of version>" 17d991cda89cf9beee1dd844f1b857aceabb2652
git push origin v0.1.4

Please sign in to comment.