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

Vector calculus operators for the symbolic form #5

Open
valentinsulzer opened this issue Mar 29, 2021 · 3 comments
Open

Vector calculus operators for the symbolic form #5

valentinsulzer opened this issue Mar 29, 2021 · 3 comments
Labels

Comments

@valentinsulzer
Copy link

(Opening a separate issue from SciML/DiffEqOperators.jl#153 SciML/DiffEqOperators.jl#146 which are about the lazy operators)

Add vector calculus operators (Laplacian, Divergence, Gradient) to supplement the Differential operator.

This would enable writing equations in generic form, with the geometry then specified later by the domains (also need to consider boundary conditions in this case). Some sample code for Poisson:

@parameters x y
@variables u(..)
Δ = Laplacian(x,y)

# 2D PDE
eq  = Δ(u(x,y)) ~ -sin(pi*x)*sin(pi*y)

One possible way to implement this is to have a @rule which replaces the vector calculus operators with the appropriate Differential operators (based on the type of the domains) and then reuse the existing MOLFiniteDifference code.
For non-Cartesian geometries, this requires at least SciML/DiffEqOperators.jl#354 , and probably a bunch of other stuff (e.g. how do you implement finite differences at r=0).

@valentinsulzer
Copy link
Author

Then later on we can do some cool stuff like automatically generating weak forms for Gridap

@valentinsulzer
Copy link
Author

Where would be the place to first define this? ModelingToolkit.jl? Symbolics.jl?

@ChrisRackauckas
Copy link
Member

I think it would be good to add these operators into Symbolics.jl and then use them in MTK's interface.

@ChrisRackauckas ChrisRackauckas transferred this issue from SciML/DiffEqOperators.jl Dec 21, 2021
ChrisRackauckas pushed a commit that referenced this issue Mar 30, 2022
Update MOLFiniteDifference.md
@xtalax xtalax added the v1.0 label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants