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

Resolution of a mesh on the unit square constructed via the mshr-module

+1 vote

I would like to initialize a mesh on the unit circle.

After reading http://fenicsproject.org/qa/5895/replacement-of-the-unitcircle, I looked at https://bitbucket.org/benjamik/mshr/src/424ad882958093d8bece893be7fc74951cdabbdc/demo/python/propeller.py?at=master&fileviewer=file-view-default from which I took the following snippet of code:

resolution = 5
domain_geometry = mshr.Circle(dolfin.Point(0.0, 0.0), 1.0)
mesh = mshr.generate_mesh(domain_geometry, resolution)

This does the job, but I would like to know in addition:

  1. what the practical interpretation of the number stored in resolution is,
  2. how it relates to the number of vertices in mesh,
  3. and how it relates to the number of triangles in mesh.

Any advice on these three points would be appreciated.

asked Sep 18, 2015 by kdma-at-dtu FEniCS Novice (590 points)

1 Answer

0 votes

The number of elements and vertices clearly scale with the square value of resolution, so it is probably some inverse length scale, but the actual scale is determined by the geometry, because the mesh is unaffected by the circle radius.

answered Sep 21, 2015 by KristianE FEniCS Expert (12,900 points)
...