This example demonstrates the use of the MESH_SPACING parameter to
control mesh density.
A global density function is defined as a Gaussian distribution returning
1 unit mesh spacing at the center, falling to 0.018 at the corners.
This global distribution is overridden by a regional definition of
0.02 mesh spacing in a central region.
title 'Cell Size Control'
k = 1
u0 = 1-x^2-y^2
s = 2*3/4+5*2/4
mesh_spacing = exp(-2*(x^2+y^2))
b = 0.1
c = 0.02
u : div(K*grad(u)) +s = 0
line to (1,-1) to (1,1) to (-1,1) to close
mesh_spacing = c
line to (b,-b) to (b,b) to (-b,b) to close