Skip to content

Commit

Permalink
Bump meshes compatibility (#173)
Browse files Browse the repository at this point in the history
* Rename coordinates to coords in Meshes v0.43

* Adapt to new access method
  • Loading branch information
henry2004y authored May 26, 2024
1 parent 81ac4e8 commit 9572a11
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TestParticle"
uuid = "953b605b-f162-4481-8f7f-a191c2bb40e3"
authors = ["Hongyang Zhou <[email protected]>, and Tiancheng Liu <[email protected]>"]
version = "0.10.5"
version = "0.10.6"

[deps]
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
Expand All @@ -20,7 +20,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
ChunkSplitters = "2"
Elliptic = "1"
Interpolations = "0.14, 0.15"
Meshes = "0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43"
Meshes = "0.43"
PrecompileTools = "1"
SciMLBase = "2.24"
SpecialFunctions = "1.5, 2"
Expand Down
2 changes: 1 addition & 1 deletion src/TestParticle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using SciMLBase: AbstractODEProblem, AbstractODEFunction, AbstractODESolution, R
DEFAULT_SPECIALIZATION, ODEFunction,
LinearInterpolation
using StaticArrays: SVector, @SMatrix, MVector, SA
using Meshes: coordinates, spacing, embeddim, CartesianGrid
using Meshes: coords, spacing, embeddim, CartesianGrid
using ChunkSplitters
using PrecompileTools: @setup_workload, @compile_workload

Expand Down
18 changes: 9 additions & 9 deletions src/utility/utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ end

"Return uniform range from 2D/3D CartesianGrid."
function makegrid(grid::CartesianGrid{3, T}) where T
gridmin = coordinates(minimum(grid))
gridmax = coordinates(maximum(grid))
gridmin = coords(minimum(grid))
gridmax = coords(maximum(grid))
Δx = spacing(grid)

gridx = range(gridmin[1], gridmax[1], step=Δx[1])
gridy = range(gridmin[2], gridmax[2], step=Δx[2])
gridz = range(gridmin[3], gridmax[3], step=Δx[3])
gridx = range(gridmin.x.val, gridmax.x.val, step=Δx[1].val)
gridy = range(gridmin.y.val, gridmax.y.val, step=Δx[2].val)
gridz = range(gridmin.z.val, gridmax.z.val, step=Δx[3].val)

gridx, gridy, gridz
end

function makegrid(grid::CartesianGrid{2, T}) where T
gridmin = coordinates(minimum(grid))
gridmax = coordinates(maximum(grid))
gridmin = coords(minimum(grid))
gridmax = coords(maximum(grid))
Δx = spacing(grid)

gridx = range(gridmin[1], gridmax[1], step=Δx[1])
gridy = range(gridmin[2], gridmax[2], step=Δx[2])
gridx = range(gridmin.x.val, gridmax.x.val, step=Δx[1].val)
gridy = range(gridmin.y.val, gridmax.y.val, step=Δx[2].val)

gridx, gridy
end
Expand Down

2 comments on commit 9572a11

@henry2004y
Copy link
Owner Author

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/107697

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

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.10.6 -m "<description of version>" 9572a11e1fc4becb799bb8a0d38f8e6fb73048f2
git push origin v0.10.6

Please sign in to comment.