Add FiniteElement python wrapper - #3542
Merged
Merged
Conversation
schnellerhase
marked this pull request as ready for review
November 29, 2024 21:44
garth-wells
requested changes
Nov 30, 2024
…rapper' into add_finiteelement_wrapper
jhale
reviewed
Dec 1, 2024
jhale
reviewed
Dec 2, 2024
garth-wells
requested changes
Dec 3, 2024
garth-wells
left a comment
Member
There was a problem hiding this comment.
The wrapping of the C++ FiniteElement needs to be sorted out. See comment on cached_property in the discussion.
Contributor
Author
|
The discussed case has been changed in 02d03f2. |
garth-wells
reviewed
Dec 3, 2024
garth-wells
approved these changes
Dec 3, 2024
jorgensd
reviewed
Dec 6, 2024
| cell_permutations: Permutation data for the cell. | ||
| dim: Number of columns in `data`. | ||
|
|
||
| Note: |
Member
There was a problem hiding this comment.
@schnellerhase This is not correct. These functions have loop access in the python wrapper.
Member
There was a problem hiding this comment.
The type hint should be npt.NDArray[np.int32].
dolfinx/python/dolfinx/wrappers/fem.cpp
Lines 187 to 196 in fcc7719
Contributor
Author
There was a problem hiding this comment.
Thanks for the catches and fixes - my bad!
jorgensd
reviewed
Dec 6, 2024
| Exposed for testing. Function is not vectorised across multiple cells. Please see | ||
| ``basix.numba_helpers`` for performant versions. | ||
| """ | ||
| self._cpp_object.Tt_apply(x, cell_permutations, dim) |
Member
There was a problem hiding this comment.
This is also wrong, as this should apply the inverse transform.
schnellerhase
added a commit
to schnellerhase/fenics-dolfinx
that referenced
this pull request
Dec 28, 2024
* Start to wrap FiniteElement * Ruff * Ufl naming * More wrapping * ruff * last one? * Misse done * nomatching * Add docstrings * Add tpye hints * Remove returns for properties * Add argument doc strings * more document args * Rename: dtype -> FiniteElement_dtype * finite_element -> finiteelement * Ruff * Apply suggestion * Switch to cached_propert for element access * FixreStructured text * Fix return type descriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Together with #3509 fixes #3483.