Giter VIP home page Giter VIP logo

Comments (7)

ChrisRackauckas avatar ChrisRackauckas commented on August 22, 2024

It's a bit more difficult in this case because it's not clear how to measure the progress, since it's a convergence criteria not stepping across time and thus there's no clear percentage of the computation already done.

from integrals.jl.

Yaraslaut avatar Yaraslaut commented on August 22, 2024

We can show percentage of convergence reached for both abstol and reltol separately, in such way user have some idea of what is happening and can estimate time for integration to complete.

from integrals.jl.

lxvm avatar lxvm commented on August 22, 2024

That is a cool idea! Unfortunately, the libraries that Integrals.jl wraps do not support callbacks that would allow for this kind query of the estimated error. If your integrals take very long to converge, is there a better algorithm that could integrate them with fewer function evaluations?

from integrals.jl.

Yaraslaut avatar Yaraslaut commented on August 22, 2024

That is a cool idea! Unfortunately, the libraries that Integrals.jl wraps do not support callbacks that would allow for this kind query of the estimated error. If your integrals take very long to converge, is there a better algorithm that could integrate them with fewer function evaluations?

I am using CubatureJLh() i tried also VEGAS but performance was not that great since I dont have big dimensions, only two, and need to integrate vectors, if you have any recomendation i am happy to try them out :)

Closing issue as can not be implemented.

from integrals.jl.

lxvm avatar lxvm commented on August 22, 2024

@Yaraslaut In 2D I would recommend a quadrature or cubature for faster convergence. Other than that, the optimal algorithm will depend on your integrand. If it is very smooth, CubatureJLp() would be favorable, since it reuses function evaluations. However if you tried CubatureJLh() this would be because your integrand is localized somewhere. If it is localized around points, I would recommend CubatureJLh(). However, if it is localized around curves, then doing nested 1d integration will have better computational complexity because of the number of cubes versus intervals it takes to adaptively tile a nearly singular surface in many versus one dimension. The quadgk! routine may be your friend in the case of curves.

from integrals.jl.

Yaraslaut avatar Yaraslaut commented on August 22, 2024

@Yaraslaut In 2D I would recommend a quadrature or cubature for faster convergence. Other than that, the optimal algorithm will depend on your integrand. If it is very smooth, CubatureJLp() would be favorable, since it reuses function evaluations. However if you tried CubatureJLh() this would be because your integrand is localized somewhere. If it is localized around points, I would recommend CubatureJLh(). However, if it is localized around curves, then doing nested 1d integration will have better computational complexity because of the number of cubes versus intervals it takes to adaptively tile a nearly singular surface in many versus one dimension. The quadgk! routine may be your friend in the case of curves.

Thanks for pointing out to some usefull places, I will definitely try to use quadgk!
One of the drawbacks i see in it is the lack of parallel computing especially in the nested case

Edit:
I found out that some batch procedure exist inside QuadGK.jl, hope i can figure out how to use it

from integrals.jl.

lxvm avatar lxvm commented on August 22, 2024

The batch procedure in quadgk is new but it doesn't support in-place integrands. However if the arrays you need to integrate are small you could use StaticArrays.jl with the batch interface. On the other hand if your arrays are too big for static arrays, then the integrand is likely expensive and would be another candidate for parallelization

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.