Skip to content

Commit cc67c3a

Browse files
authored
Update dependency minimum compats (#197)
* Bump minimum compats for Meshes and CRS * Remove pkgversion checks * Update CHANGELOG.md
1 parent e94fbfa commit cc67c3a

File tree

3 files changed

+59
-61
lines changed

3 files changed

+59
-61
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Increased minimum dependency version for Meshes.jl to `v0.52.12` and CoordRefSystems.jl to `0.16` to natively support some new geometry types.
13+
1014
### Removed
1115

1216
- Removed previously-deprecated support for use of `GaussKronrod` rules on geometries with more than one parametric dimension.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ MeshIntegralsEnzymeExt = "Enzyme"
2020

2121
[compat]
2222
CliffordNumbers = "0.1.9"
23-
CoordRefSystems = "0.15, 0.16, 0.17, 0.18"
23+
CoordRefSystems = "0.16, 0.17, 0.18"
2424
Enzyme = "0.13.47"
2525
FastGaussQuadrature = "1"
2626
HCubature = "1.5"
2727
LinearAlgebra = "1"
28-
Meshes = "0.51.20, 0.52, 0.53, 0.54"
28+
Meshes = "0.52.12, 0.53, 0.54"
2929
QuadGK = "2.1.1"
3030
Unitful = "1.19"
3131
julia = "1.9"

test/combinations.jl

Lines changed: 53 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -443,28 +443,26 @@ end
443443
end
444444

445445
@testitem "Meshes.Frustum" setup=[Combinations] begin
446-
if pkgversion(Meshes) >= v"0.52.12"
447-
# Geometry
448-
r = 2.5u"m"
449-
h = 3.5u"m"
450-
origin = Point(0, 0, 0)
451-
midpoint = Point(0.0u"m", 0.0u"m", 0.5 * h)
452-
apex = Point(0.0u"m", 0.0u"m", h)
453-
= Vec(0, 0, 1)
454-
xy_plane = Plane(origin, ẑ)
455-
base = Disk(xy_plane, r)
456-
mid_plane = Plane(midpoint, ẑ)
457-
mid_disk = Disk(mid_plane, 0.5 * r)
458-
frustum = Frustum(base, mid_disk)
459-
460-
# Integrand & Solution
461-
integrand(p) = 1.0u"A"
462-
solution = (7 // 8) ** r^2 * h / 3) * u"A"
463-
464-
# Package and run tests
465-
testable = TestableGeometry(integrand, frustum, solution)
466-
runtests(testable)
467-
end
446+
# Geometry
447+
r = 2.5u"m"
448+
h = 3.5u"m"
449+
origin = Point(0, 0, 0)
450+
midpoint = Point(0.0u"m", 0.0u"m", 0.5 * h)
451+
apex = Point(0.0u"m", 0.0u"m", h)
452+
= Vec(0, 0, 1)
453+
xy_plane = Plane(origin, ẑ)
454+
base = Disk(xy_plane, r)
455+
mid_plane = Plane(midpoint, ẑ)
456+
mid_disk = Disk(mid_plane, 0.5 * r)
457+
frustum = Frustum(base, mid_disk)
458+
459+
# Integrand & Solution
460+
integrand(p) = 1.0u"A"
461+
solution = (7 // 8) ** r^2 * h / 3) * u"A"
462+
463+
# Package and run tests
464+
testable = TestableGeometry(integrand, frustum, solution)
465+
runtests(testable)
468466
end
469467

470468
@testitem "Meshes.FrustumSurface" setup=[Combinations] begin
@@ -612,23 +610,21 @@ end
612610
end
613611

614612
@testitem "Meshes.Pyramid" setup=[Combinations] begin
615-
if pkgversion(Meshes) >= v"0.52.12"
616-
# Geometry
617-
a = Point(-1, -1, 0)
618-
b = Point(1, -1, 0)
619-
c = Point(1, 1, 0)
620-
d = Point(-1, 1, 0)
621-
apex = Point(0, 0, 1)
622-
pyramid = Pyramid(a, b, c, d, apex)
623-
# Integrand & Solution
624-
integrand(p) = 1.0u"A"
625-
w = norm(b - a)
626-
h = norm(d - a)
627-
solution = (1 // 3) * w * h * u"A*m"
628-
# Package and run tests
629-
testable = TestableGeometry(integrand, pyramid, solution)
630-
runtests(testable)
631-
end
613+
# Geometry
614+
a = Point(-1, -1, 0)
615+
b = Point(1, -1, 0)
616+
c = Point(1, 1, 0)
617+
d = Point(-1, 1, 0)
618+
apex = Point(0, 0, 1)
619+
pyramid = Pyramid(a, b, c, d, apex)
620+
# Integrand & Solution
621+
integrand(p) = 1.0u"A"
622+
w = norm(b - a)
623+
h = norm(d - a)
624+
solution = (1 // 3) * w * h * u"A*m"
625+
# Package and run tests
626+
testable = TestableGeometry(integrand, pyramid, solution)
627+
runtests(testable)
632628
end
633629

634630
@testitem "Meshes.Quadrangle" setup=[Combinations] begin
@@ -887,25 +883,23 @@ end
887883
end
888884

889885
@testitem "Meshes.Wedge" setup=[Combinations] begin
890-
if pkgversion(Meshes) >= v"0.52.12"
891-
# Geometry
892-
a₀ = Point(0, 0, 0)
893-
b₀ = Point(1, 0, 0)
894-
c₀ = Point(0, 1, 0)
895-
a₁ = Point(0, 0, 1)
896-
b₁ = Point(1, 0, 1)
897-
c₁ = Point(0, 1, 1)
898-
wedge = Wedge(a₀, b₀, c₀, a₁, b₁, c₁)
899-
900-
# Integrand & Solution
901-
function integrand(p::Meshes.Point)
902-
x, y, z = ustrip.(u"m", to(p))
903-
(x + 2y + 3z) * u"A"
904-
end
905-
solution = (5 // 4) * u"A*m^3"
906-
907-
# Package and run tests
908-
testable = TestableGeometry(integrand, wedge, solution)
909-
runtests(testable)
886+
# Geometry
887+
a₀ = Point(0, 0, 0)
888+
b₀ = Point(1, 0, 0)
889+
c₀ = Point(0, 1, 0)
890+
a₁ = Point(0, 0, 1)
891+
b₁ = Point(1, 0, 1)
892+
c₁ = Point(0, 1, 1)
893+
wedge = Wedge(a₀, b₀, c₀, a₁, b₁, c₁)
894+
895+
# Integrand & Solution
896+
function integrand(p::Meshes.Point)
897+
x, y, z = ustrip.(u"m", to(p))
898+
(x + 2y + 3z) * u"A"
910899
end
900+
solution = (5 // 4) * u"A*m^3"
901+
902+
# Package and run tests
903+
testable = TestableGeometry(integrand, wedge, solution)
904+
runtests(testable)
911905
end

0 commit comments

Comments
 (0)