[Gmsh] Coherence
Philippe Lussou
plussou at necs.fr
Thu May 13 00:59:18 CEST 2004
With the file, it is easier to understand ...
>
> Hi every body,
>
> I've used GMH to create a quite sophisticated 3D geometry. I've defined
> several Functions to create simples elements and I call my functions in a
> "central" script. The problem I met is explained bellow with a simple
> example.
>
> In "example.geo" when the Coherence function is called, the Transfinite
> algorithm does'nt work any more because the modes 5 and 8 has been
> removed. When Coherence is not called, Transfinite algorithm works but the
> mesh is not coherent.
>
> I thought about a fonction like :
>
> p1 = Coherence Point { X0, Y0, Z0, LC } ;
>
> that would return a new number if there no point at { X0, Y0, Z0 } and
> return the number of the point at { X0, Y0, Z0 } if it exists.
>
> What do you think about that ?
>
> Philippe Lussou
> _______________________________________________
> Numerical Engineering & Consulting Services
> NECS 16-18, rue Dubrunfaut 75012 PARIS FRANCE
>
-------------- next part --------------
Function Square
p1 = newp ; Point (p1) = { X0, Y0, Z0, LC } ;
p2 = newp ; Point (p2) = { X0+c, Y0, Z0, LC } ;
p3 = newp ; Point (p3) = { X0+c, Y0+c, Z0, LC } ;
p4 = newp ; Point (p4) = { X0, Y0+c, Z0, LC } ;
l1 = newl ; Line (l1) = { p1, p2 } ;
l2 = newl ; Line (l2) = { p2, p3 } ;
l3 = newl ; Line (l3) = { p3, p4 } ;
l4 = newl ; Line (l4) = { p4, p1 } ;
Transfinite Line { l1, l2, l3, l4 } = D ;
ll = newl ; Line Loop (ll) = { l1, l2, l3, l4 } ;
ns = news ; Plane Surface (ns) = { ll } ;
Transfinite Surface { ns } = { p1, p2, p3, p4 } ;
Recombine Surface { ns } ;
LS[iLS] = ns ; iLS += 1 ;
Return
LS[] = { 0 } ; iLS = 0 ;
c = 1.0 ;
LC = 0.1 ;
D = 11 ;
X0 = 0 ; Y0 = 0 ; Z0 = 0 ;
Call Square ;
X0 += c ;
Call Square ;
//Coherence ;
Physical Surface (100) = LS[] ;