Skip to content

Commit 17d991c

Browse files
committed
fix SphericalSystem total mass, release v0.1.4
1 parent 6a3f7cd commit 17d991c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
version:
14-
- '1.11.1'
14+
- '1.11.2'
1515
os:
1616
- ubuntu-latest
1717
- macOS-latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AstroIC"
22
uuid = "5b3ca070-48c3-41ea-b469-89825dd01fde"
33
authors = ["islent <[email protected]>"]
4-
version = "0.1.3"
4+
version = "0.1.4"
55

66
[deps]
77
AstroIO = "c85a633c-0c3f-44a2-bffe-7f9d0681b3e7"

src/spherical.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ function generate(config::SphericalSystem, units = uAstro;
6060
dx = x[2] - x[1]
6161
if config.mass_shell isa Function
6262
shell_masses = config.mass_shell.(x)
63-
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, shell_masses) * ustrip(uLen, dx)
63+
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, shell_masses)
6464
elseif config.mass_shell isa Dict || config.mass_shell isa DataFrame
6565
spl = Spline1D(ustrip.(uLen, config.mass_shell["r"]), ustrip.(uMass/uLen, config.mass_shell["m"]))
66-
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, spl(ustrip.(uLen, x))*uMass/uLen) * ustrip(uLen, dx)
66+
TotalMass = PhysicalParticles.NumericalIntegration.integrate(x, spl(ustrip.(uLen, x))*uMass/uLen)
6767
end
6868

6969
pos = rand_pos_3d.(R)

0 commit comments

Comments
 (0)