Skip to content

Commit 841e0d2

Browse files
authored
Add comments and whitespace for clarity
1 parent d69538d commit 841e0d2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/integral.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,20 @@ function _integral(
4444
FP::Type{T} = Float64,
4545
diff_method::DM = _default_method(geometry)
4646
) where {DM <: DifferentiationMethod, T <: AbstractFloat}
47-
# Pass through to dim-specific workers in next section of this file
4847
N = Meshes.paramdim(geometry)
48+
49+
# Implementation depends on number of parametric dimensions over which to integrate
4950
if N == 1
5051
integrand(t) = f(geometry(t)) * differential(geometry, (t,), diff_method)
5152
return QuadGK.quadgk(integrand, zero(FP), one(FP); rule.kwargs...)[1]
5253
elseif N == 2
54+
# Issue deprecation warning
5355
Base.depwarn("Use `HAdaptiveCubature` instead of nested `GaussKronrod` rules.", :integral)
56+
57+
# Nested integration
5458
integrand(u, v) = f(geometry(u, v)) * differential(geometry, (u, v), diff_method)
55-
(v) = QuadGK.quadgk(u -> integrand(u, v), zero(FP), one(FP); rule.kwargs...)[1]
56-
return QuadGK.quadgk(v -> ∫₁(v), zero(FP), one(FP); rule.kwargs...)[1]
59+
(v) = QuadGK.quadgk(u -> integrand(u, v), zero(FP), one(FP); rule.kwargs...)[1]
60+
return QuadGK.quadgk(, zero(FP), one(FP); rule.kwargs...)[1]
5761
else
5862
_error_unsupported_combination("geometry with more than two parametric dimensions",
5963
"GaussKronrod")

0 commit comments

Comments
 (0)