gdmcbain at freeshell.org
Mon Jul 26 04:03:23 CEST 2010
2010/7/24 Fernando Diego <fslack at gmail.com>:
> Hi people,
> i have a question: ¿How do I combine 1d and 2d elements in the same mesh?.
> I must generate a mesh with two elements (it's a didactic example only), one
> in 2d (quadrilateral) and on the edge of it one element in 1d.
> I sketched it:
> (node_4) _ _ _ _ _ _ _ _ _ (node_1) (node_1) x
> x x |
> | |
> | element_1 (2d) | element_2 (1d)
> | |
> x_ _ _ _ _ _ _ _ _ x (node_2) x
> (node_3) (node_2)
> Thnaks in advanced.
There's no restriction in the Gmsh .msh format on mixing elements of
So the following solves your didactic example problem:
2.2 0 8
1 0 1 0
2 0 0 0
3 -1 0 0
4 -1 1 0
1 1 2 1 4 2 1
2 3 2 2 6 2 1 4 3
I wrote that by hand. To generate it, probably the key step is
defining the line for element_2 as a Physical Line and the square for
element_1 as a Physical Surface. If the line is defined as a Physical
Line, then your generated mesh file will automatically contain the
corresponding one-dimensional elements.