[Gmsh] fixed copyMesh(GEdge *from, GEdge *to, int direction)

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Oct 23 13:59:42 CEST 2015


Hi Walter - Sorry for the late reply: your patch is merged in SVN.
Thanks!
Christophe

> On 23 Oct 2015, at 10:12, Steffè Walter <Walter.Steffe at thalesaleniaspace.com> wrote:
> 
> I would like to spend a few more words to clarify the proposed patch.
>  
> In the original file the value of newu was defined by:
>  
> 1)  double newu = (direction > 0) ? u : (from_u_max - u + from_u_min);
>  
> where from_u_min and from_u_max are the extremes of the parameter u associated whith the source edge.
>  
> In the corrected version the newu is defined by:
>  
> 2)  double newu = (direction > 0) ? (u-from_u_min+to_u_min) : (from_u_max-u+to_u_min);
>  
> where  to_u_min is the lower extreme of the parameter u associated whith the destination edge.
>  
> It is evident the two expressions are equivalent if from_u_min = to_u_min.
> The test cases built with gmsh internals geometrical tools probably satisfy this condition so you have never
> encountered any problem with equation 1.
>  
> I have built a periodical structure (a grid of boxes) by cutting a brick with a number of parallel planes
> (in all three directions x,y,z). The splitting was done using functions provided by the Salome library.
> The result is a set of boxes, faces, edges that are related by a combination of the three basic translations
> (m Delta X + n Delta Y + k Delta Z).
> The corresponding (congruent) edges are parametrized in such a way that the relation from_u_min = to_u_min is not
> respected so that the equation 1 gives a wrong result.
>  
> May you to replace equation 1 with equation 2 (as done by my patch) so that way the copyMesh function can
> be used also in the latter (more general) case ?
>  
> Thanks
> Walter Steffe
>  
>  
>  
>  
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Tetrahedron V, July 4-5 2016: http://tetrahedron.montefiore.ulg.ac.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info