# 3D Crouzeix-Raviart (P1nc3d) in FreeFEM?

**URL:** <https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258>\
**Category:** General Discussion\
**Created:** [April 19, 2026, 2:51pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258 "2026-04-19T14:51:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PegasusZhang](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@PegasusZhang](https://community.freefem.org/u/PegasusZhang)\
**Post date:** [April 19, 2026, 2:51pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/1 "2026-04-19T14:51:04Z")

</div>

Dear all,

I hope this message finds you well.

I am currently working on a 3D numerical simulation that requires the use of the **Crouzeix-Raviart finite element (non-conforming P1)** on tetrahedral meshes. I am aware that FreeFEM natively supports `P1nc` for 2D problems, but I can’t find the 3D version.

Does a community plugin exist for this, or any known workaround? Thank you very much for your time and for sharing your expertise.

Best regards,

PegasusZhang

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [April 20, 2026, 2:19pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/2 "2026-04-20T14:19:19Z")

</div>

I sorry, this fini element is not in freefem in 3d,

I will add rapidly a plugin P1nc3d

---

<div class="post-metadata">

**Author:** ![PegasusZhang](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@PegasusZhang](https://community.freefem.org/u/PegasusZhang)\
**Post date:** [April 21, 2026, 5:54am UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/3 "2026-04-21T05:54:16Z")

</div>

Dear Professor Hecht,

Thank you very much for your prompt reply and for confirming this. That is wonderful news! I will keep an eye out for the `P1nc3d` plugin update.

I really appreciate you taking the time to address this, and thank you for your continuous work on FreeFEM.

Best regards,  
PegasusZhang

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [April 21, 2026, 4:43pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/4 "2026-04-21T16:43:12Z")

</div>

I have make a new plugins, not realy tested,

The plugin

[Element\_P1nc\_3d.cpp.zip](https://community.freefem.org/uploads/short-url/8wip4PJTlVIcYFwMVuM8XUyENON.zip) (2.3 KB)

Unzippe and compile with

Host-004:seq hecht$ ff-c++ Element\_P1nc\_3d.cpp

clang++ -c -I../seq/include -Wno-undefined-var-template -m64 -fPIC -DNDEBUG -O3 -std=gnu++14 -DBAMG\_LONG\_LONG -DNCHECKPTR -fPIC -I/usr/local/ff+±4.16/ff-petsc/r/include/suitesparse -I/usr/local/ff+±4.16/ff-petsc/r/include -I/opt/homebrew/Cellar/hdf5/2.0.0\_1/include -I/opt/homebrew/include ‘Element\_P1nc\_3d.cpp’

clang++ -bundle -undefined dynamic\_lookup -Wno-undefined-var-template -m64 -fPIC -DNDEBUG -O3 -std=gnu++14 -DBAMG\_LONG\_LONG -DNCHECKPTR -fPIC -I/usr/local/ff+±4.16/ff-petsc/r/include/suitesparse -I/usr/local/ff+±4.16/ff-petsc/r/include -I/opt/homebrew/Cellar/hdf5/2.0.0\_1/include -I/opt/homebrew/include ‘Element\_P1nc\_3d.o’ -o Element\_P1nc\_3d.dylib

clang++ -bundle -undefined dynamic\_lookup -Wno-undefined-var-template -m64 -fPIC -DNDEBUG -O3 -std=gnu++14 -DBAMG\_LONG\_LONG -DNCHECKPTR -fPIC -I/usr/local/ff+±4.16/ff-petsc/r/include/suitesparse -I/usr/local/ff+±4.16/ff-petsc/r/include -I/opt/homebrew/Cellar/hdf5/2.0.0\_1/include -I/opt/homebrew/include ‘Element\_P1nc\_3d.o’ -o ../mpi/Element\_P1nc\_3d.dylib -L/usr/local/ff+±4.16/ff-petsc/r/lib -lmpicxx -lmpi -lpmpi

the test :

[testFE-P1nc3d.edp](https://community.freefem.org/uploads/short-url/ragd7lAeXlTY5knmtiAn7o0sSvV.edp) (551 Bytes)

I will had this , this week in develop branch.

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [April 22, 2026, 11:25am UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/5 "2026-04-22T11:25:08Z")

</div>

I put this motif see [add P1ncS and add too in CHANGELOG.md, and update plugin/seq/Makefil… · FreeFem/FreeFem-sources@08fbba3 · GitHub](https://github.com/FreeFem/FreeFem-sources/commit/08fbba365ff2e4f1da98e295fb3bbc854760cc3d)

and correct of P4 finite element in 3d

---

<div class="post-metadata">

**Author:** ![PegasusZhang](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@PegasusZhang](https://community.freefem.org/u/PegasusZhang)\
**Post date:** [April 22, 2026, 4:48pm UTC](https://community.freefem.org/t/3d-crouzeix-raviart-p1nc3d-in-freefem/4258/6 "2026-04-22T16:48:25Z")

</div>

Dear Professor Hecht,

I tested the `P1nc3d` element in a 3D Stokes problem, and it performed perfectly. Thanks again for the rapid fix—it’s exactly what I needed!

Best,  
PegasusZhang
