Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Gradient on a 2D mesh for a vector field #84

Closed
mleprovost opened this issue Nov 17, 2018 · 1 comment
Closed

Gradient on a 2D mesh for a vector field #84

mleprovost opened this issue Nov 17, 2018 · 1 comment

Comments

@mleprovost
Copy link

mleprovost commented Nov 17, 2018

Hello,

I would like to solve an advection problem on a 2D mesh for a 2D vector field( velocity field U with two components Ux(x,y,t) and Uy(x,y,t))
codecogseqn 6
So the array for my velocity will be 2xNxN if the spatial grid is N x N,
and its gradient will be 2x2xNxN
(after that, the PDE will be semi-discretized and integrated with an ODE solver)

I don't know how to use the function DerivativeOperator{Float64}(2,1,h,N,:Dirichlet0,:Dirichlet0), nor how to reshape my data to compute \nabla U on this space domain, all the examples I saw are for 1D functions on a 2D mesh

Thank you for having created these amazing packages !

@ChrisRackauckas
Copy link
Member

To solve this using this package I think you'd need lazy kron which we don't have yet or some reshape trickery.

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

No branches or pull requests

2 participants