# [Gmsh] question on meshing of a cuboid standing on a rectangle

phani kumar phanikumar_vee at yahoo.com
Mon Oct 18 14:04:52 CEST 2004

```hello,

I constructed a rectancle and a cuboid standing on a rectangle and then i meshed it,but the intersection part where a cuboid lies on the rectagle is not clearly saying wheather two meshes are intersecting as the boundry of cuboid on rectangle is not clearly visible in the mesh.Is gmesh is intelligent enough to to detect the boundry of cuboid on rectangle. i am including the.geo file which construct this structure.so is this distinction of boundry is possible in gmsh.

/ CODE FOR GENERATING A  MESH WHERE CUBIOID STANDING ON A RECTANGLE : THE LENGTH,BREADTH  1 AND HEIGHT OF CUBOID IS 3 AND LENGTH OF AND BREADTH OF RECTANGLE ARE 6 AND 4
//First we set the characterstic length lc=0.036,lc sets the targetelemnt size at the point
lc=0.2;
//Here  (Point(1),Point(2),Point(3),Point(4)....Point(8)), are points of the cuboid defined with notation of (x,y,z,lc) , x,y,z are coordinates and lc is characterstic length
Point(1) = {0, 0, 0,lc};
Point(2)=  {1, 0, 0,lc};
Point(3)=  {1, 0, 1,lc};
Point(4)=  {0, 0, 1,lc};
Point(5) = {1, 3, 0,lc};
Point(6)=  {0, 3, 0,lc};
Point(7)=  {0, 3, 1,lc};
Point(8)=  {1, 3, 1,lc};
//points for rectangle
Point(9) =  {-3,0, -2, lc};
Point(10)=  {3, 0, -2, lc};
Point(11)=  {3, 0, 2, lc};
Point(12)=  {-3,0, 2, lc};

//Here (Line(1).......Line(12) ) will define the line curves of the cuboid
Line(1)={1,2};
Line(2)={2,3};
Line(3)={3,4};
Line(4)={4,1};
Line(5)={5,6};
Line(6)={6,7};
Line(7)={7,8};
Line(8)={8,5};
Line(9)={2,5};
Line(10)={3,8};
Line(11)={1,6};
Line(12)={4,7};
//Here (Line(13).......Line(16) ) will define the line curves of the rectangle
Line(13)={9,10};
Line(14)={10,11};
Line(15)={11,12};
Line(16)={12,9};

//Line Loop will join the given lines in the order to form an element structure,its a list of connected lines,a sign being associated with each line(depending on the orientation of the line).
Line Loop(13)={1,2,3,4};
Line Loop(14)={5,6,7,8};
Line Loop(15)={2,10,8,-9};
Line Loop(16)={4,11,6,-12};
Line Loop(17)={1,9,5,-11};
Line Loop(18)={3,12,7,-10};
Line Loop(19)={13,14,15,16};

//we can define the surface as list of line loops . Here it forms a square and rectangular plane surface
Plane Surface(19)={13};
Plane Surface(20)={14};
Plane Surface(21)={15};
Plane Surface(22)={16};
Plane Surface(23)={17};
Plane Surface(24)={18};
Plane Surface(25)={19};

//We can assign physical numbering to the surfaces defined
Physical Surface(100)={19};
Physical Surface(200)={20};
Physical Surface(300)={21};
Physical Surface(400)={22};
Physical Surface(500)={23};
Physical Surface(600)={24};
Physical Surface(700)={25};

// Here we use Recombine Surface to genearte a mesh with both triangular as well as quadrangular elements in the mesh.
Recombine Surface {20,22,23,24,21,19,25};

best regards,

phanikumar

---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20041018/2acce225/attachment.html>
```