Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolation of 2d data #402

Open
TorkelE opened this issue Mar 7, 2025 · 7 comments
Open

Interpolation of 2d data #402

TorkelE opened this issue Mar 7, 2025 · 7 comments

Comments

@TorkelE
Copy link
Member

TorkelE commented Mar 7, 2025

Is this possible? And if so, would I be able to combine it with https://docs.sciml.ai/ModelingToolkit/stable/tutorials/callable_params/?

@SouthEndMusic
Copy link
Member

SouthEndMusic commented Mar 8, 2025

DataInterpolations.jl is built from the ground up with 1D interpolation in mind, you could look into using Bsplines for instance

@ChrisRackauckas
Copy link
Member

We could start going into multidimensional interpolations, but we just haven't yet. 1D had a lot of work and I feel like we're finally getting to the conclusion there, maybe this summer is the right time to start expanding but it would need more hands maybe.

@TorkelE
Copy link
Member Author

TorkelE commented Mar 8, 2025

Sounds good.

(I was writing tests and tutorials for doing this kind of stuff in Catalyst, and was thinking that if 2d existed I'd add that in as well, but will keep it at 1d then. Feel free to close/keep open this issue as you like)

@SouthEndMusic
Copy link
Member

To clarify, I'd be happy to contribute to 2d interpolation if I find the time, I assumed it would be outside the scope of this package.

I wrote the package SplineGrids.jl a few months ago for n-dimensional interpolation (with evaluation on a grid), maybe we can take inspiration from that.

@ChrisRackauckas
Copy link
Member

If you already have a starting point then we should just start there. I think the main thing is that we just needs to make sure it has all of the integrations (AD, MTK, etc.) that people expect. It's fine for it to be a separate repo but we just need to have a direction for that work. Indeed 1D vs ND can be quite different in form so separate repo might be the right thing to do, but Interpolations.jl just isn't sufficient for most people so we do need to take it into our own hands in the very near future.

@SouthEndMusic
Copy link
Member

SouthEndMusic commented Mar 9, 2025

To get some sense of goal/scope:

  1. is the domain always a (hyper)rectangle and the input data structured in arrays?
  2. Is interpolation in all dimensions the same or should interpolation types be mixable?
  3. SplineGrids.jl is built on KernelAbstractions.jl, is that a good fit? GPU support is nice
  4. There's probably already quite a lot of work done in other packages for interpolations on spatial discretizatons for PDEs, so do we want to cater for that, or is this targeted at very different things?

@ChrisRackauckas
Copy link
Member

is the domain always a (hyper)rectangle and the input data structured in arrays?

Yes

Is interpolation in all dimensions the same or should interpolation types be mixable?

I think all dimensions the same?

SplineGrids.jl is built on KernelAbstractions.jl, is that a good fit? GPU support is nice

Yes. And if GPU support, possibility to use texture memory? That would be a massive performance win.

There's probably already quite a lot of work done in other packages for interpolations on spatial discretizatons for PDEs, so do we want to cater for that, or is this targeted at very different things?

Semi-discretizations are very different. This is more for data tables, f(x,y,z) -> value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants