[Gmsh] Line in Surface

Bernardo Opolski bado.opolski at gmail.com
Sun Oct 28 06:19:06 CET 2018


Hi,

I've been looking at some topics about how to embed a line in a surface.
What I found is the command Line{ } In Surface{ };

It seems to work fine as long as I don't transfinite the surface in which
I'm embedding the line to.

The code is as follows:
// Start of the Script:
// Points:
Point(1) = {0, 0, 0};
Point(2) = {2, 0, 0};
Point(3) = {2, 5, 0};
Point(4) = {0, 5, 0};
Point(5) = {1, 2.5, 0};
Point(6) = {1, 0.5, 0};

// Lines:
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};

// Surface:
Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};
//Transfinite Surface {1} = {1, 2, 3, 4} Right;

Line(5) = {6, 5};
//Transfinite Line{5}   = 3;
Line{5} In Surface{1};

// Recombine triangular mesh into quadrangular:
Recombine Surface{1};

// Set element order to quadratic:
Mesh.ElementOrder=2;
Mesh.SecondOrderIncomplete=0;

// Duplicate Nodes:
Geometry.Tolerance = 1e-3;
Coherence Mesh;

// End of the Script

Thanks in advance!

-- 

*Bernardo Augusto Opolski*

*Engenheiro Civil - UFPR*
*Mestrando no Programa de Pós-Graduação em Engenharia de Construção Civil -
UFPR*
*Aluno de Pós-Graduação em Estruturas Protendidas - IDD*
(41) 9 9673 9741
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181028/ce603642/attachment.html>


More information about the gmsh mailing list