Skip to content

Finsberg/fenicsx compat - #271

Merged
jorgensd merged 4 commits into
mainfrom
finsberg/fenicsx-compat
Oct 23, 2026
Merged

jorgensd merged 4 commits into
mainfrom
finsberg/fenicsx-compat

Conversation

@jorgensd

Copy link
Copy Markdown
Member

No description provided.

finsberg and others added 4 commits October 21, 2026 19:09
`kind=MinMaxFunc` gave `kind` the type alias as its default value rather
than as its annotation, so a call without `kind` reached the "Unknown
extrema" error instead of failing on the missing argument. That error
also lacked its f-prefix and printed `{kind}` literally.

`kind` is now annotated and required, as in find_cell_extrema. Every
working call already passed it, since without it the function raised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…functions

The function hard-coded the float64 cpp element and function space, so
a float32 mesh failed when the function space was built. It now picks
the classes by the mesh's geometry dtype, as create_geometry_function_space
does, and builds both basix elements with that dtype.

The dofmap array was allocated with np.zeros_like(cell_tag.values), so
int64 cell tags gave an int64 array that AdjacencyList_int32 rejects.
It is now always int32, as it holds positions into `tags`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It was annotated as also taking a UFL expression, but an expression
without a dtype, such as `u * v`, raised AttributeError on
`.coefficients()`, which only forms have. Its two callers,
assemble_scalar and norm, only pass forms, so the annotation now says
so. No change at runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-dtype-float32-spaces

Finsberg/fix extrema dtype float32 spaces
@jorgensd
jorgensd merged commit 4592bda into main Oct 23, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants