[Gmsh] Repeated ids with Duplicata

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Oct 13 21:48:45 CEST 2016


Alexander - Some of your translations are by (0,0,0), hence creating a copy of the surface at the same location as the original. One of the two copies gets removed automatically (with Geometry.AutoCoherence=1).

Christophe

> On 13 Oct 2016, at 21:23, Alexander Lindsay <adlinds3 at ncsu.edu> wrote:
> 
> I'm getting repeated IDs using Duplicata. Here's the relevant excerpt from my script:
> 
> Plane Surface(11) = {9, 10};
> Plane Surface(12) = {10};
> fuel_surfaces[] = {};
> moder_surfaces[] = {};
> For xtrans In {0:108:12}
> For ytrans In {0:108:12}
> new_f_surface = Translate {xtrans, ytrans, 0} {
> Duplicata { Surface{11}; }
> };
> fuel_surfaces += new_f_surface;
> new_m_surface = Translate {xtrans, ytrans, 0} {
> Duplicata { Surface{12}; }
> };
> moder_surfaces += new_m_surface;
> Printf("New f surface '%g'", new_f_surface);
> Printf("New m surface '%g'", new_m_surface);
> EndFor
> EndFor
> 
> And here's the beginning of the output:
> 
> New f surface '13'
> New m surface '13'
> New f surface '13'
> New m surface '22'
> New f surface '23'
> New m surface '32'
> New f surface '33'
> New m surface '42'
> 
> How do I ensure that everything has a unique ID?
> _______________________________________________
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list