diff --git a/Graphics/Draw.h b/Graphics/Draw.h index 20ff3c46629edb1e79eb96b4dfa486c513815e39..844d0dc8049cfcb450c4b3ae90bfebd42dcd308e 100644 --- a/Graphics/Draw.h +++ b/Graphics/Draw.h @@ -45,7 +45,6 @@ void set_s(int i, double val); void PaletteContinuous(Post_View * View, double min, double max, double val); void PaletteContinuousLinear(Post_View * v, double min, double max, double val); void PaletteDiscrete(Post_View * View, int nbi, int i); -void ColorSwitch(int i); char SelectEntity(int type, Vertex **v, Curve **c, Surface **s); void HighlightEntity(Vertex *v,Curve *c, Surface *s, int permanent); @@ -59,7 +58,6 @@ void Draw(void); void Draw_String(char *s); void Draw_Geom(Mesh *m); -void Draw_Mesh(Mesh *M); void Draw_Post(void); void Draw_Graph2D(void); void Draw_Text2D(void); @@ -82,17 +80,16 @@ void Draw_Vector(int Type, int Fill, double relHeadRadius, double relStemLength, double relStemRadius, double x, double y, double z, double dx, double dy, double dz, double Raise[3][8], int light); - -void Draw_Mesh_Volumes(void *a, void *b); -void Draw_Mesh_Surfaces(void *a, void *b); +void Draw_Mesh(Mesh *M); +void Draw_Mesh_Volume(void *a, void *b); +void Draw_Mesh_Surface(void *a, void *b); void Draw_Mesh_Extruded_Surfaces(void *a, void *b); -void Draw_Mesh_Curves(void *a, void *b); -void Draw_Mesh_Points(void *a, void *b); - -void Draw_Mesh_Tetrahedron(void *a, void *b); +void Draw_Mesh_Curve(void *a, void *b); +void Draw_Mesh_Point(void *a, void *b); +void Draw_Mesh_Line(void *a, void *b); void Draw_Mesh_Triangle(void *a, void *b); -void Draw_Mesh_Line(void *a,void *b); void Draw_Mesh_Quadrangle(void *a, void *b); +void Draw_Mesh_Tetrahedron(void *a, void *b); void Draw_Mesh_Hexahedron(void *a, void *b); void Draw_Mesh_Prism(void *a, void *b); void Draw_Mesh_Pyramid(void *a, void *b); diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index 898a113e014a5676d59c9f79a0a780e7f2efcede..1b41fee5460ba4a65a94276e0637ad143cc96119 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.84 2004-05-25 23:16:26 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.85 2004-05-26 23:53:37 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -166,23 +166,23 @@ void Draw_Mesh(Mesh * M) CTX.mesh.volumes_num || (CTX.mesh.use_cut_plane && CTX.mesh.cut_plane_as_surface && (CTX.mesh.surfaces_edges || CTX.mesh.surfaces_faces)))) { - Tree_Action(M->Volumes, Draw_Mesh_Volumes); + Tree_Action(M->Volumes, Draw_Mesh_Volume); } if(M->status >= 2 && (CTX.mesh.surfaces_faces || CTX.mesh.surfaces_edges || CTX.mesh.surfaces_num || CTX.mesh.normals)) { - Tree_Action(M->Surfaces, Draw_Mesh_Surfaces); + Tree_Action(M->Surfaces, Draw_Mesh_Surface); if(CTX.mesh.oldxtrude) //old extrusion algo Tree_Action(M->Volumes, Draw_Mesh_Extruded_Surfaces); } if(M->status >= 1 && (CTX.mesh.lines || CTX.mesh.lines_num || CTX.mesh.tangents)) { - Tree_Action(M->Curves, Draw_Mesh_Curves); + Tree_Action(M->Curves, Draw_Mesh_Curve); } if(M->status >= 0 && (CTX.mesh.points || CTX.mesh.points_num)) { - Tree_Action(M->Vertices, Draw_Mesh_Points); + Tree_Action(M->Vertices, Draw_Mesh_Point); } } @@ -211,7 +211,7 @@ void Draw_Mesh(Mesh * M) } } -void Draw_Mesh_Volumes(void *a, void *b) +void Draw_Mesh_Volume(void *a, void *b) { Volume *v = *(Volume **) a; Tree_Action(v->Simplexes, Draw_Mesh_Tetrahedron); @@ -220,7 +220,7 @@ void Draw_Mesh_Volumes(void *a, void *b) Tree_Action(v->Pyramids, Draw_Mesh_Pyramid); } -void Draw_Mesh_Surfaces(void *a, void *b) +void Draw_Mesh_Surface(void *a, void *b) { Surface *s = *(Surface **) a; theColor = s->Color; @@ -241,7 +241,7 @@ void Draw_Mesh_Extruded_Surfaces(void *a, void *b) Tree_Action(v->Quad_Surf, Draw_Mesh_Quadrangle); } -void Draw_Mesh_Curves(void *a, void *b) +void Draw_Mesh_Curve(void *a, void *b) { Curve *c = *(Curve **) a; if(c->Num < 0) @@ -280,7 +280,7 @@ double intersectCutPlane(int num, Vertex **v) return intersectCutPlane(num, v, &dummy, &dummy); } -void Draw_Mesh_Points(void *a, void *b) +void Draw_Mesh_Point(void *a, void *b) { Vertex *v; char Num[100]; @@ -769,7 +769,7 @@ void Draw_Mesh_Tetrahedron(void *a, void *b) if(part && !(*part)->Visible) return; - // FIXME: move this in Draw_Mesh_Volumes as soon as a coherent + // FIXME: move this in Draw_Mesh_Volume as soon as a coherent // structure exists for volumes Volume *v = FindVolume(s->iEnt, THEM); if(v){ @@ -927,7 +927,7 @@ void Draw_Mesh_Hexahedron(void *a, void *b) if(part && !(*part)->Visible) return; - // FIXME: move this in Draw_Mesh_Volumes as soon as a coherent + // FIXME: move this in Draw_Mesh_Volume as soon as a coherent // structure exists for volumes Volume *v = FindVolume(h->iEnt, THEM); if(v){ @@ -1099,7 +1099,7 @@ void Draw_Mesh_Prism(void *a, void *b) if(part && !(*part)->Visible) return; - // FIXME: move this in Draw_Mesh_Volumes as soon as a coherent + // FIXME: move this in Draw_Mesh_Volume as soon as a coherent // structure exists for volumes Volume *v = FindVolume(p->iEnt, THEM); if(v){ @@ -1265,7 +1265,7 @@ void Draw_Mesh_Pyramid(void *a, void *b) if(part && !(*part)->Visible) return; - // FIXME: move this in Draw_Mesh_Volumes as soon as a coherent + // FIXME: move this in Draw_Mesh_Volume as soon as a coherent // structure exists for volumes Volume *v = FindVolume(p->iEnt, THEM); if(v){ diff --git a/Mesh/Read_Mesh.cpp b/Mesh/Read_Mesh.cpp index 59fe5b1742d49dd40353c30ee93485f29ab192b4..74cba8faf2f710fc4d39b8fb99c4eaa9d944aed4 100644 --- a/Mesh/Read_Mesh.cpp +++ b/Mesh/Read_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Read_Mesh.cpp,v 1.73 2004-05-25 23:16:27 geuzaine Exp $ +// $Id: Read_Mesh.cpp,v 1.74 2004-05-26 23:53:37 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -238,19 +238,19 @@ void Read_Mesh_MSH(Mesh * M, FILE * fp) switch (Type) { case PNT : Nbr_Nodes = 1; break; case LGN1: Nbr_Nodes = 2; break; - case LGN2: Nbr_Nodes = 3; break; + case LGN2: Nbr_Nodes = 2 + 1; break; case TRI1: Nbr_Nodes = 3; break; - case TRI2: Nbr_Nodes = 6; break; + case TRI2: Nbr_Nodes = 3 + 3; break; case QUA1: Nbr_Nodes = 4; break; - case QUA2: Nbr_Nodes = 8 + 1; break; + case QUA2: Nbr_Nodes = 4 + 4 + 1; break; case TET1: Nbr_Nodes = 4; break; - case TET2: Nbr_Nodes = 10; break; + case TET2: Nbr_Nodes = 4 + 6; break; case HEX1: Nbr_Nodes = 8; break; - case HEX2: Nbr_Nodes = 20 + 6; break; + case HEX2: Nbr_Nodes = 8 + 12 + 6; break; case PRI1: Nbr_Nodes = 6; break; - case PRI2: Nbr_Nodes = 15 + 3; break; + case PRI2: Nbr_Nodes = 6 + 9 + 3; break; case PYR1: Nbr_Nodes = 5; break; - case PYR2: Nbr_Nodes = 13 + 1; break; + case PYR2: Nbr_Nodes = 5 + 8 + 1; break; } } diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 702f625885372e221fbb6e1f73d18934459b6c55..4d5c28372e50f2897b7f135b3d25a3ec52c02ec2 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.112 2004-05-25 23:16:33 geuzaine Exp $ +@c $Id: gmsh.texi,v 1.113 2004-05-26 23:53:37 geuzaine Exp $ @c @c Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle @c @@ -2713,14 +2713,27 @@ Prism (6 nodes). @item 7 Pyramid (5 nodes). @item 8 -Second order line (3 nodes). +Second order line (3 nodes: associated with 2 vertices and 1 edge). @item 9 -Second order triangle (6 nodes). +Second order triangle (6 nodes: associated with 3 vertices and 3 edges). +@item 10 +Second order quadrangle (9 nodes: associated with 4 vertices, 4 edges and 1 +quadrangular face). @item 11 -Second order tetrahedron (10 nodes). +Second order tetrahedron (10 nodes: associated with 4 vertices and 6 edges). +@item 12 +Second order hexahedron (26 nodes: associated with 8 vertices, 12 edges and +6 quadrangular faces). +@item 13 +Second order prism (18 nodes: associated with 6 vertices, 9 edges and 3 +quadrangular faces). +@item 14 +Second order pyramid (14 nodes: associated with 5 vertices, 8 edges and 1 +quadrangular face). @item 15 Point (1 node). @end table +See below for the ordering of the nodes. @item @var{reg-phys} is the number of the physical entity to which the element belongs. @@ -2734,12 +2747,12 @@ kept for backward compatibility. @item @var{node-number-list} is the list of the @var{number-of-nodes} node numbers of the @var{n}-th -element (separated by white space, without commas). The ordering of the -nodes is given in @ref{Gmsh node ordering}; for second order elements, the -first order nodes are given first, followed by the nodes associated with the -edges, followed by the nodes associated with the quadrangular faces (if -any). The ordering of these additional nodes follows the ordering of the -edges/faces given in @ref{Gmsh node ordering}. +element. The ordering of the nodes is given in @ref{Gmsh node ordering}; for +second order elements, the first order nodes are given first, followed by +the nodes associated with the edges, followed by the nodes associated with +the quadrangular faces (if any). The ordering of these additional nodes +follows the ordering of the edges and faces given in @ref{Gmsh node +ordering}. @end table @c ......................................................................... @@ -2823,14 +2836,27 @@ Prism (6 nodes). @item 7 Pyramid (5 nodes). @item 8 -Second order line (3 nodes). +Second order line (3 nodes: associated with 2 vertices and 1 edge). @item 9 -Second order triangle (6 nodes). +Second order triangle (6 nodes: associated with 3 vertices and 3 edges). +@item 10 +Second order quadrangle (9 nodes: associated with 4 vertices, 4 edges and 1 +quadrangular face). @item 11 -Second order tetrahedron (10 nodes). +Second order tetrahedron (10 nodes: associated with 4 vertices and 6 edges). +@item 12 +Second order hexahedron (26 nodes: associated with 8 vertices, 12 edges and +6 quadrangular faces). +@item 13 +Second order prism (18 nodes: associated with 6 vertices, 9 edges and 3 +quadrangular faces). +@item 14 +Second order pyramid (14 nodes: associated with 5 vertices, 8 edges and 1 +quadrangular face). @item 15 Point (1 node). @end table +See below for the ordering of the nodes. @item @var{number-of-tags} gives the number of tags for the @var{n}-th element. By default, Gmsh @@ -2845,13 +2871,12 @@ element belongs; the third is the number of a mesh partition to which the element belongs. @item @var{node-number-list} -is the list of the node numbers of the @var{n}-th element (separated by -white space, without commas). The ordering of the nodes is given in -@ref{Gmsh node ordering}; for second order elements, the first order nodes -are given first, followed by the nodes associated with the edges, followed -by the nodes associated with the quadrangular faces (if any). The ordering -of these additional nodes follows the ordering of the edges/faces given in -@ref{Gmsh node ordering}. +is the list of the node numbers of the @var{n}-th element. The ordering of +the nodes is given in @ref{Gmsh node ordering}; for second order elements, +the first order nodes are given first, followed by the nodes associated with +the edges, followed by the nodes associated with the quadrangular faces (if +any). The ordering of these additional nodes follows the ordering of the +edges and faces given in @ref{Gmsh node ordering}. @end table @c ------------------------------------------------------------------------- @@ -3184,7 +3209,7 @@ Point: @example @group Line: - edge 1: nodes 1 -> 2 + edge 1: nodes 1 2 v | | @@ -3197,9 +3222,9 @@ Line: @example @group Triangle: - edge 1: nodes 1 -> 2 - v 2: 2 -> 3 - | 3: 3 -> 1 + edge 1: nodes 1 2 + v 2: 2 3 + | 3: 3 1 | 3 |\ @@ -3212,10 +3237,10 @@ Triangle: @example @group Quadrangle: - edge 1: nodes 1 -> 2 quadface 1: nodes 1 2 3 4 - v 2: 2 -> 3 - | 3: 3 -> 4 - 4--|--3 4: 4 -> 1 + edge 1: nodes 1 2 quad. face 1: nodes 1 2 3 4 + v 2: 2 3 + | 3: 3 4 + 4--|--3 4: 4 1 | | | -----------u | | | @@ -3227,12 +3252,12 @@ Quadrangle: @example @group Tetrahedron: - edge 1: nodes 1 -> 2 - v 2: 2 -> 3 - | 3: 3 -> 1 - | 4: 4 -> 1 - | 5: 4 -> 3 - 3 6: 4 -> 2 + edge 1: nodes 1 2 + v 2: 2 3 + | 3: 3 1 + | 4: 4 1 + | 5: 4 3 + 3 6: 4 2 |\ | \ |__\2_____u @@ -3246,18 +3271,18 @@ Tetrahedron: @example @group Hexahedron: - edge 1: nodes 1 -> 2 quadface 1: nodes 1 2 3 4 - v 2: 1 -> 4 2: 1 2 5 6 - | 3: 1 -> 5 3: 1 4 5 8 - | 4: 2 -> 3 4: 2 3 6 7 - 4----|--3 5: 2 -> 6 5: 3 4 7 8 - |\ | |\ 6: 3 -> 4 6: 5 6 7 8 - | 8-------7 7: 3 -> 7 - | | ----|---u 8: 4 -> 8 - 1-|---\-2 | 9: 5 -> 6 - \| \ \| 10: 5 -> 8 - 5-----\-6 11: 6 -> 7 - \ 12: 7 -> 8 + edge 1: nodes 1 2 quad. face 1: nodes 1 2 3 4 + v 2: 1 4 2: 1 2 5 6 + | 3: 1 5 3: 1 4 5 8 + | 4: 2 3 4: 2 3 6 7 + 4----|--3 5: 2 6 5: 3 4 7 8 + |\ | |\ 6: 3 4 6: 5 6 7 8 + | 8-------7 7: 3 7 + | | ----|---u 8: 4 8 + 1-|---\-2 | 9: 5 6 + \| \ \| 10: 5 8 + 5-----\-6 11: 6 7 + \ 12: 7 8 w @end group @end example @@ -3265,15 +3290,15 @@ Hexahedron: @example @group Prism: - edge 1: nodes 1 -> 2 quadface 1: nodes 1 2 4 5 - v 2: 1 -> 3 2: 1 3 4 6 - 3 | 3: 1 -> 4 3: 2 3 5 6 - |\| 4: 2 -> 3 - | | 5: 2 -> 5 - 1_|2 6: 3 -> 6 - \| 6 7: 4 -> 5 - |_|_\___u 8: 4 -> 6 - \| \ 9: 5 -> 6 + edge 1: nodes 1 2 quad. face 1: nodes 1 2 4 5 + v 2: 1 3 2: 1 3 4 6 + 3 | 3: 1 4 3: 2 3 5 6 + |\| 4: 2 3 + | | 5: 2 5 + 1_|2 6: 3 6 + \| 6 7: 4 5 + |_|_\___u 8: 4 6 + \| \ 9: 5 6 4 __5 \ \ @@ -3284,14 +3309,14 @@ Prism: @example @group Pyramid: - edge 1: nodes 1 -> 2 quadface 1: nodes 1 2 3 4 - v 2 1 -> 4 - | 3 1 -> 5 - | 4 2 -> 3 - 4---|---3 5 2 -> 5 - | \ | /| 6 3 -> 4 - | \ -/-|---u 7 3 -> 5 - | / 5\ | 8 4 -> 5 + edge 1: nodes 1 2 quad. face 1: nodes 1 2 3 4 + v 2 1 4 + | 3 1 5 + | 4 2 3 + 4---|---3 5 2 5 + | \ | /| 6 3 4 + | \ -/-|---u 7 3 5 + | / 5\ | 8 4 5 1/----\-2 \ \