[firedrake] Anisotropic mesh
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Wed Nov 12 16:09:29 GMT 2014
Hi Anna,
On 12 Nov 2014, at 15:49, Anna Kalogirou <a.kalogirou at leeds.ac.uk> wrote:
> Dear all,
>
> There seems to be a problem with anisotropic meshes, namely with different number of nodes in each direction. The problem is encountered closer to the x-axis if the x-direction has less points. The situation becomes even worse if I make the domain rectangular and as its length is increased.
So the problem here is the following:
The utility mesh constructors specify a regular mesh of points (and a boundary) which are used as a seed for a mesh generator (2D or 3D as appropriate). To maintain good element shape, the mesh generator then goes ahead and adds a load more points. You can see the problem if you look at the mesh outline in paraview: you actually don't get a mesh that has 20x80 edges (but many more). Previously the problem was that the interface to the mesh generator did not allow us to set options, that is now available but I haven't hooked it up yet. You may be better off building the mesh you want in Gmsh, which you can then load as:
mesh = Mesh("file.msh")
> You can see an example in the attached code which uses UnitSquareMesh(20,80) on a rectangular domain 4 times longer than wide.
>
> I am not sure why this is happening, so hopefully someone can help.
>
> Kind regards,
>
>
> Anna Kalogirou.
>
> P.S. Does Firedrake support the use of quadrilateral meshes?
It depends what you mean. You can have a structured quad mesh now, by taking an interval mesh and extruding it:
m = UnitIntervalMesh(10)
mesh = ExtrudedMesh(m, layers=10)
V = FunctionSpace(mesh, 'CG', 2)
Gives a unit square mesh with 10 quad cells. Note that you can play around with the coordinate field here, but the jacobians we compute assume affine elements so if your elements are non-affine you may not get the convergence you expect.
Note that building more complicated function spaces in the extruded mesh case is somewhat more involved than the simplex case (should you wish to use them). The gory details are described in http://arxiv.org/abs/1411.2940.
Unstructured quads are in the pipeline, they seem to work for some cases now (but not in master), but are not well tested yet. Again, the jacobian computations will be incorrect for non-affine elements.
Cheers,
Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20141112/2f04df5a/attachment.sig>
More information about the firedrake
mailing list