[firedrake] Perturbed extruded meshes
Lawrence Mitchell
lawrence.mitchell at imperial.ac.uk
Mon Mar 2 12:33:26 GMT 2015
On 2 Mar 2015, at 12:12, Eike Mueller <e.mueller at bath.ac.uk> wrote:
> Dear all,
>
> is there a 2d square mesh with periodic boundary conditions or is this only supported in 1d? I realised that to get steep orography in my setup I would either have to work at very high resolution or shrink the size of the earth.
>
> So I thought instead it would be easier if I work in a 2+1 dimensional box which represents part of the atmosphere, but I do not want to have to worry about boundary conditions in the horizontal condition.
This is currently only supported in 1D sorry.
One way to do this is the following:
. Make a torus mesh (now you have a periodic mesh with the right topology but the wrong coordinates)
. Build a VectorFunctionSpace(m, 'DG', 1, dim=2) on it
Write a par_loop that transforms the torus coordinates into the flat coords of the square you want and replace the mesh's coordinates with these new coords.
c.f. for example https://bitbucket.org/colinjcotter/slicemodels/src/b6d5eac9dbf28cbcf24aef5be60e2c5756d0b677/slicemodels.py?at=master#cl-199 for a 1D example.
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/20150302/77f7cd1d/attachment.sig>
More information about the firedrake
mailing list