> On 2 Dec 2020, at 17:27, David Romero <d.rom...@utoronto.ca> wrote:
> 
> Hello Christophe,
> 
> First, thanks for a great piece of software!
> 
> I am having troubles creating a 3D mesh that results in a single element 
> type. I want a mesh that contains only tetrahedra, but somehow I end up with 
> some pyramids that cause troubles downstream (e.g. the FENICS/DOLFIN library 
> supports meshes with a single element type). The main problem is that, 
> depending on the mesh size I set using the Mesh.MeshSizeFactor, the mesh ends 
> up having only tets or mostly tets with a few pyramids.
> 
> The domain is a box with a few cylinders inside. Attached is a sketch of the 
> geometry. The cylinders are created by extruding a circle, with no 
> recombination. Attached is a sample GEO file, which I generate from pygmsh. 
> Attached is also a sample geo file, but I am afraid is a bit hard to follow, 
> because it is generated automatically by pygmsh, based on a python program I 
> wrote to automate the mesh generation for different cases. The geo file also 
> takes some time to run.
> 
> What algorithm type should I use (e.g. in the command line)?
> What options should I set for Mesh.Algorithm and Mesh.Algorithm3D to make 
> sure I get only tets?
> 

In Gmsh the unstructured 3D algorithm will only add pyramids if there are 
quadrangles in the 2D mesh. The structured algorithm (extrusion) could generate 
pyramids if nodes are closer than the geometrical tolerance, which could maybe 
happen in your case for very fine meshes?

Try setting e.g. 

Geometry.Tolerance = 1e-12;

to see what happens?

(For fine meshes you might also want to try Mesh.Algorithm3D = 10).

Christophe


PS: your script is a bit weird, with several commands that will have no effect 
(SetOrder 1, Coherence...). No sure if this is on purpose, or just a 
side-effect of having generated the script with pygmsh?


> Thanks,
> David
> 
> 
> <wflo_4X_coarse.geo><screenshot_8X.png>_______________________________________________
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine





_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh

Reply via email to