Last active 3 months ago

integral_solve.jl Raw
1using Integrals
2
3# Recommended integration algorithms are:
4# For scalar functions: QuadGKJL()
5# For ≤ 8 dimensional vector functions: HCubatureJL()
6# For > 8 dimensional vector functions: MonteCarloIntegration.vegas(f, st, en, kwargs...)
7
8function Integrals.solve(p::IntegralProblem; kwargs...)
9 if length(p.lb) <= 1
10 return solve(p, QuadGKJL(); kwargs...)
11 elseif length(p.lb) <= 8
12 return solve(p, HCubatureJL(); kwargs...)
13 else # length(p.lb) > 8
14 return solve(p, VEGAS(); kwargs...)
15 end
16end