[Gmsh] Problem with "Compound functions"
Christophe Geuzaine
cgeuzaine at uliege.be
Thu Feb 13 18:57:39 CET 2020
> On 10 Feb 2020, at 13:30, Adel MORENO <adel.moreno at toulouse-inp.fr> wrote:
>
> 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
>
OpenCASCADE does not apply "Coherence" by default, so that your geometry consists of 4 independent surfaces (with duplicate curves).
Here's a fix:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compound.geo
Type: application/octet-stream
Size: 690 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200213/03a3effc/attachment.geo>
-------------- next part --------------
Christophe
> /////////////////////////
> //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};
>
>
>
>
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
?
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
More information about the gmsh
mailing list