Skip to content
Snippets Groups Projects
Commit b9db618e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

merge patch from Jose Paulo Moitinho de Almeida for...

merge patch from Jose Paulo Moitinho de Almeida for AlternateRight/AlternateLeft transfinite options
parent 467f9b4c
No related branches found
No related tags found
No related merge requests found
...@@ -286,7 +286,7 @@ class GFace : public GEntity ...@@ -286,7 +286,7 @@ class GFace : public GEntity
// corners of the transfinite interpolation // corners of the transfinite interpolation
std::vector<GVertex*> corners; std::vector<GVertex*> corners;
// all diagonals of the triangulation are left (-1), right (1) or // all diagonals of the triangulation are left (-1), right (1) or
// alternated (0) // alternated starting at right (2) or left (-2)
int transfiniteArrangement; int transfiniteArrangement;
// do we smooth (transfinite) mesh? (<0 to use default smoothing) // do we smooth (transfinite) mesh? (<0 to use default smoothing)
int transfiniteSmoothing; int transfiniteSmoothing;
......
...@@ -148,7 +148,7 @@ class Surface{ ...@@ -148,7 +148,7 @@ class Surface{
char Visible; char Visible;
int Method; int Method;
int Recombine; int Recombine;
int Recombine_Dir; // -1 is left, +1 is right, 0 is alternated int Recombine_Dir; // -1 is left, +1 is right, -2/2 is alternated left/right
double RecombineAngle; double RecombineAngle;
int TransfiniteSmoothing; int TransfiniteSmoothing;
List_T *Generatrices; List_T *Generatrices;
......
...@@ -423,9 +423,13 @@ int MeshTransfiniteSurface(GFace *gf) ...@@ -423,9 +423,13 @@ int MeshTransfiniteSurface(GFace *gf)
if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine) if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine)
gf->quadrangles.push_back(new MQuadrangle(v1, v2, v3, v4)); gf->quadrangles.push_back(new MQuadrangle(v1, v2, v3, v4));
else if(gf->meshAttributes.transfiniteArrangement == 1 || else if(gf->meshAttributes.transfiniteArrangement == 1 ||
(gf->meshAttributes.transfiniteArrangement == 0 && (gf->meshAttributes.transfiniteArrangement == 2 &&
((i % 2 == 0 && j % 2 == 1) || ((i % 2 == 0 && j % 2 == 1) ||
(i % 2 == 1 && j % 2 == 0)))){ (i % 2 == 1 && j % 2 == 0))) ||
(gf->meshAttributes.transfiniteArrangement == -2 &&
((i % 2 == 0 && j % 2 == 0) ||
(i % 2 == 1 && j % 2 == 1)))
){
gf->triangles.push_back(new MTriangle(v1, v2, v3)); gf->triangles.push_back(new MTriangle(v1, v2, v3));
gf->triangles.push_back(new MTriangle(v3, v4, v1)); gf->triangles.push_back(new MTriangle(v3, v4, v1));
} }
...@@ -452,9 +456,13 @@ int MeshTransfiniteSurface(GFace *gf) ...@@ -452,9 +456,13 @@ int MeshTransfiniteSurface(GFace *gf)
if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine) if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine)
gf->quadrangles.push_back(new MQuadrangle(v1, v2, v3, v4)); gf->quadrangles.push_back(new MQuadrangle(v1, v2, v3, v4));
else if(gf->meshAttributes.transfiniteArrangement == 1 || else if(gf->meshAttributes.transfiniteArrangement == 1 ||
(gf->meshAttributes.transfiniteArrangement == 0 && (gf->meshAttributes.transfiniteArrangement == 2 &&
((i % 2 == 0 && j % 2 == 1) || ((i % 2 == 0 && j % 2 == 1) ||
(i % 2 == 1 && j % 2 == 0)))){ (i % 2 == 1 && j % 2 == 0))) ||
(gf->meshAttributes.transfiniteArrangement == -2 &&
((i % 2 == 0 && j % 2 == 0) ||
(i % 2 == 1 && j % 2 == 1)))
){
gf->triangles.push_back(new MTriangle(v1, v2, v3)); gf->triangles.push_back(new MTriangle(v1, v2, v3));
gf->triangles.push_back(new MTriangle(v3, v4, v1)); gf->triangles.push_back(new MTriangle(v3, v4, v1));
} }
......
This diff is collapsed.
...@@ -3456,8 +3456,12 @@ TransfiniteArrangement : ...@@ -3456,8 +3456,12 @@ TransfiniteArrangement :
$$ = 1; $$ = 1;
else if(!strcmp($1, "Left")) else if(!strcmp($1, "Left"))
$$ = -1; $$ = -1;
else // alternated else if(!strcmp($1, "AlternateRight"))
$$ = 0; $$ = 2;
else if(!strcmp($1, "AlternateLeft"))
$$ = -2;
else // "Alternate" -> "Alternate Right"
$$ = 2;
Free($1); Free($1);
} }
; ;
......
...@@ -127,4 +127,5 @@ Kelleners, Romuald Conty, Renaud Sizaire, Michel Benhamou, Tom De Vuyst, Kris ...@@ -127,4 +127,5 @@ Kelleners, Romuald Conty, Renaud Sizaire, Michel Benhamou, Tom De Vuyst, Kris
Van den Abeele, Simon Vun, Simon Corbin, Thomas De-Soza, Marcus Drosson, Antoine Van den Abeele, Simon Vun, Simon Corbin, Thomas De-Soza, Marcus Drosson, Antoine
Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel
Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios, Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios,
Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain. Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain, Jose Paulo Moitinho de
Almeida, Guillaume Demesy.
...@@ -2654,14 +2654,15 @@ as the preceding one). The optional argument `@code{Using Bump ...@@ -2654,14 +2654,15 @@ as the preceding one). The optional argument `@code{Using Bump
@var{expression}}' instructs the transfinite algorithm to distribute the @var{expression}}' instructs the transfinite algorithm to distribute the
nodes with a refinement at both ends of the line. nodes with a refinement at both ends of the line.
@item Transfinite Surface @{ @var{expression-list} @} | "*" < = @{ @var{expression-list} @} > < Left | Right | Alternate > ; @item Transfinite Surface @{ @var{expression-list} @} | "*" < = @{ @var{expression-list} @} > < Left | Right | Alternate | AlternateRight | AlternateLeft > ;
Selects surfaces to be meshed with the 2D transfinite algorithm. The Selects surfaces to be meshed with the 2D transfinite algorithm. The
@var{expression-list} on the right-hand-side should contain the @var{expression-list} on the right-hand-side should contain the
identification numbers of three or four points on the boundary of the identification numbers of three or four points on the boundary of the
surface that define the corners of the transfinite interpolation. If no surface that define the corners of the transfinite interpolation. If no
identification numbers are given, the transfinite algorithm will try to identification numbers are given, the transfinite algorithm will try to
find the corners automatically. The optional argument specifies the way find the corners automatically. The optional argument specifies the way
the triangles are oriented when the mesh is not recombined. the triangles are oriented when the mesh is not
recombined. (@code{Alternate} is a synonym for @code{AlternateRight}).
@item Transfinite Volume @{ @var{expression-list} @} | "*" < = @{ @var{expression-list} @} > ; @item Transfinite Volume @{ @var{expression-list} @} | "*" < = @{ @var{expression-list} @} > ;
Selects five- or six-face volumes to be meshed with the 3D transfinite Selects five- or six-face volumes to be meshed with the 3D transfinite
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment