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
I sorry, this fini element is not in freefem in 3d,
I will add rapidly a plugin P1nc3d
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
I have make a new plugins, not realy tested,
The plugin
Element_P1nc_3d.cpp.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 (551 Bytes)
I will had this , this week in develop branch.
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