This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

How to create a structured quarter sphere mesh in gmsh?

0 votes

Hi there,

I tried to create a structured quarter sphere in gmsh, and converted the .msh file into .xml file. Gmsh and the conversion process give no error. However, when I plot the mesh in FEniCS, it's a totally different mesh. The code in gmsh is as follows:

lr = 1;
Point(1) = {0, 0, 0, lr};
Point(2) = {10, 0, 0, lr};
Line(1) = {1, 2};

Extrude {{0, 0, 1}, {0, 0, 0}, Pi/2} {
Line{1};Layers{8};
}
Extrude {{0, -1, 0}, {0, 0, 0}, Pi/2} {
Surface{4};Layers{8};Recombine;
}

This code gives a quarter sphere in gmsh like:
in gmsh

But it shows like this in FEniCS:
in FEniCS

If I delete Layers{8} in the surface extrusion to get an unstructured mesh, FEniCS will recognise this quarter sphere.

So, what is right way to create a structured mesh in gmsh?

closed with the note: This is a gmsh question, not a FEniCS question.
asked Sep 24, 2014 by Chao Zhang FEniCS User (1,180 points)
closed Sep 25, 2014 by Garth N. Wells
...