Pk Lagrange 2d & 3d, Grundmann-Moller quadratures#402
Open
phtournier wants to merge 9 commits into
Open
Conversation
|
There was a problem hiding this comment.
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_PkLagrangeplugin implementing P5–P11 Lagrange elements in 2D and 3D. - Add
GrundmannMollerplugin exposing 1D/2D/3D Grundmann–Moller quadrature rules to the DSL. - Add new example/test
.edpscripts and wire them intomake 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)); |
2064f16 to
3df8386
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




No description provided.