Thank you very much guys,
So the mesh I already have was constructed manually and has
the following format (please also see attached):
it has as many number of lines as the number of elements, with
12 values in each line.
The first 8 values consist of 4 sets of coordinates (x,y)
(without the brackets and comma, just 8 numbers)
and the final 4 denote the global node number of the 4 points.
Is it possible to build a mesh on Firedrake based on this
file?
If you do:
from firedrake.mesh import _from_cell_list
Then you should be able to use that. It expects you to tell
it the topological dimension of your cells, pass a 2d numpy
array with the coordinates of your vertices. And a 2d numpy
array indicating which vertices belong to which element. You can
pass the object you get back to Mesh:
dm= _from_cell_list(2,
cells, vertices)
mesh = Mesh(dm)
There are some further examples using this in
utility_meshes.py
The format sounds sufficiently simple that you could add a
reader in firedrake and we could incorporate it.
Thanks,
Lawrence
On 16/12/15 16:58, Justin Chang
wrote:
Anna,
The first four entries with "15" under the column
refer to the geometric vertices.
The next 28 with "1' under the second column refer to
the mesh straight lines aligning under the geometric
straight lines connecting the aforementioned points
The quadruplet information is described per the link
Lawrence pointed to.
----
So I see that your mesh has no physical IDs (the "0"
under the fourth column), which is needed for imposing
boundary conditions. If this were done entirely with
GMSH, they order the physical ID's based on the order
you create them. If you don't do any of this, GMSH spits
out every single geometric and mesh entity with a 0 ID.
That's why you see some useless element entries like the
four "15" vertices.
Thanks,
Justin
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake
--
Dr Anna Kalogirou
Research Fellow
School of Mathematics
University of Leeds
http://www1.maths.leeds.ac.uk/~matak/
<sweVbuoy2D_mesh.in>
_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake