-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Wrap discrete_gradient in Python #3037
Conversation
The lines dolfinx/python/dolfinx/fem/petsc.py Lines 785 to 791 in 26f2067
seem to suggest that this is made for Lagrange -> Nedelec only. Is this really the case? I was at some point interested in having a discrete gradient operator from Lagrange to DG for instance, or a Quadrature space. |
The code makes assumptions that target space maps using covariant Piola, which would fail if you use DG. Just note that you can always build these discrete operators using dolfinx.Expression that contains ufl.TrialFunction on the input space. Assembly of these expressions into PETSc/scipy matrix is not implemented yet, but you can easily write a custom (Numba) loop that does that. I presented this in my FEniCS2021 talk, can find the snippets if you want. |
Resolves #3022