Can I directly define a tetrahedral mesh in FreeFEM++ using mesh3 Th = tetrahedron(10, 10, 10, [0, 1], [0, 1], [0, 1]);
, or are there any prerequisites? Thank you everyone!
no code to build a tetrahedron to day in freefem++,
but you can use a file
here a trick to buil mesh with 1 tet.
real[int] xx=[0,1,0,0], yy=[0,0,1,0], zz=[0,0,0,1];
mesh3 Th=tetgconvexhull(xx,yy,zz,region=1,label=3);
savemesh(Th,“/tmp/Th.mesh”);
Thank you, professor
Interesting question. Just in case, here is another mesh with one single tetrahedron
load "msh3"
{
ofstream meshfile("test_onetet.mesh");
meshfile<<"MeshVersionFormatted 1"<<endl;
meshfile<<""<<endl;
meshfile<<"Dimension 3"<<endl;
meshfile<<""<<endl;
meshfile<<"Vertices"<<endl;
meshfile<<"4"<<endl;
meshfile<<"0 0 0 1"<<endl;
meshfile<<"1 0 0 1"<<endl;
meshfile<<"0 1 0 1"<<endl;
meshfile<<"0 0 1 1"<<endl;
meshfile<<""<<endl;
meshfile<<"Tetrahedra"<<endl;
meshfile<<"1"<<endl;
meshfile<<"1 2 3 4 0"<<endl;
meshfile<<""<<endl;
meshfile<<"Triangles"<<endl;
meshfile<<"4"<<endl;
meshfile<<"1 2 4 1"<<endl;
meshfile<<"1 2 3 1"<<endl;
meshfile<<"1 3 4 1"<<endl;
meshfile<<"2 3 4 1"<<endl;
meshfile<<""<<endl;
meshfile<<"End"<<endl;
}
mesh3 Th=readmesh3("test_onetet.mesh");
plot(Th,cmm="Th");
https://www.ljll.fr/lehyaric/ffcs/src/ffref/Basic/onetet.m4.htm