[Gmsh] Message receive it on messages window ....

Christophe Geuzaine geuzaine at acm.caltech.edu
Wed May 28 17:57:12 CEST 2003


Catalin Bondrea wrote:
> Ok. I make a small example, the code is this:
> 
> c1=0.05;
> Px = 0.0 ; Py = 0.0 ; Pz = 0.0 ;
> p1=newp; Point(p1) = { Px, Py, Pz, c1 };
> p2=newp; Point(p2) = { Px+1, Py, Pz, c1 };
> p3=newp; Point(p3) = { Px+1, Py+1, Pz, c1 };
> p4=newp; Point(p4) = { Px, Py+1, Pz, c1 };
> 
> L1=newreg; Line(L1)={p1,p2};
> L2=newreg; Line(L2)={p2,p3};
> L3=newreg; Line(L3)={p3,p4};
> L4=newreg; Line(L4)={p4,p1};
> 
> LL1=newreg; Line Loop(LL1) = {L1,L2,L3,L4};
> PS1=newreg; Plane Surface (PS1)={LL1};
> 
> Extrude Surface {PS1, {0,0,-1}};
> 
> c5=0.5;
> 
> 
> p5=newp; Point(p5) = { Px, Py+0.25, Pz-0.25, c5 };
> p6=newp; Point(p6) = { Px+0.75, Py+0.25, Pz-0.25, c5 };
> p7=newp; Point(p7) = { Px+0.75, Py+0.75, Pz-0.25, c5 };
> p8=newp; Point(p8) = { Px, Py+0.75, Pz-0.25, c5 };
> 
> L5=newreg; Line(L5)={p5,p6};
> L6=newreg; Line(L6)={p6,p7};
> L7=newreg; Line(L7)={p7,p8};
> L8=newreg; Line(L8)={p8,p5};
> 
> LL2=newreg; Line Loop(LL2) = {L5,L6,L7,L8};
> PS2=newreg; Plane Surface (PS2)={LL2};
> 
> Extrude Surface {PS2, {0,0,-0.5}};
> 
> Surface Loop(57) = {55,34,43,47,51,56};
> Volume(58) = {57};
> Surface Loop(59) = {6,15,19,23,27,28};
> Volume(60) = {59};
> 
> With this code maybe I explain more better what really is happening.
> 
> When I try to mesh 3D this code give me a lot of warnings:
>  Coplanar and something ...
> 
> The question is what is the  diagram of what I need to do to have this small
> example to work
> with out warnings. Probable I miss something. What I real don't know.

You have superposed surfaces (27 and 55) with a "zero-volume" region
inbetween... Hence the flat elements ("coplanar points"). Here is a
corrected version:

c1=0.1;
Px = 0.0 ; Py = 0.0 ; Pz = 0.0 ;
p1=newp; Point(p1) = { Px, Py, Pz, c1 };
p2=newp; Point(p2) = { Px+1, Py, Pz, c1 };
p3=newp; Point(p3) = { Px+1, Py+1, Pz, c1 };
p4=newp; Point(p4) = { Px, Py+1, Pz, c1 };

L1=newreg; Line(L1)={p1,p2};
L2=newreg; Line(L2)={p2,p3};
L3=newreg; Line(L3)={p3,p4};
L4=newreg; Line(L4)={p4,p1};

LL1=newreg; Line Loop(LL1) = {L1,L2,L3,L4};
PS1=newreg; Plane Surface (PS1)={LL1};

Extrude Surface {PS1, {0,0,-1}};

c5=0.2;


p5=newp; Point(p5) = { Px, Py+0.25, Pz-0.25, c5 };
p6=newp; Point(p6) = { Px+0.75, Py+0.25, Pz-0.25, c5 };
p7=newp; Point(p7) = { Px+0.75, Py+0.75, Pz-0.25, c5 };
p8=newp; Point(p8) = { Px, Py+0.75, Pz-0.25, c5 };

L5=newreg; Line(L5)={p5,p6};
L6=newreg; Line(L6)={p6,p7};
L7=newreg; Line(L7)={p7,p8};
L8=newreg; Line(L8)={p8,p5};

LL2=newreg; Line Loop(LL2) = {L5,L6,L7,L8};
PS2=newreg; Plane Surface (PS2)={LL2};

Extrude Surface {PS2, {0,0,-0.5}};

/*
Surface Loop(57) = {55,34,43,47,51,56};
Volume(58) = {57};
Surface Loop(59) = {6,15,19,23,27,28};
Volume(60) = {59};
*/

Delete { Surface{27};}
Line Loop(57) = {13,-11,-22,4};
Line Loop(58) = {-39,-50,32,41};
Plane Surface(59) = {57,58};
Surface Loop(60) = {55,34,43,47,51,56};
Volume(61) = {60};
Surface Loop(62) = {51,34,43,47,56,59,15,6,19,23,28};
Volume(63) = {62};

-- 
Christophe Geuzaine

Tel: (626) 395-4552    http://www.geuz.org
Fax: (626) 578-0124    mailto:geuzaine at acm.caltech.edu