[Gmsh] Transfinite Line & SetSize with API on Python

Christophe Geuzaine cgeuzaine at uliege.be
Sun May 3 12:38:39 CEST 2020



> On 3 May 2020, at 12:09, Michel Cassagnes <michelcassagnes11 at gmail.com> wrote:
> 
> Hi Christophe,
> 
> I have modified the script, see attached.
> 
> What works for TransfiniteCurve is :
> - remove geo.synchronize
> - keep gmsh.model.mesh.setTransfiniteCurve() 
> 
> But setSize is not affected by removing geo.synchronize. Is this command ignored if Mesh.CharacteristicLengthFromPoints is set to 0 ?

Yes. This is exactly the same behavior as in .geo files.

Christophe

> 
> What is wrong in my script ?
> 
> Thank you!
> 
> Michel
> 
> 
> 
> 
> 
> Le dim. 3 mai 2020 à 11:04, Michel Cassagnes <michelcassagnes11 at gmail.com> a écrit :
> 
> Ok! Thank you very much Christophe.
> 
> Best regards,
> 
> Michel Cassagnes
> 
> Le dim. 3 mai 2020 à 08:45, Christophe Geuzaine <cgeuzaine at uliege.be> a écrit :
> 
> 
> > On 3 May 2020, at 01:55, Michel Cassagnes <michelcassagnes11 at gmail.com> wrote:
> > 
> > Dear all,
> > 
> > I need some help to make a transfinite line and set size at points work with the API on Python.
> > 
> > I made many tests and many looks in examples and doc but I don't find how to handle all this.
> > 
> > Please find enclosed an example that doesn't give anything for the line entered as transfinite with 10 points (take care to change the working folder at the begining of the script).
> > 
> > Maybe there is a conflict with other definitions of mesh size (filelds, characteristic length at points, etc).
> > 
> 
> Your last call to gmsh.model.geo.synchronize() resets the meshing attributes of the curve. Either remove it (it's useless anyway), or set your meshing contraints within the "geo" kernel, with "gmsh.model.geo.mesh.setTransfiniteCurve()" instead of "gmsh.model.mesh.setTransfiniteCurve()".
> 
> Christophe
> 
> 
> 
> > Thank you.
> > 
> > Best regards,
> > 
> > Michel Cassagnes
> > <test-transfinite.py>_______________________________________________
> > 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
> 
> 
> 
> <test-transfinite.py>

— 
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