[Gmsh] Problem with "Compound functions"

Adel MORENO adel.moreno at toulouse-inp.fr
Mon Feb 10 13:30:29 CET 2020


Dear Gmsh user, 
I have a problem with the use of "Compound functions". 

So, I have 4 sub-squares making up a larger square (I get this square by double translation from one of the sub-square). 
Now, I would like to create a mesh on the largest square while keeping the physical names I gave to the 4 sub-squares. 

I follow the tutorial 12 ( Cross-patch meshing with compounds) but I cannot make it work on my case. 

Thank you in advance for your help 

///////////////////////// 
//geo.file 
///////////////////////// 

SetFactory("OpenCASCADE"); 

Lx = 10; 
Ly = 10; 
Nx = 2; 
Ny = 2; 

Point(1) ={0, 10, 0, 10}; 
Point(2) ={5, 10, 0, 10}; 
Point(3) ={0, 5, 0, 10}; 
Point(4) ={5, 5, 0, 10}; 

Line(1) = {1, 2}; 
Line(2) = {2, 4}; 
Line(3) = {4, 3}; 
Line(4) = {3, 1}; 
Curve Loop(1) = {1, 2, 3, 4}; 
Plane Surface(1) = {1}; 

For j In {1:1} 
Translate {0, -5*j, 0} {Duplicata { Surface{1}; }} 
EndFor 

all_surfaces[] = Surface "*"; 

For i In {1:1} 
Translate {5*i, 0, 0} {Duplicata { Surface{all_surfaces[]}; }} 
EndFor 

For k In {1:4} 
Physical Surface(k) = {k}; 
EndFor 

Compound Curve{1,17}; 
Compound Curve{18,22}; 
Compound Curve{23,7}; 
Compound Curve{4,8}; 

Compound Surface{1,2}; 






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200210/85111d67/attachment.html>


More information about the gmsh mailing list