# FEM Basis and Integration package similar to fenics-basix?

**URL:** <https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629>\
**Category:** Numerics\
**Created:** [December 14, 2022, 3:18am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629 "2022-12-14T03:18:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasbanting](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucasbanting/32/30936_2.png) [@lucasbanting](https://discourse.julialang.org/u/lucasbanting)\
**Post date:** [December 14, 2022, 3:18am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/1 "2022-12-14T03:18:05Z")

</div>

I’m looking for a package to define quadrature points on simplex elements, as well as a variety of basis function types (specifically high order Lagrange polynomials and high order nedelec elements), similar to: [GitHub - FEniCS/basix: FEniCS finite element basis evaluation library](https://github.com/FEniCS/basix)

It seems JuliaFEM isn’t maintained anymore, Ferrite only appears to have second order functions, GridAP seems to be the most maintained package, but I really only need a small part.

One thing that seems to make the most sense is just calling basix from either a python or c++ interface in Julia?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 14, 2022, 3:26am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/2 "2022-12-14T03:26:04Z")

</div>

What do you want to do? p-type elements on simplexes?

---

<div class="post-metadata">

**Author:** ![lucasbanting](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucasbanting/32/30936_2.png) [@lucasbanting](https://discourse.julialang.org/u/lucasbanting)\
**Post date:** [December 14, 2022, 3:34am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/3 "2022-12-14T03:34:16Z")

</div>

I would like to use a gmsh simplex mesh, with second or third order tetrahedrals. Then on those tetrahedrals, I want to try high order vector-edge elements or high order polynomials. I realize now I can probably just use the gmsh api to get the quad points and basis and shape functions, but I thought it would be nice to have a gmsh independent implementation.

---

<div class="post-metadata">

**Author:** ![jlchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlchan/32/10958_2.png) [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Post date:** [December 14, 2022, 3:52am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/4 "2022-12-14T03:52:39Z")

</div>

I have high order quadrature on simplices (and other elements) in [GitHub - jlchan/NodesAndModes.jl: Nodes and modes for high order finite element methods](https://github.com/jlchan/NodesAndModes.jl), as well as high order basis functions. However, these basis functions are H1 only, and don’t include Hdiv/Hcurl bases (e.g., Nedelec, RT, BDM, etc).

---

<div class="post-metadata">

**Author:** ![lucasbanting](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lucasbanting/32/30936_2.png) [@lucasbanting](https://discourse.julialang.org/u/lucasbanting)\
**Post date:** [December 14, 2022, 3:59am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/5 "2022-12-14T03:59:23Z")

</div>

That looks awesome! I was intending on doing DG following the same textbook actually.

---

<div class="post-metadata">

**Author:** ![jlchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlchan/32/10958_2.png) [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Post date:** [December 14, 2022, 4:00am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/6 "2022-12-14T04:00:59Z")

</div>

Oh, great! You might also find [GitHub - jlchan/StartUpDG.jl: Initializes and sets up reference elements and physical meshes for DG.](https://github.com/jlchan/StartUpDG.jl) useful. It basically does the “StartUp1D/2D/3D” routines from the book (with some generalizations).

Please let me know if anything can be made clearer in the package - we welcome any feedback and issues on Github.

---

<div class="post-metadata">

**Author:** ![jlchan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlchan/32/10958_2.png) [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Post date:** [December 14, 2022, 4:03am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629/7 "2022-12-14T04:03:40Z")

</div>

I should note that there are some slight differences compared with the Nodal DG book - we don’t compute surface integrals in terms of nodal/interpolation points, but using surface quadrature points (this is for reasons of stability related to formulations for nonlinear conservation laws). Consequently, some of the arrays in the Nodal DG book like `vmapM, vmapP` are missing as there are no analogues for this setting.
