-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Separate cpp.Expression and ufl.Coefficient #1
Labels
proposal
Suggested change or addition
Comments
Closed
See #183. |
jorgensd
pushed a commit
that referenced
this issue
Jul 22, 2022
Split interpolation into sub-routines
Closed
jhale
pushed a commit
that referenced
this issue
Apr 12, 2024
This PR allows for a `dlx.la.Vector` (rather than a `dlx.fem.Function`) to manage the memory and the scope of the `petsc4py.PETSc.vec` object that wraps the underlying data. The implementation of the property `dlx.fem.Function.vector` was also modified to delegate the creation of the wrapper to the underlying `dlx.la.Vector`. All changes are backward compatible.
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 12, 2024
* Let dlx.la.Vector manage the scope of the petsc4py wrapper (#1) This PR allows for a `dlx.la.Vector` (rather than a `dlx.fem.Function`) to manage the memory and the scope of the `petsc4py.PETSc.vec` object that wraps the underlying data. The implementation of the property `dlx.fem.Function.vector` was also modified to delegate the creation of the wrapper to the underlying `dlx.la.Vector`. All changes are backward compatible. * Update python/dolfinx/fem/function.py Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk> * Update python/dolfinx/fem/function.py Remove # type: ignore Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk> * Deprecate dlx.fem.Function.vector; replace it with dlx.fem.Function.x.petsc_vec * Fix ruff checks * Fix ruff checks import order * Ruff formatt fix * Update function.py Fix spelling in warnings message. * Update function.py Specify that it is a deprecation warning * Ruff formatting error --------- Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From @blechta
Expressions have element associated with them. That enables any expression to be used immediately in integrals. This poses several problems:
degree
kwarg being shortcut for Lagrange element is overly confusing.Proposal is to separate
Expression
fromufl.Coefficient
in a following spiritThe last two lines could be renamed to something more sensible, e.g.,
See #2 for discussion about pointwise expressions.
The text was updated successfully, but these errors were encountered: