Skip to content

Commit

Permalink
Sort phi ticks
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianRuffert committed Jun 27, 2022
1 parent 8fffb50 commit 82f105b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ScalarPotentials/ScalarPotential.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ function get_2π_potential(sp::ScalarPotential{T, 3, Cylindrical}, axφ::Discret
new_pot[:, idx, :] = sp[:, il, :]
end
end
new_axφ = DiscreteAxis{AT, :periodic, :periodic}( new_int, new_ticks )
P = sortperm(new_ticks)
new_axφ = DiscreteAxis{AT, :periodic, :periodic}( new_int, new_ticks[P] )
new_axes = (sp.grid[1], new_axφ, sp.grid[3])
new_grid = Grid{AT, 3, Cylindrical, typeof(new_axes)}( new_axes )
ScalarPotential(sp, new_pot, new_grid)
ScalarPotential(sp, new_pot[:,P,:], new_grid)
end


Expand Down

0 comments on commit 82f105b

Please sign in to comment.