Skip to content

Commit 79a1b46

Browse files
committed
Remove unnecessary use of GeometryOrDomain, switch usings to imports
1 parent 43ddd4a commit 79a1b46

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

ext/MeshIntegralsEnzymeExt.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module MeshIntegralsEnzymeExt
22

3-
using MeshIntegrals: MeshIntegrals, AutoEnzyme, GeometryOrDomain
4-
using Meshes: Meshes
5-
using Enzyme: Enzyme
3+
import MeshIntegrals
4+
import Meshes
5+
import Enzyme
66

77
function MeshIntegrals.jacobian(
88
geometry::Meshes.Geometry,
99
ts::Union{AbstractVector{T}, Tuple{T, Vararg{T}}},
10-
::AutoEnzyme
10+
::MeshIntegrals.AutoEnzyme
1111
) where {T <: AbstractFloat}
1212
Dim = Meshes.paramdim(geometry)
1313
if Dim != length(ts)
@@ -16,9 +16,10 @@ function MeshIntegrals.jacobian(
1616
return Meshes.to.(Enzyme.jacobian(Enzyme.Forward, geometry, ts...))
1717
end
1818

19-
# Supports all geometries except for those that throw errors
20-
# See GitHub Issue #154 for more information
21-
MeshIntegrals.supports_autoenzyme(::Type{<:GeometryOrDomain}) = true
19+
# Supports all geometries/domains by default
20+
MeshIntegrals.supports_autoenzyme(::Type{<:Meshes.Geometry}) = true
21+
MeshIntegrals.supports_autoenzyme(::Type{<:Meshes.Domain}) = true
22+
# except for those that throw errors (see GitHub Issue #154)
2223
MeshIntegrals.supports_autoenzyme(::Type{<:Meshes.BezierCurve}) = false
2324
MeshIntegrals.supports_autoenzyme(::Type{<:Meshes.CylinderSurface}) = false
2425
MeshIntegrals.supports_autoenzyme(::Type{<:Meshes.Cylinder}) = false

0 commit comments

Comments
 (0)