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

Array Function Generation for MOL #428

Open
ChrisRackauckas opened this issue Nov 13, 2024 · 0 comments
Open

Array Function Generation for MOL #428

ChrisRackauckas opened this issue Nov 13, 2024 · 0 comments

Comments

@ChrisRackauckas
Copy link
Member

We discussed that we can get more optimized codegen here if we target the array form:

D(u[1]) ~ u[1]
D(u[2:end-1]) ~ u[1:n-2] .- 2u[2:end-1] .+ u[3:end] .+ ifelse(u[2:end-1]>0, a, b)*u[2:end-1]
D(u[end]) ~ u[n] - u[n-1]

Which would then hit the broadcast CSE in the MTK codegen and thus give optimized looping code. We can then define behind the scenes some observed equations u(x, y, ⋅) ~ u[1:n,1:n] which would then make sol[u(x, y, ⋅)] -> sol[u[1:n,1:n]] and the specialized PDE interfaces shouldn't be required for the solution handling.

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

1 participant