[Gmsh] fixed copyMesh(GEdge *from, GEdge *to, int direction)
walter steffe
walter.steffe at alice.it
Fri Oct 23 17:45:00 CEST 2015
Thanks to you Christophe
Walter
On Fri, 2015-10-23 at 13:59 +0200, Christophe Geuzaine wrote:
> 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
>