Jian
Jian

Reputation: 1

Nodes inconsistency between 2D and 3D elements in GMSH

I am trying to produce a tetrahedral mesh of a cube. The problem I encounter is that a few nodes that are used to generate the triangular faces are then not used to generate any of the tetrahedral elements. Is there a way to avoid this? This is the code.

    cl__1 = 0.01;
    Point(1) = {0, 0, 0, cl__1};
    Point(2) = {1, 0, 0, cl__1};
    Point(3) = {1, 1, 0, cl__1};
    Point(4) = {0, 1, 0, cl__1};
    Line(1) = {1, 2};
    Line(2) = {2, 3};
    Line(3) = {3, 4};
    Line(4) = {4, 1};
    Line Loop(5) = {4, 1, 2, 3};
    Plane Surface(6) = {5};
    Extrude {0, 0, 1} {
      Surface{6};
    }
    Coherence;
    Transfinite Line {1, 2, 3, 4, 9, 10, 11, 8, 18, 22, 13, 14} = 2 Using Progression 1;
    Transfinite Surface {19};
    Transfinite Surface {23};
    Transfinite Surface {27};
    Transfinite Surface {15};
    Transfinite Surface {28};
    Transfinite Surface {6};
    Transfinite Volume{1} = {1, 2, 3, 4, 6, 10, 14, 5};
    Physical Surface("top") = {28};
    Physical Surface("bottom") = {6};
    Physical Surface("x_min") = {15};
    Physical Surface("x_max") = {23};
    Physical Surface("y_min") = {19};
    Physical Surface("y_max") = {27};
    Physical Volume("bottom_volume") = {1};

Thanks Jian

Upvotes: 0

Views: 224

Answers (1)

gagiuntoli
gagiuntoli

Reputation: 550

The result of that input gives these nodes:

$Nodes
8
1 0 0 0
2 1 0 0
3 1 1 0
4 0 1 0
5 0 1 1
6 0 0 1
7 1 0 1
8 1 1 1
$EndNodes

with these nodes you can define all the triangular faces and the tetrahedral elements that define that mesh (there is no inconsistency in my opinion).

Upvotes: 1

Related Questions