Skip to content

Recommended formalism for double quad? #15

@nmearl

Description

@nmearl

I have a double integral I'd love to move to using quadax, but it seems that when I attempt to implement it, it crashes the GPU by running out of memory. It's a naive implementation, but I'm curious if there's some recommendation for how to approach this problem. My double quad takes the form e.g.

@jax.jit
def integrand(y, x, *args):
    ...
    return result

def inner_quad(x, y1, y2, *args):
    return quadgk(integrand, [y1, y2], args=(x, ...))

def outer_quad(x1, x2, y1, y2, *args):
    return quadgk(inner_quad, [x1, x2], args=(y1, y2, ...))

Any suggestions would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions