Skip to content

Pk Lagrange 2d & 3d, Grundmann-Moller quadratures#402

Open
phtournier wants to merge 9 commits into
developfrom
ch-local-branch
Open

Pk Lagrange 2d & 3d, Grundmann-Moller quadratures#402
phtournier wants to merge 9 commits into
developfrom
ch-local-branch

Conversation

@phtournier

Copy link
Copy Markdown
Collaborator

No description provided.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.1% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces new high-order Pk Lagrange finite elements (2D/3D) and Grundmann–Moller simplex quadrature generators as FreeFem plugins, and adds example-based tests to exercise the new operators.

Changes:

  • Add Element_PkLagrange plugin implementing P5–P11 Lagrange elements in 2D and 3D.
  • Add GrundmannMoller plugin exposing 1D/2D/3D Grundmann–Moller quadrature rules to the DSL.
  • Add new example/test .edp scripts and wire them into make check.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
plugin/seq/utils_PKLagrange.hpp Helper routines for Pk Lagrange node numbering/data tables (2D).
plugin/seq/polynomial_PKLagrange.hpp Basis function coefficient generation for 2D Pk Lagrange polynomials.
plugin/seq/Makefile.am Builds the new Element_PkLagrange and GrundmannMoller plugins.
plugin/seq/GrundmannMoller.cpp Implements Grundmann–Moller quadrature generation and DSL operators.
plugin/seq/Element_PkLagrange3d.hpp 3D barycentric numbering + basis helper routines for tetrahedral Pk Lagrange.
plugin/seq/Element_PkLagrange.cpp Main plugin registering P5–P11 elements in 2D/3D and FE evaluation logic.
examples/plugin/test_PKLagrange.edp Example/test script exercising the new Pk Lagrange element in 2D.
examples/plugin/test_GrundmannMoller.edp Example/test script verifying Grundmann–Moller quadratures in 1D/2D/3D.
examples/plugin/Makefile.am Adds the new .edp scripts to the example test suite.
examples/plugin/convergence_PkLagrange3d.edp Example/test script for 3D convergence using Pk Lagrange + GM quadrature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +152 to +156
const GQuadratureFormular<R1> *GenerateQuadratureFormularForOperatorR1(Stack stack, const long &s) {
if( TabQuadrFormula1[s] != nullptr) return TabQuadrFormula1[s];
int n =1;
auto Vec = integration_weightspoints(n, s);
int NbrP = Vec.size();
Comment on lines +165 to +169
const GQuadratureFormular<R2> *GenerateQuadratureFormularForOperatorR2(Stack stack, const long &s) {
if(TabQuadrFormula2[s] != nullptr) return TabQuadrFormula2[s];
int n =2;
auto Vec = integration_weightspoints(n, s);
int NbrP = Vec.size();
Comment on lines +180 to +185
const GQuadratureFormular<R3> *GenerateQuadratureFormularForOperatorR3(Stack stack, const long &s) {
if ( TabQuadrFormula3[s] != nullptr ) return TabQuadrFormula3[s];
int n =3;
auto Vec = integration_weightspoints(n, s);
int NbrP = Vec.size();
GQuadraturePoint<R3> *Tab = new GQuadraturePoint<R3>[NbrP];
Comment on lines +470 to +472
if (whatd & (Fop_D1 | Fop_D2)) {
R3 Dld[4], Df[ndof];
K.Gradlambda(Dld);
Comment on lines +1 to +5
#include <iostream>

vector< vector< int > > generate_barycoordinates(int Pk) {
int ndof = (Pk + 1) * (Pk + 2) * (Pk + 3) / 6;
vector< vector< int > > pts(ndof, vector< int >(4, 0));
Comment thread examples/plugin/test_GrundmannMoller.edp Outdated
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.

3 participants