Skip to content

Add typing generics#4131

Draft
schnellerhase wants to merge 9 commits intomainfrom
schnellerhase/generics
Draft

Add typing generics#4131
schnellerhase wants to merge 9 commits intomainfrom
schnellerhase/generics

Conversation

@schnellerhase
Copy link
Contributor

@schnellerhase schnellerhase commented Mar 19, 2026

Extends the approach of #4094 for multi export type wrappers to

  • Vector
  • MatrixCSR
  • SuperLUDistMatrix
  • SuperLUDistSolver
  • DirichletBC
  • CoordinateElement
  • FiniteElement
  • Form
  • Constant
  • Expression
  • Function
  • FunctionSpace
  • Mesh
  • Geometry
  • CoordinateElement

Necessary for #4101.

@schnellerhase schnellerhase changed the title Add trying generics Add typing generics Mar 19, 2026
@schnellerhase schnellerhase force-pushed the schnellerhase/generics branch 8 times, most recently from eb8ca0f to b5dadfb Compare March 19, 2026 11:46
@schnellerhase schnellerhase force-pushed the schnellerhase/generics branch from 75691d8 to efd17c2 Compare March 19, 2026 13:43
@schnellerhase schnellerhase force-pushed the schnellerhase/generics branch from b5f116f to 37b3898 Compare March 19, 2026 13:50
@jhale
Copy link
Member

jhale commented Mar 19, 2026

Looks good - have you considered directly mimicking the naming/setup of the C++ concepts? Perhaps they could also be put somewhere more general for use across the whole interface.

https://github.com/FEniCS/dolfinx/blob/main/cpp/dolfinx/common/types.h#L26

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