From 5337ec8f29ea7d9e8c40dd965c02b626826b8b1d Mon Sep 17 00:00:00 2001 From: lxvm Date: Sun, 19 Nov 2023 17:01:56 -0500 Subject: [PATCH] modify inplace --- ext/IntegralsArblibExt.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/IntegralsArblibExt.jl b/ext/IntegralsArblibExt.jl index bbb433d1..1c4356b4 100644 --- a/ext/IntegralsArblibExt.jl +++ b/ext/IntegralsArblibExt.jl @@ -14,9 +14,10 @@ function Integrals.__solvebp_call(prob::IntegralProblem, alg::ArblibJL, sensealg @assert prob.f isa IntegralFunction if isinplace(prob) - y_ = similar(prob.f.integrand_prototype, typeof(Acb(0))) + res = Acb(0) + y_ = similar(prob.f.integrand_prototype, typeof(res)) f_ = (y, x; kws...) -> Arblib.set!(y, only(prob.f(y_, x, p; kws...))) - val = Arblib.integrate!(f_, Acb(0), lb, ub, atol=abstol, rtol=reltol, + val = Arblib.integrate!(f_, res, lb, ub, atol=abstol, rtol=reltol, check_analytic=alg.check_analytic, take_prec=alg.take_prec, warn_on_no_convergence=alg.warn_on_no_convergence, opts=alg.opts) SciMLBase.build_solution(prob, alg, val, nothing, retcode = ReturnCode.Success)