You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
Congrats for the great work you are doing in the DiffEqOperators package. I was trying to create a 2D Laplacian matrix, but I can’t seem to manage to be able to concretize it to the right Array.
MWE (Win10, julia 1.6, DiffEqOperators 4.29.0)
n = 10
Lxx = CenteredDifference{1}(2,2,1.,n)
Lyy = CenteredDifference{2}(2,2,1.,n)
D = Lxx + Lyy
Mxx = Array(D.ops[1], (n,n))
Myy = Array(D.ops[2], (n,n))
D = Lxx + Lyy
heatmap(Array(D, (n,n)))
Image I get:
Image I'd expect:
The text was updated successfully, but these errors were encountered:
I find that the problem is that D has the wrong size. Lxx and Lyy have different sizes, and D inherits the size of Lxx. Instead, both Lxx and Lyy should be zero-extended to have the same size.
My comment above was wrong. I was confused about the matrix sizes.
The plot looks correct to me. The matrix you are plotting has size (n, n+2) because ghost points have been added. If you plot either Mxx or Myy separately, you see that they are correct. If you were to omit the ghost points then you would see the diagonal structure you expect.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Congrats for the great work you are doing in the DiffEqOperators package. I was trying to create a 2D Laplacian matrix, but I can’t seem to manage to be able to concretize it to the right Array.
MWE (Win10, julia 1.6, DiffEqOperators 4.29.0)
Image I get:
Image I'd expect:
The text was updated successfully, but these errors were encountered: