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

- define edges_XXX only once

- draw slightly larger/visible mesh points

- make t1.geo/t2.geo faster
parent bca74bc5
No related branches found
No related tags found
No related merge requests found
...@@ -789,7 +789,7 @@ StringXNumber MeshOptions_Number[] = { ...@@ -789,7 +789,7 @@ StringXNumber MeshOptions_Number[] = {
"Point insertion method for isotropic 2D algorithm (1=center of circumscribed circle, 2=voronoi, 3=cog)" }, "Point insertion method for isotropic 2D algorithm (1=center of circumscribed circle, 2=voronoi, 3=cog)" },
{ F|O, "PointsNumbers" , opt_mesh_points_num , 0. , { F|O, "PointsNumbers" , opt_mesh_points_num , 0. ,
"Display mesh vertex numbers?" }, "Display mesh vertex numbers?" },
{ F|O, "PointSize" , opt_mesh_point_size , 2. , { F|O, "PointSize" , opt_mesh_point_size , 3. ,
"Display size of points (in pixels)" }, "Display size of points (in pixels)" },
{ F|O, "PointType" , opt_mesh_point_type , 0. , { F|O, "PointType" , opt_mesh_point_type , 0. ,
"Display points as solid color dots (0) or 3D spheres (1)" }, "Display points as solid color dots (0) or 3D spheres (1)" },
...@@ -988,7 +988,7 @@ StringXNumber ViewOptions_Number[] = { ...@@ -988,7 +988,7 @@ StringXNumber ViewOptions_Number[] = {
{ F, "OffsetZ" , opt_view_offset2 , 0. , { F, "OffsetZ" , opt_view_offset2 , 0. ,
"Translation of the view along Z-axis (in model coordinates)" }, "Translation of the view along Z-axis (in model coordinates)" },
{ F|O, "PointSize" , opt_view_point_size , 2. , { F|O, "PointSize" , opt_view_point_size , 3. ,
"Display size of points (in pixels)" }, "Display size of points (in pixels)" },
{ F|O, "PointType" , opt_view_point_type , 0. , { F|O, "PointType" , opt_view_point_type , 0. ,
"Display points as solid color dots (0) or 3D spheres (1)" }, "Display points as solid color dots (0) or 3D spheres (1)" },
...@@ -1201,8 +1201,8 @@ StringXColor GeometryOptions_Color[] = { ...@@ -1201,8 +1201,8 @@ StringXColor GeometryOptions_Color[] = {
StringXColor MeshOptions_Color[] = { StringXColor MeshOptions_Color[] = {
{ F|O, "Points" , opt_mesh_color_points , { F|O, "Points" , opt_mesh_color_points ,
PACK_COLOR(0 , 123, 59 , 255), PACK_COLOR(0 , 200, 70 , 255),
PACK_COLOR(0 , 123, 59 , 255), PACK_COLOR(0 , 200, 70 , 255),
PACK_COLOR(0, 0, 0, 255), PACK_COLOR(0, 0, 0, 255),
"Mesh vertex color" }, "Mesh vertex color" },
{ F|O, "PointsSup" , opt_mesh_color_points_deg2 , { F|O, "PointsSup" , opt_mesh_color_points_deg2 ,
......
// $Id: 3D_Coherence.cpp,v 1.32 2004-04-18 17:45:39 geuzaine Exp $ // $Id: 3D_Coherence.cpp,v 1.33 2004-04-19 00:18:07 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
extern Mesh *THEM; extern Mesh *THEM;
extern int FACE_DIMENSION; extern int FACE_DIMENSION;
extern Simplex MyNewBoundary; extern Simplex MyNewBoundary;
extern int edges_tetra[6][2];
extern int edges_non[3];
static Volume *THEVOL; static Volume *THEVOL;
static Edge *TheEdge; static Edge *TheEdge;
...@@ -38,16 +40,6 @@ static List_T *Teti; ...@@ -38,16 +40,6 @@ static List_T *Teti;
List_T *Missing, *MissingF, *MissingS; List_T *Missing, *MissingF, *MissingS;
Tree_T *EdgesTree, *FacesTree, *swaps, *touchedvertex; Tree_T *EdgesTree, *FacesTree, *swaps, *touchedvertex;
int edges_tetra[6][2] = {
{0, 1},
{1, 2},
{2, 0},
{3, 0},
{3, 2},
{3, 1}
};
int edges_non[3] = { 2, 0, 1 };
int memesens(Vertex * v1, Vertex * v2, Vertex * v3, int memesens(Vertex * v1, Vertex * v2, Vertex * v3,
Vertex * c1, Vertex * c2, Vertex * c3) Vertex * c1, Vertex * c2, Vertex * c3)
{ {
......
// $Id: Edge.cpp,v 1.14 2004-04-18 03:20:53 geuzaine Exp $ // $Id: Edge.cpp,v 1.15 2004-04-19 00:18:07 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -25,13 +25,7 @@ ...@@ -25,13 +25,7 @@
#include "Edge.h" #include "Edge.h"
#include "Tools.h" #include "Tools.h"
static int edges_quad[4][2] = { int edges_tetra[6][2] = {
{0, 1},
{1, 2},
{2, 3},
{3, 0}
};
static int edges_tetra[6][2] = {
{0, 1}, {0, 1},
{1, 2}, {1, 2},
{2, 0}, {2, 0},
...@@ -39,7 +33,15 @@ static int edges_tetra[6][2] = { ...@@ -39,7 +33,15 @@ static int edges_tetra[6][2] = {
{3, 2}, {3, 2},
{3, 1} {3, 1}
}; };
static int edges_non[3] = { 2, 0, 1 };
int edges_quad[4][2] = {
{0, 1},
{1, 2},
{2, 3},
{3, 0}
};
int edges_non[3] = { 2, 0, 1 };
int compareedge(const void *a, const void *b) int compareedge(const void *a, const void *b)
{ {
......
// $Id: SecondOrder.cpp,v 1.21 2004-04-18 21:47:29 geuzaine Exp $ // $Id: SecondOrder.cpp,v 1.22 2004-04-19 00:18:07 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
// Element, and dynamic cast to Simplex, Quandrangle, Hexahdra, etc. // Element, and dynamic cast to Simplex, Quandrangle, Hexahdra, etc.
extern Mesh *THEM; extern Mesh *THEM;
extern int edges_tetra[6][2];
extern int edges_quad[4][2];
static Surface *THES = NULL; static Surface *THES = NULL;
static Curve *THEC = NULL; static Curve *THEC = NULL;
...@@ -120,22 +122,6 @@ Vertex *onsurface(Vertex * v1, Vertex * v2) ...@@ -120,22 +122,6 @@ Vertex *onsurface(Vertex * v1, Vertex * v2)
return pv; return pv;
} }
static int edges_tetra[6][2] = {
{0, 1},
{1, 2},
{2, 0},
{3, 0},
{3, 2},
{3, 1}
};
static int edges_quad[4][2] = {
{0, 1},
{1, 2},
{2, 3},
{3, 0}
};
void PutMiddlePoint(void *a, void *b) void PutMiddlePoint(void *a, void *b)
{ {
Edge *ed; Edge *ed;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// The simplest construction of Gmsh's scripting language is the // The simplest construction of Gmsh's scripting language is the
// `affectation'. The following command defines a new variable `lc': // `affectation'. The following command defines a new variable `lc':
lc = 0.007; lc = 0.009;
// This variable can then for example be used in the definition of // This variable can then for example be used in the definition of
// Gmsh's simplest `elementary entity', a `Point'. A Point is defined // Gmsh's simplest `elementary entity', a `Point'. A Point is defined
......
...@@ -53,7 +53,7 @@ Extrude Surface { 11, {0, 0, h} }; ...@@ -53,7 +53,7 @@ Extrude Surface { 11, {0, 0, h} };
// elementary entities. The following command permits to manually // elementary entities. The following command permits to manually
// specify a characteristic length for some of the new points: // specify a characteristic length for some of the new points:
Characteristic Length {tmp[0], 22, 2, 3, 16, 12} = lc * 2; Characteristic Length {tmp[0], 22, 2, 3, 16, 12} = lc * 4;
// Note that, if the transformation tools are handy to create complex // Note that, if the transformation tools are handy to create complex
// geometries, it is also sometimes useful to generate the `flat' // geometries, it is also sometimes useful to generate the `flat'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment