### Generating mesh on unit sphere by specifying the maximum element size

164
views
0
7 months ago by

Hi all,

I am new to fenics. Is it possible to generate the mesh on unit sphere by specifying the maximum element size rather no-of divisons ?

Community: FEniCS Project

3
7 months ago by
In the FEniCS tutorial, you can find for the unit disk that "The cell size will be (approximately) equal to the diameter of the domain divided by the resolution" (Sec. 2.4.2 Defining the mesh). For the unit sphere, something like this seems to work:
from fenics import Point, mesh
from mshr import Sphere, generate_mesh

cell_size = 0.33
print(mesh.hmax())