Skip to content

Commit 21011e0

Browse files
committed
Bump pkg versions [skip ci]
1 parent 17d991c commit 21011e0

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1616
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
1717
PhysicalConstants = "5ad8b20f-a522-5ce9-bfc9-ddf1d5bda6ab"
1818
PhysicalParticles = "78724250-4eb2-11e9-0f34-13a7aab864c5"
19-
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
2019
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
2120
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
2221
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -37,11 +36,10 @@ DocStringExtensions = "0.8, 0.9"
3736
Optim = "1"
3837
PhysicalConstants = "0.2"
3938
PhysicalParticles = "1"
40-
Plots = "1"
4139
PrecompileTools = "1"
4240
QuadGK = "2"
4341
Reexport = "1"
44-
StructArrays = "0.6"
42+
StructArrays = "0.6, 0.7"
4543
Unitful = "1"
4644
UnitfulAstro = "1"
4745
julia = "1.6"

src/Tools.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,23 @@ $(TYPEDSIGNATURES)
8787
Rotate along the positive z-axis.
8888
- `ratio`: rotational motion v.s. random motion. If equals `1`, only rotational component
8989
"""
90-
function rotational_velocity_acc(x, y, z, a, ratio = 1.0)
90+
function rotational_velocity_acc(x, y, z, a, rot_ratio = 1.0)
9191
u = unit(x)
9292
r = sqrt(x^2 + y^2 + z^2)
9393
v = sqrt(a * r)
94-
v_vec = -normalize(PVector(ustrip(u,x), ustrip(u,y), 0.0) × PVector(0.0, 0.0, 1.0)) * v
95-
v_vec = ratio * v_vec + (1-ratio) * randn(PVector{Float64}) * v # this will change the average velocity
96-
v_vec = v_vec + (1-ratio) * randn(PVector{Float64}) * v
94+
v_vec_rot = -normalize(PVector(ustrip(u,x), ustrip(u,y), 0.0) × PVector(0.0, 0.0, 1.0)) * v
95+
v_vec = rot_ratio * v_vec_rot + (1-rot_ratio) * normalize(randn(PVector{Float64})) * v
96+
# v_vec = v_vec_rot + (1-rot_ratio) * randn(PVector{Float64}) * v # this will change the average velocity
9797
end
9898

9999
"""
100100
$(TYPEDSIGNATURES)
101101
Rotate along the positive z-axis.
102-
- `ratio`: rotational motion v.s. random motion. If equals `1`, only rotational component
102+
- `rot_ratio`: rotational motion v.s. random motion. If equals `1`, only rotational component
103103
"""
104-
function rotational_velocity(x, y, v, ratio = 1.0)
104+
function rotational_velocity(x, y, v, rot_ratio = 1.0)
105105
u = unit(x)
106-
v_vec = -normalize(PVector(ustrip(u,x), ustrip(u,y), 0.0) × PVector(0.0, 0.0, 1.0)) * v
107-
# v_vec = ratio * v_vec + (1-ratio) * randn(PVector{Float64}) * v # this will change the average velocity
108-
v_vec = v_vec + (1-ratio) * randn(PVector{Float64}) * v
106+
v_vec_rot = -normalize(PVector(ustrip(u,x), ustrip(u,y), 0.0) × PVector(0.0, 0.0, 1.0)) * v
107+
v_vec = rot_ratio * v_vec_rot + (1-rot_ratio) * normalize(randn(PVector{Float64})) * v
108+
# v_vec = v_vec_rot + (1-rot_ratio) * randn(PVector{Float64}) * v # this will change the average velocity
109109
end

0 commit comments

Comments
 (0)