From b7057eece3811c7ffa525c4bfeb16938a078207d Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 20 May 2007 13:23:48 +0000 Subject: [PATCH] warning->error when trying to assign explicit reg ids in extrusions + add note in doc for this --- Parser/Gmsh.tab.cpp | 4 ++-- Parser/Gmsh.y | 4 ++-- Parser/Gmsh.yy.cpp | 4 ++-- doc/texinfo/gmsh.texi | 14 ++++++++++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 936739d844..47e42acad8 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -130,7 +130,7 @@ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.319 2007-04-22 06:42:26 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.320 2007-05-20 13:23:47 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -5488,7 +5488,7 @@ case 207: case 208: #line 2573 "Gmsh.y" { - yymsg(WARNING, "Explicit region numbers in layers are deprecated"); + yymsg(GERROR, "Explicit region numbers in layers are deprecated"); double d; extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr(yyvsp[-6].l); diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index b89a5b425b..902f20b7e5 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,5 +1,5 @@ %{ -// $Id: Gmsh.y,v 1.274 2007-04-22 06:42:26 geuzaine Exp $ +// $Id: Gmsh.y,v 1.275 2007-05-20 13:23:48 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2571,7 +2571,7 @@ ExtrudeParameter : } | tLayers '{' ListOfDouble ',' ListOfDouble ',' ListOfDouble '}' tEND { - yymsg(WARNING, "Explicit region numbers in layers are deprecated"); + yymsg(GERROR, "Explicit region numbers in layers are deprecated"); double d; extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr($3); diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 665ded2d90..e2c75d4e0a 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.318 2007-04-22 06:42:26 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.319 2007-05-20 13:23:48 geuzaine Exp $ */ #define FLEX_SCANNER @@ -752,7 +752,7 @@ char *yytext; #line 1 "Gmsh.l" #define INITIAL 0 #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.318 2007-04-22 06:42:26 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.319 2007-05-20 13:23:48 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 52008ee661..68938f0dd1 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -1,5 +1,5 @@ \input texinfo.tex @c -*-texinfo-*- -@c $Id: gmsh.texi,v 1.231 2007-03-29 16:32:23 geuzaine Exp $ +@c $Id: gmsh.texi,v 1.232 2007-05-20 13:23:48 geuzaine Exp $ @c @c Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle @c @@ -2016,7 +2016,7 @@ extruded and has the following syntax: @end group @end example -In the first @code{Layer} form, @var{expression} gives the number of +In the first @code{Layers} form, @var{expression} gives the number of elements to be created in the (single) layer. In the second form, the first @var{expression-list} defines how many elements should be created in each extruded layer, and the second @var{expression-list} gives the @@ -2029,6 +2029,16 @@ into quadrangles when possible. For surface extrusions, the @code{Recombine} option will recombine tetrahedra into prisms, hexahedra or pyramids. +Please note that, starting with Gmsh 2.0, region numbers cannot be +specified explicitly anymore in @code{Layers} commands. Instead, as with +all other geometry commands, you must use the automatically created +entity identifier created by the extrusion command. For example, the +following extrusion command will return the id of the new ``top'' +surface in @code{num[0]} and the id of the new volume in @code{num[1]}: +@example +num[] = Extrude @{0,0,1@} @{ Surface@{1@}; Layers@{10@}; @}; +@end example + @item Extrude @{ @{ @var{expression-list} @}, @{ @var{expression-list} @}, @var{expression} @} @{ @var{extrude-list} @var{layers} @} Extrudes both the geometry and the mesh using a rotation (@pxref{Extrusions}). The @var{layers} option is defined as above. -- GitLab