Skip to content

[Core] Second-order elements (physics, visualization) - #6172

Merged
th-skam merged 32 commits into
sofa-framework:masterfrom
alxbilger:quadratic2
Sep 4, 2026
Merged

th-skam merged 32 commits into
sofa-framework:masterfrom
alxbilger:quadratic2

Conversation

@alxbilger

@alxbilger alxbilger commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Quadratic tetrahedra:

quadratic_beam

Quadratic hexahedra:
image

The system matrix:
image

Bunny with quadratic tetrahedra:

LinearToHigherOrderElements_0000

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request topic for next dev-meeting PR to be discussed in sofa-dev meeting labels Jul 6, 2026
@alxbilger alxbilger changed the title [Core] Start discussion about higher-order topologies [Core] Higher-order topologies Jul 20, 2026
@alxbilger alxbilger changed the title [Core] Higher-order topologies [Core] Second-order elements (physics, visualization) Jul 21, 2026
@alxbilger alxbilger added pr: new feature Implement a new feature pr: highlighted in next release Highlight this contribution in the notes of the upcoming release labels Jul 23, 2026
@alxbilger
alxbilger marked this pull request as ready for review July 24, 2026 12:51
@alxbilger

Copy link
Copy Markdown
Contributor Author

[ci-build][with-all-tests]

@alxbilger alxbilger removed the topic for next dev-meeting PR to be discussed in sofa-dev meeting label Jul 28, 2026
@th-skam
th-skam self-requested a review September 3, 2026 08:44

@th-skam th-skam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there's an answer from MMS: The [L2, H1, Energy] norm convergence rates we want are [3, 2, 2].

Hexa, Tetra, Quad, Tri are ok:

Image Image Image Image

Edges are not (reason below):

Image

Comment thread Sofa/framework/FEM/src/sofa/fem/FiniteElement[QuadraticEdge].h
alxbilger and others added 2 commits September 3, 2026 16:12
Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

@th-skam th-skam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@th-skam th-skam added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Sep 4, 2026
@th-skam
th-skam merged commit 5d6be40 into sofa-framework:master Sep 4, 2026
13 of 17 checks passed
damienmarchal pushed a commit to CRIStAL-PADR/sofa that referenced this pull request Sep 9, 2026
…#6172)

* add quadratic topology

* implement getElementsRaw in dynamic topologies

* fix compilation

* skeleton to convert linear elements to quadratic

* engine to generate quadratic tetrahedra

* support edges and triangles

* support quads and hexas

* add drawing function

* variation

* clean example

* fix warning

* adding FEM class for quadratic tetrahedra

* support quadratic tetrahedra in LinearSmallStrainFEMForceField and FEMMass

* support quadratic tetrahedra in CorotationalFEMForceField

* support more quadratic elements

* fixes

* fix finite element definition for quadratic hexahedron

* options to compute only some types of elements

* add tests

* more tests

* quadrature points from 2x2x2 to 3x3x3

* fix initial topology

* fix compilation on CI

* remove OglSceneFrame

* add validation for tetrahedra

* add validation for hexahedra

* missing files

* Fix wrong shape function for edges

Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

* remove quadratic prism/pyramid FEM because not tested

---------

Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>
Lucas-TJ pushed a commit to Lucas-TJ/sofa that referenced this pull request Sep 14, 2026
…#6172)

* add quadratic topology

* implement getElementsRaw in dynamic topologies

* fix compilation

* skeleton to convert linear elements to quadratic

* engine to generate quadratic tetrahedra

* support edges and triangles

* support quads and hexas

* add drawing function

* variation

* clean example

* fix warning

* adding FEM class for quadratic tetrahedra

* support quadratic tetrahedra in LinearSmallStrainFEMForceField and FEMMass

* support quadratic tetrahedra in CorotationalFEMForceField

* support more quadratic elements

* fixes

* fix finite element definition for quadratic hexahedron

* options to compute only some types of elements

* add tests

* more tests

* quadrature points from 2x2x2 to 3x3x3

* fix initial topology

* fix compilation on CI

* remove OglSceneFrame

* add validation for tetrahedra

* add validation for hexahedra

* missing files

* Fix wrong shape function for edges

Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

* remove quadratic prism/pyramid FEM because not tested

---------

Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>
Lucas-TJ pushed a commit to Lucas-TJ/sofa that referenced this pull request Sep 15, 2026
…#6172)

* add quadratic topology

* implement getElementsRaw in dynamic topologies

* fix compilation

* skeleton to convert linear elements to quadratic

* engine to generate quadratic tetrahedra

* support edges and triangles

* support quads and hexas

* add drawing function

* variation

* clean example

* fix warning

* adding FEM class for quadratic tetrahedra

* support quadratic tetrahedra in LinearSmallStrainFEMForceField and FEMMass

* support quadratic tetrahedra in CorotationalFEMForceField

* support more quadratic elements

* fixes

* fix finite element definition for quadratic hexahedron

* options to compute only some types of elements

* add tests

* more tests

* quadrature points from 2x2x2 to 3x3x3

* fix initial topology

* fix compilation on CI

* remove OglSceneFrame

* add validation for tetrahedra

* add validation for hexahedra

* missing files

* Fix wrong shape function for edges

Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>

* remove quadratic prism/pyramid FEM because not tested

---------

Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Co-authored-by: Themis Skamagkis <70031729+th-skam@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants