From e6e9a5b29cd42b56659f971fd8bc35c334f52d6d Mon Sep 17 00:00:00 2001 From: lxvm Date: Sun, 3 Mar 2024 12:23:21 -0500 Subject: [PATCH] fix buffer bugs --- src/Integrals.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Integrals.jl b/src/Integrals.jl index e7d53ac..5edee6d 100644 --- a/src/Integrals.jl +++ b/src/Integrals.jl @@ -117,7 +117,7 @@ end function init_cacheval(alg::QuadGKJL, prob::IntegralProblem) alg.buffer === nothing && return - lb, ub = prob.domain + lb, ub = map(first, prob.domain) mid = (lb + ub) / 2 prototype = get_prototype(prob) * mid TX = typeof(mid) @@ -189,6 +189,7 @@ end function init_cacheval(alg::HCubatureJL, prob::IntegralProblem) alg.buffer === nothing && return prototype = get_prototype(prob) + lb, ub = map(x -> x isa Number ? tuple(x) : x, prob.domain) HCubature.hcubature_buffer(x -> prototype, lb, ub; norm = alg.norm) end function __solvebp_call(cache::IntegralCache, alg::HCubatureJL, sensealg, domain, p;