Skip to content

Bindings for quadrature data and element Jacobian - #634

Open
th-skam wants to merge 5 commits into
sofa-framework:masterfrom
th-skam:th-bnd-quadrature
Open

th-skam wants to merge 5 commits into
sofa-framework:masterfrom
th-skam:th-bnd-quadrature

Conversation

@th-skam

@th-skam th-skam commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

This exposes sofa::fem::FinineElement's functions to allow integration of quantities using quadrature rules from the python scene side.

  • quadrature_data returns the weights, shape functions and their gradients
  • element_mapping returns the physical gradients and the mapping per element
  • element_mapping_batch returns same as above for the whole mesh

[ci-depends-on https://github.com/sofa-framework/sofa/pull/6225]

Added an example, that shows how to integrate sources in python using the quadrature bindings on the existing topology.
White is the manufactured solution, green/red use quadrature degree = 2 and 1, respectively, to integrate the source term into nodal loads.
Result is trivial here but the option to choose the degree is important when computing errors in MMS.

Screenshot 2026-09-01 161712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant