Skip to content

Commit

Permalink
Combine methods with optional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Sep 22, 2024
1 parent 26dbdff commit f90217b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/integral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,12 @@ function integral(
_integral(f, geometry, HAdaptiveCubature())
end

# with algorithm but without T specified
function integral(
f::F,
geometry::G,
settings::I
) where {F<:Function, G<:Meshes.Geometry, I<:IntegrationAlgorithm}
_integral(f, geometry, settings)
end

# with algorithm and T specified
function integral(
f::F,
geometry::G,
settings::I,
FP::Type{T}
FP::Type{T} = Float64
) where {F<:Function, G<:Meshes.Geometry, I<:IntegrationAlgorithm, T<:AbstractFloat}
_integral(f, geometry, settings, FP)
end
Expand Down

0 comments on commit f90217b

Please sign in to comment.