Giter VIP home page Giter VIP logo

Comments (4)

ChrisRackauckas avatar ChrisRackauckas commented on August 22, 2024

It's maxiters:

using Quadrature
function f(x,p,c)
    c[1]+=1
    sum(sin.(x))
end

algs = [HCubatureJL(), CubatureJLh(), CubatureJLp(), CubaSUAVE(), CubaDivonne(), CubaCuhre()]

count_array = zeros(length(algs))
for (i,alg)  enumerate(algs)
    try
        count = [0]
        prob = QuadratureProblem((x,p)->f(x,p,count),ones(2),3ones(2))
        sol = solve(prob,alg,reltol=1e-3,abstol=1e-3, maxiters=3)
        count_array[i] = count[1]
    catch
        count_array[i] = NaN
    end
end
count_array #[17, 18, 82, NaN, NaN, NaN]. NaN indicates invalid kwarg

which just gives more NaNs though.

For the first three, Cubature methods need a slack on maxiters. Basically, if you think of something like a Gauss-Kronrod method, 15 evaluations is the minimum for GK, and then adapting needs to go up in those increments. Cubature methods are similar, so you will never be able to get maxiter=3. I assumed they would always just do their whole next step, so they would overshoot the iterations and then not adapt anymore. I'm not certain though.

from integrals.jl.

agerlach avatar agerlach commented on August 22, 2024

It's maxiters:

🤦 Thanks

I knew that some slack was required for maxiters for the various algs. It was the crashes that are the main issue. Its an easy fix, I just wanted to put something here so I didn't forget.

from integrals.jl.

ArnoStrouwen avatar ArnoStrouwen commented on August 22, 2024

The Cuba algorithms segfault for me.
Anyway this is an upstream issue that can't be fixed here.

from integrals.jl.

ChrisRackauckas avatar ChrisRackauckas commented on August 22, 2024

Closing as upstream.

from integrals.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.