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

Calculate proportion between cell size and gradient

0 votes

Hi! To control my mesh refinement, I want to check each cell and if it is not small enough in relation to the gradient, refine further.
This is how I would compute the values of the gradient:

VFS = VectorFunctionSpace(mesh, 'Lagrange', 1)
uproj = project(grad(u), VFS)
uproj_val = uproj.vector().array()

How can these values be related to the cellsizes?

asked Sep 12, 2016 by meron FEniCS User (2,340 points)
edited Sep 13, 2016 by meron
...