Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Increased minimum dependency version for Meshes.jl to `v0.52.12` and CoordRefSystems.jl to `0.16` to natively support some new geometry types.

### Removed

- Removed previously-deprecated support for use of `GaussKronrod` rules on geometries with more than one parametric dimension.
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ MeshIntegralsEnzymeExt = "Enzyme"

[compat]
CliffordNumbers = "0.1.9"
CoordRefSystems = "0.15, 0.16, 0.17, 0.18"
CoordRefSystems = "0.16, 0.17, 0.18"
Enzyme = "0.13.47"
FastGaussQuadrature = "1"
HCubature = "1.5"
LinearAlgebra = "1"
Meshes = "0.51.20, 0.52, 0.53, 0.54"
Meshes = "0.52.12, 0.53, 0.54"
QuadGK = "2.1.1"
Unitful = "1.19"
julia = "1.9"
112 changes: 53 additions & 59 deletions test/combinations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -443,28 +443,26 @@ end
end

@testitem "Meshes.Frustum" setup=[Combinations] begin
if pkgversion(Meshes) >= v"0.52.12"
# Geometry
r = 2.5u"m"
h = 3.5u"m"
origin = Point(0, 0, 0)
midpoint = Point(0.0u"m", 0.0u"m", 0.5 * h)
apex = Point(0.0u"m", 0.0u"m", h)
ẑ = Vec(0, 0, 1)
xy_plane = Plane(origin, ẑ)
base = Disk(xy_plane, r)
mid_plane = Plane(midpoint, ẑ)
mid_disk = Disk(mid_plane, 0.5 * r)
frustum = Frustum(base, mid_disk)

# Integrand & Solution
integrand(p) = 1.0u"A"
solution = (7 // 8) * (π * r^2 * h / 3) * u"A"

# Package and run tests
testable = TestableGeometry(integrand, frustum, solution)
runtests(testable)
end
# Geometry
r = 2.5u"m"
h = 3.5u"m"
origin = Point(0, 0, 0)
midpoint = Point(0.0u"m", 0.0u"m", 0.5 * h)
apex = Point(0.0u"m", 0.0u"m", h)
ẑ = Vec(0, 0, 1)
xy_plane = Plane(origin, ẑ)
base = Disk(xy_plane, r)
mid_plane = Plane(midpoint, ẑ)
mid_disk = Disk(mid_plane, 0.5 * r)
frustum = Frustum(base, mid_disk)

# Integrand & Solution
integrand(p) = 1.0u"A"
solution = (7 // 8) * (π * r^2 * h / 3) * u"A"

# Package and run tests
testable = TestableGeometry(integrand, frustum, solution)
runtests(testable)
end

@testitem "Meshes.FrustumSurface" setup=[Combinations] begin
Expand Down Expand Up @@ -612,23 +610,21 @@ end
end

@testitem "Meshes.Pyramid" setup=[Combinations] begin
if pkgversion(Meshes) >= v"0.52.12"
# Geometry
a = Point(-1, -1, 0)
b = Point(1, -1, 0)
c = Point(1, 1, 0)
d = Point(-1, 1, 0)
apex = Point(0, 0, 1)
pyramid = Pyramid(a, b, c, d, apex)
# Integrand & Solution
integrand(p) = 1.0u"A"
w = norm(b - a)
h = norm(d - a)
solution = (1 // 3) * w * h * u"A*m"
# Package and run tests
testable = TestableGeometry(integrand, pyramid, solution)
runtests(testable)
end
# Geometry
a = Point(-1, -1, 0)
b = Point(1, -1, 0)
c = Point(1, 1, 0)
d = Point(-1, 1, 0)
apex = Point(0, 0, 1)
pyramid = Pyramid(a, b, c, d, apex)
# Integrand & Solution
integrand(p) = 1.0u"A"
w = norm(b - a)
h = norm(d - a)
solution = (1 // 3) * w * h * u"A*m"
# Package and run tests
testable = TestableGeometry(integrand, pyramid, solution)
runtests(testable)
end

@testitem "Meshes.Quadrangle" setup=[Combinations] begin
Expand Down Expand Up @@ -887,25 +883,23 @@ end
end

@testitem "Meshes.Wedge" setup=[Combinations] begin
if pkgversion(Meshes) >= v"0.52.12"
# Geometry
a₀ = Point(0, 0, 0)
b₀ = Point(1, 0, 0)
c₀ = Point(0, 1, 0)
a₁ = Point(0, 0, 1)
b₁ = Point(1, 0, 1)
c₁ = Point(0, 1, 1)
wedge = Wedge(a₀, b₀, c₀, a₁, b₁, c₁)

# Integrand & Solution
function integrand(p::Meshes.Point)
x, y, z = ustrip.(u"m", to(p))
(x + 2y + 3z) * u"A"
end
solution = (5 // 4) * u"A*m^3"

# Package and run tests
testable = TestableGeometry(integrand, wedge, solution)
runtests(testable)
# Geometry
a₀ = Point(0, 0, 0)
b₀ = Point(1, 0, 0)
c₀ = Point(0, 1, 0)
a₁ = Point(0, 0, 1)
b₁ = Point(1, 0, 1)
c₁ = Point(0, 1, 1)
wedge = Wedge(a₀, b₀, c₀, a₁, b₁, c₁)

# Integrand & Solution
function integrand(p::Meshes.Point)
x, y, z = ustrip.(u"m", to(p))
(x + 2y + 3z) * u"A"
end
solution = (5 // 4) * u"A*m^3"

# Package and run tests
testable = TestableGeometry(integrand, wedge, solution)
runtests(testable)
end
Loading