diff --git a/Geo/Geo.h b/Geo/Geo.h index af1d86d7ba32fc634281c1221d383d41eb82c834..2f0f82992900d29aa3d61fbde902f4420feb57d1 100644 --- a/Geo/Geo.h +++ b/Geo/Geo.h @@ -57,6 +57,11 @@ #define MSH_SEGM_LOOP 8 #define MSH_SEGM_PARAMETRIC 888 #define MSH_SEGM_MERGEDSEGS 889 +#define MSH_SEGM_BSPLN 15 +#define MSH_SEGM_URBS 16 +#define MSH_SEGM_NURBS 17 +#define MSH_SEGM_BEZIER 18 +#define MSH_SEGM_DISCRETE 19 #define MSH_SURF_PLAN 9 #define MSH_SURF_REGL 10 @@ -69,12 +74,8 @@ #define MSH_SURF_TRIMMED 1599 #define MSH_SURF_DISCRETE 1799 -#define MSH_VOLUME 14 -#define MSH_SEGM_BSPLN 15 -#define MSH_SEGM_URBS 16 -#define MSH_SEGM_NURBS 17 -#define MSH_SEGM_BEZIER 18 -#define MSH_SEGM_DISCRETE 19 +#define MSH_VOLUME 14 +#define MSH_VOLUME_DISCRETE 114 #define MSH_PHYSICAL_POINT 300 #define MSH_PHYSICAL_LINE 310 diff --git a/Geo/Makefile b/Geo/Makefile index fb82d66997e0dcd73f5e577c74ab6a03fa2cd6d5..a12055545f06e2d05ab9875e1c5a99303f35c2d4 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.61 2005-04-19 16:03:10 remacle Exp $ +# $Id: Makefile,v 1.62 2005-05-15 01:44:25 geuzaine Exp $ # # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle # @@ -65,7 +65,7 @@ CAD.o: CAD.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ ../Mesh/Matrix.h ../Mesh/Interpolation.h ../Mesh/Create.h CAD.h \ - ExtrudeParams.h ../Common/Visibility.h ../Common/Context.h + ../Common/Visibility.h ../Common/Context.h MinMax.o: MinMax.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h \ @@ -76,21 +76,21 @@ ExtrudeParams.o: ExtrudeParams.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h ExtrudeParams.h + ../Mesh/Matrix.h Geo.o: Geo.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../Numeric/Numeric.h Geo.h CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \ ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h ExtrudeParams.h ../Parser/Parser.h ../Common/Context.h + ../Mesh/Matrix.h ../Parser/Parser.h ../Common/Context.h GeoUtils.o: GeoUtils.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h Geo.h CAD.h ../Mesh/Mesh.h \ ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h ExtrudeParams.h ../Numeric/Numeric.h + ../Mesh/Matrix.h ../Numeric/Numeric.h StepGeomDatabase.o: StepGeomDatabase.cpp ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ @@ -98,20 +98,19 @@ StepGeomDatabase.o: StepGeomDatabase.cpp ../Common/Gmsh.h \ ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \ ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h ../Mesh/Nurbs.h CAD.h ExtrudeParams.h \ - StepGeomDatabase.h ../Mesh/Create.h ../Common/Context.h + ../Mesh/Matrix.h ../Mesh/Nurbs.h CAD.h StepGeomDatabase.h \ + ../Mesh/Create.h ../Common/Context.h ExtractContour.o: ExtractContour.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h Geo.h GeoUtils.h ../Mesh/Mesh.h \ ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h CAD.h ExtrudeParams.h ../Numeric/Numeric.h + ../Mesh/Matrix.h CAD.h ../Numeric/Numeric.h Print_Geo.o: Print_Geo.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h Geo.h ../Mesh/Mesh.h \ ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \ ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h CAD.h ExtrudeParams.h ../Numeric/Numeric.h \ - ../Common/Context.h + ../Mesh/Matrix.h CAD.h ../Numeric/Numeric.h ../Common/Context.h diff --git a/Geo/Print_Geo.cpp b/Geo/Print_Geo.cpp index e51ec322733ad1ba3a6887ee4cd88c7e2b9cb4e4..25bf22ba83a86b81628195a51a1c86208546b38e 100644 --- a/Geo/Print_Geo.cpp +++ b/Geo/Print_Geo.cpp @@ -1,4 +1,4 @@ -// $Id: Print_Geo.cpp,v 1.39 2005-05-13 05:09:07 geuzaine Exp $ +// $Id: Print_Geo.cpp,v 1.40 2005-05-15 01:44:25 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -76,7 +76,7 @@ void Print_Curve(void *a, void *b) int i; c = *(Curve **) a; - if(c->Num < 0 || c->Dirty) + if(c->Num < 0 || c->Typ == MSH_SEGM_DISCRETE) return; switch (c->Typ) { @@ -141,7 +141,7 @@ void Print_Surface(void *a, void *b) int i, j; s = *(Surface **) a; - if(s->Dirty) + if(s->Typ == MSH_SURF_DISCRETE) return; int NUMLOOP = s->Num + 1000000; @@ -218,7 +218,7 @@ void Print_Volume(void *a, void *b) int i; vol = *(Volume **) a; - if(vol->Dirty) + if(vol->Typ == MSH_VOLUME_DISCRETE) return; int NUMLOOP = vol->Num + 1000000; diff --git a/Graphics/Geom.cpp b/Graphics/Geom.cpp index cb22c09380bafe95238622f6626f2d15f7b2ca88..184f4959c4857afed4a51cf2a7a82a07776881d1 100644 --- a/Graphics/Geom.cpp +++ b/Graphics/Geom.cpp @@ -1,4 +1,4 @@ -// $Id: Geom.cpp,v 1.82 2005-04-19 16:03:10 remacle Exp $ +// $Id: Geom.cpp,v 1.83 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -115,7 +115,7 @@ void Draw_Curve(void *a, void *b) Curve *c = *(Curve **) a; - if(c->Num < 0 || !(c->Visible & VIS_GEOM) || c->Dirty) + if(c->Num < 0 || !(c->Visible & VIS_GEOM)) return; if(CTX.render_mode == GMSH_SELECT) { @@ -167,16 +167,7 @@ void Draw_Curve(void *a, void *b) } } else if(c->Typ == MSH_SEGM_DISCRETE) { - Simplex *s; - List_T *temp = Tree2List(c->Simplexes); - for(int i = 0; i < List_Nbr(temp); i++) { - List_Read(temp, i, &s); - glBegin(GL_LINES); - glVertex3d(s->V[0]->Pos.X, s->V[0]->Pos.Y, s->V[0]->Pos.Z); - glVertex3d(s->V[1]->Pos.X, s->V[1]->Pos.Y, s->V[1]->Pos.Z); - glEnd(); - } - List_Delete(temp); + // do nothing } else { if(CTX.geom.line_type >= 1) { @@ -610,7 +601,7 @@ void Draw_Surface(void *a, void *b) { Surface *s = *(Surface **) a; - if(!s || !s->Support || !(s->Visible & VIS_GEOM) || s->Dirty) + if(!s || !s->Support || !(s->Visible & VIS_GEOM)) return; if(CTX.render_mode == GMSH_SELECT) { @@ -630,14 +621,18 @@ void Draw_Surface(void *a, void *b) glColor4ubv((GLubyte *) & CTX.color.geom.surface); } - if(s->bds) // always draw the poly reprentation if available + if(s->bds){ Draw_Polygonal_Surface(s); - else if(s->Typ == MSH_SURF_DISCRETE) - Tree_Action(s->Simplexes, Draw_Mesh_Triangle); - else if(s->Typ == MSH_SURF_PLAN) + } + else if(s->Typ == MSH_SURF_DISCRETE){ + // do nothing + } + else if(s->Typ == MSH_SURF_PLAN){ Draw_Plane_Surface(s); - else + } + else{ Draw_NonPlane_Surface(s); + } if(CTX.render_mode == GMSH_SELECT) { glPopName(); diff --git a/Graphics/Makefile b/Graphics/Makefile index 16233b6552e4502ff9864e08863381635b245bf0..230c90e4ebcfa8d44eae12b41cc084799c9a78ae 100644 --- a/Graphics/Makefile +++ b/Graphics/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.69 2005-03-12 07:52:56 geuzaine Exp $ +# $Id: Makefile,v 1.70 2005-05-15 01:44:26 geuzaine Exp $ # # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle # @@ -86,17 +86,17 @@ Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../Mesh/Matrix.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \ ../Geo/MinMax.h gl2ps.h ../Numeric/Numeric.h -Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ - ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ - ../Common/GmshUI.h ../Numeric/Numeric.h ../Geo/Geo.h ../Geo/CAD.h \ - ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \ - ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ - ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ - ../Mesh/Utils.h Draw.h ../Common/Views.h ../Common/ColorTable.h \ - ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Common/Context.h \ - ../Mesh/Interpolation.h ../Plugin/Plugin.h ../Common/Options.h \ - ../Plugin/PluginManager.h gl2ps.h +Geom.o: Geom.cpp ../Mesh/BDS.h ../Common/Gmsh.h ../Common/Message.h \ + ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ + ../DataStr/avl.h ../DataStr/Tools.h ../Common/GmshUI.h \ + ../Numeric/Numeric.h ../Geo/Geo.h ../Geo/CAD.h ../Mesh/Mesh.h \ + ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h \ + ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h \ + ../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h \ + ../Mesh/Matrix.h ../Mesh/Utils.h Draw.h ../Common/Views.h \ + ../Common/ColorTable.h ../Common/GmshMatrix.h ../Common/AdaptiveViews.h \ + ../Common/Context.h ../Mesh/Interpolation.h ../Plugin/Plugin.h \ + ../Common/Options.h ../Plugin/PluginManager.h gl2ps.h Post.o: Post.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \ ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../Common/GmshUI.h ../Numeric/Numeric.h ../Geo/Geo.h ../Mesh/Mesh.h \ diff --git a/Mesh/1D_Mesh.cpp b/Mesh/1D_Mesh.cpp index 0aed7d577833ef84aa314dc00929d57826d854f8..d5167d461fc7fdc98d60e650f8f010286a2146fe 100644 --- a/Mesh/1D_Mesh.cpp +++ b/Mesh/1D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 1D_Mesh.cpp,v 1.44 2005-02-20 07:11:04 geuzaine Exp $ +// $Id: 1D_Mesh.cpp,v 1.45 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -137,11 +137,6 @@ void Maillage_Curve(void *data, void *dummy) if(c->Num < 0) return; - if(c->Dirty) { - Msg(INFO, "Not meshing dirty Curve %d", c->Num); - return; - } - Msg(STATUS3, "Meshing curve %d", c->Num); if(MeshDiscreteCurve(c)){ diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp index f0b13028079456c5e46d79e6fecd4cdd1b1194cd..cb345b2fe1491d2ed07c82e1507b32a7b8f21cd6 100644 --- a/Mesh/2D_Mesh.cpp +++ b/Mesh/2D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Mesh.cpp,v 1.75 2005-04-19 07:23:42 remacle Exp $ +// $Id: 2D_Mesh.cpp,v 1.76 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -852,11 +852,6 @@ void Maillage_Surface(void *data, void *dum) if(!s->Support) return; - if(s->Dirty) { - Msg(INFO, "Not meshing dirty Surface %d", s->Num); - return; - } - THESUPPORT = s->Support; THESURFACE = s; diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp index 6b017bf3fd20317bb89a49bdb6c6334374eab2c9..56e4c4e78c2389aa2797f86f8ee9c6fda5e89389 100644 --- a/Mesh/3D_Mesh.cpp +++ b/Mesh/3D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_Mesh.cpp,v 1.64 2005-01-01 19:35:30 geuzaine Exp $ +// $Id: 3D_Mesh.cpp,v 1.65 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -19,24 +19,20 @@ // // Please report all bugs and problems to <gmsh@geuz.org>. -/* - Isotropic Delaunay 3D - - tant que l'arbre des tetraedres de qualites inacceptables - n'est pas vide { - prendre le plus mauvais tetraedre; - creer un nouveau point; - eliminer les tetraedres dont le cercle circonscrit contient le point; - reconstruire le volume convexe; - } - -*/ +// Isotropic Delaunay 3D: +// while the tree of bad quality tets is not empty { +// take the worst tet +// create a new point +// rempve the test whose circumscribed sphere contains the point +// reconstruct the convex volume +// } #include <vector> #include <algorithm> #include <time.h> #include "Gmsh.h" #include "Numeric.h" +#include "Geo.h" #include "Mesh.h" #include "3D_Mesh.h" #include "Create.h" @@ -202,24 +198,16 @@ int Pt_In_Volume(double X, double Y, double Z, Mesh * m, inline int Pt_In_Circum(Simplex * s, Vertex * v) { - double d1, d2, eps; - - /* Determine si un point est dans le cercle circonscrit a un simplexe */ - - d1 = s->Radius; - d2 = sqrt(DSQR(v->Pos.X - s->Center.X) + - DSQR(v->Pos.Y - s->Center.Y) + DSQR(v->Pos.Z - s->Center.Z)); - - eps = fabs(d1 - d2) / (d1 + d2); - - if(eps < 1.e-12) { - return (0); // return 1 ? 0 ? - } - - if(d2 < d1) - return (1); - - return (0); + // Determines of a point is inside the simplexe's circumscribed sphere + double d1 = s->Radius; + double d2 = sqrt(DSQR(v->Pos.X - s->Center.X) + + DSQR(v->Pos.Y - s->Center.Y) + + DSQR(v->Pos.Z - s->Center.Z)); + double eps = fabs(d1 - d2) / (d1 + d2); + + if(eps < 1.e-12) return 0; // return 1? 0? + if(d2 < d1) return 1; + return 0; } struct SimplexInteriorCheck { @@ -252,9 +240,7 @@ struct SimplexInBox { } }; -/* - Recursive search; - */ +// Recursive search Simplex *SearchPointByNeighbor(Vertex * v, Simplex * s, Tree_T * visited, int depth) @@ -307,7 +293,7 @@ void LiS(void *a, void *b) for(j = 0; j < N; j++) { SXF.F = S->F[j]; if((pSXF = (SxF *) Tree_PQuery(SimXFac, &SXF))) { - /* Creation du lien */ + // Create link S->S[j] = pSXF->S; pSXF->S->S[pSXF->NumFaceSimpl] = S; } @@ -335,7 +321,7 @@ void RzS(void *a, void *b) } } -/* Cree les liens entre les simplexes, c.a.d recherche les voisins */ +// create the links between the simplices, i.e., search for neighbors void Link_Simplexes(List_T * Sim, Tree_T * Tim) { @@ -420,8 +406,6 @@ void Box_6_Tetraedron(List_T * P, Mesh * m) Yc = YM - Ym; Zc = ZM - Zm; - /* initialisation de la grille */ - m->Grid.init = 0; m->Grid.min.X = Xm - LOIN * FACT * Xc; m->Grid.min.Y = Ym - LOIN * FACT * Yc; @@ -432,11 +416,9 @@ void Box_6_Tetraedron(List_T * P, Mesh * m) m->Grid.Nx = m->Grid.Ny = m->Grid.Nz = 20; - /* Longueur Caracteristique */ - LC3D = sqrt(Xc * Xc + Yc * Yc + Zc * Zc); - /* Points de la boite de 1 a 8 + /* 8 box points Z 8____________7 | /| /| @@ -475,7 +457,7 @@ void Box_6_Tetraedron(List_T * P, Mesh * m) Tree_Replace(m->Vertices, &pv); } - /* 6 Tetraedres forment le maillage de la boite */ + // 6-tet mesh of the box for(i = 0; i < 6; i++) { S = Create_Simplex(&V[tet[i][0] - 1], &V[tet[i][1] - 1], @@ -561,15 +543,12 @@ void NewSimplexes(Mesh * m, List_T * Sim, List_T * news) } } - /* Les faces non communes sont obligatoirement a la frontiere ... - -> Nouveaux simplexes */ - + // The non-common faces are on the boundary -> create new simplices Tree_Action(SimXFac, CrSi); Tree_Delete(SimXFac); } - /* Methode recursive : Rempli Tsd les simplexes detruits Invariant : Le simplexe est a eliminer Le simplexe n'est pas encore considere */ @@ -633,7 +612,7 @@ bool Bowyer_Watson(Mesh * m, Vertex * v, Simplex * S, int force) Tree_Action(Tsd, TStoLS); NewSimplexes(m, Simplexes_Destroyed, Simplexes_New); - /* calcul des volumes des simplexes crees */ + // compute volume if(Alerte_Point_Scabreux || !CTX.mesh.speed_max) { volume = 0.0; @@ -652,7 +631,7 @@ bool Bowyer_Watson(Mesh * m, Vertex * v, Simplex * S, int force) volumenew = 1.0; } - /* critere du volume */ + // volume criterion if((fabs(volumeold - volumenew) / (volumeold + volumenew)) > 1.e-8) { if(Tree_Suppress(m->Simplexes, &S)) { @@ -691,7 +670,7 @@ bool Bowyer_Watson(Mesh * m, Vertex * v, Simplex * S, int force) Tree_Add(m->Simplexes, &theNewS); } - /* Suppression des simplexes elimines */ + // remove deleted tets for(i = 0; i < List_Nbr(Simplexes_Destroyed); i++) { List_Read(Simplexes_Destroyed, i, &s); @@ -700,7 +679,7 @@ bool Bowyer_Watson(Mesh * m, Vertex * v, Simplex * S, int force) Free_Simplex(&s, 0); } - /* Creation des liens entre nouveaux simplexes */ + // create links between new tets Tree_Action(Sim_Sur_Le_Bord, TAtoLA); Link_Simplexes(Simplexes_New, m->Simplexes); @@ -888,12 +867,9 @@ void Maillage_Volume(void *data, void *dum) pv = (Volume **) data; v = *pv; - if(v->Dirty) { - Msg(INFO, "Not meshing dirty Volume %d", v->Num); - return; + if(v->Typ == MSH_VOLUME_DISCRETE) { } - - if(Extrude_Mesh(v)) { + else if(Extrude_Mesh(v)) { } else if(MeshTransfiniteVolume(v)) { } @@ -927,7 +903,7 @@ void Maillage_Volume(void *data, void *dum) if(!N) return; - /* Creation d'un maillage initial respectant la frontiere */ + // Create initial mesh respecting the boundary Msg(STATUS2, "Mesh 3D... (initial)"); @@ -947,7 +923,7 @@ void Maillage_Volume(void *data, void *dum) return; } - /* Suppression des noeuds de num < 0 */ + // remove nodes with nums < 0 Suppress = List_Create(10, 10, sizeof(Vertex *)); Tree_Action(v->Vertices, suppress_vertex); @@ -956,8 +932,8 @@ void Maillage_Volume(void *data, void *dum) } List_Delete(Suppress); - /* Suppression des elements dont le num de vol == 0 (cad qui - n'appartiennent a auncun volume defini) */ + // remove elements whose volume num==0 (i.e., that don't belong to + // any volume) Suppress = List_Create(10, 10, sizeof(Simplex *)); Tree_Action(v->Simplexes, suppress_simplex); @@ -970,7 +946,7 @@ void Maillage_Volume(void *data, void *dum) if(Tree_Nbr(LOCAL->Simplexes) == 0) return; - /* Si il reste quelque chose a mailler en volume : */ + // If there is something left to mesh: Msg(STATUS2, "Mesh 3D... (final)"); diff --git a/Mesh/3D_Mesh_Netgen.cpp b/Mesh/3D_Mesh_Netgen.cpp index f57ebf483cb80b571c1fd9951cf872fa87858b94..156d3534eac6524a9d805353aacaa0b92475459f 100644 --- a/Mesh/3D_Mesh_Netgen.cpp +++ b/Mesh/3D_Mesh_Netgen.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_Mesh_Netgen.cpp,v 1.15 2005-01-01 19:35:30 geuzaine Exp $ +// $Id: 3D_Mesh_Netgen.cpp,v 1.16 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -24,6 +24,7 @@ // #include "Gmsh.h" +#include "Geo.h" #include "Mesh.h" #include "Create.h" #include "Numeric.h" @@ -293,10 +294,10 @@ int Mesh_Netgen(Volume * v) void Optimize_Netgen(Volume * v) { - // abort of we don't have real volumes (volume is "dirty", or has no + // abort of we don't have real volumes (volume has no CAD, or has no // surface loop w/ oriented surfaces) or if there are no simplices // to optimize - if(v->Dirty || Extrude_Mesh(v) || !Tree_Nbr(v->Simplexes)) + if(v->Typ == MSH_VOLUME_DISCRETE || Extrude_Mesh(v) || !Tree_Nbr(v->Simplexes)) return; Msg(STATUS3, "Optimizing volume %d", v->Num); diff --git a/Mesh/Create.cpp b/Mesh/Create.cpp index 02768d66d2b6443c00d61683cb4fbdfa7c12e262..e30bce3e7f0b0c51e6b85958ef3ad4b9071d53e7 100644 --- a/Mesh/Create.cpp +++ b/Mesh/Create.cpp @@ -1,4 +1,4 @@ -// $Id: Create.cpp,v 1.72 2005-05-13 05:09:08 geuzaine Exp $ +// $Id: Create.cpp,v 1.73 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -529,7 +529,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T * Liste, pC = (Curve *) Malloc(sizeof(Curve)); pC->bds = 0; - pC->Dirty = 0; pC->Color.type = 0; pC->Visible = VIS_GEOM | VIS_MESH; pC->cp = NULL; @@ -592,7 +591,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T * Liste, List_Add(pC->Control_Points, &v); else{ Msg(GERROR, "Unknown control point %d in Curve %d", iPnt, pC->Num); - pC->Dirty = 1; } } } @@ -614,7 +612,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T * Liste, } else { Msg(GERROR, "Unknown control point %d in Curve %d", p1, pC->Num); - pC->Dirty = 1; } if((v = FindPoint(p2, THEM))) { Msg(INFO, "Curve %d first control point %d ", pC->Num, v->Num); @@ -622,7 +619,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T * Liste, } else { Msg(GERROR, "Unknown control point %d in Curve %d", p2, pC->Num); - pC->Dirty = 1; } } @@ -654,7 +650,6 @@ Surface *Create_Surface(int Num, int Typ) int i; pS = (Surface *) Malloc(sizeof(Surface)); - pS->Dirty = 0; pS->bds = 0; pS->Color.type = 0; pS->Visible = VIS_GEOM | VIS_MESH; @@ -723,7 +718,6 @@ Volume *Create_Volume(int Num, int Typ) int i; pV = (Volume *) Malloc(sizeof(Volume)); - pV->Dirty = 0; pV->Color.type = 0; pV->Visible = VIS_GEOM | VIS_MESH; pV->Num = Num; diff --git a/Mesh/Makefile b/Mesh/Makefile index d645abbd80be81664337d03fce7fa09347d39932..855ea0e419c369250982df7c99c044ed58b79910 100644 --- a/Mesh/Makefile +++ b/Mesh/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.84 2005-04-19 16:03:10 remacle Exp $ +# $Id: Makefile,v 1.85 2005-05-15 01:44:26 geuzaine Exp $ # # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle # @@ -114,8 +114,8 @@ depend: ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Utils.h Vertex.h Create.h 2D_Mesh.h ../Common/Context.h Interpolation.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Utils.h \ + Create.h 2D_Mesh.h ../Common/Context.h Interpolation.h 2D_Transfinite.o: 2D_Transfinite.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Geo/Geo.h Mesh.h Vertex.h \ @@ -128,7 +128,7 @@ depend: ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h 2D_BGMesh.o: 2D_BGMesh.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h Mesh.h \ @@ -196,15 +196,15 @@ depend: ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ - Interpolation.h Vertex.h Mesh.h 2D_Mesh.h Create.h ../Common/Context.h + Interpolation.h 2D_Mesh.h Create.h ../Common/Context.h 2D_Mesh_Aniso.o: 2D_Mesh_Aniso.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Interpolation.h Vertex.h Create.h ../Common/Context.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + Interpolation.h Create.h ../Common/Context.h 2D_Mesh_Triangle.o: 2D_Mesh_Triangle.cpp ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h Mesh.h Vertex.h \ @@ -213,10 +213,11 @@ depend: Metric.h Matrix.h ../Numeric/Numeric.h ../Common/Context.h 3D_Mesh.o: 3D_Mesh.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h Mesh.h \ - Vertex.h Element.h Simplex.h Face.h Edge.h ../Geo/ExtrudeParams.h \ - DiscreteSurface.h ../Common/VertexArray.h ../Common/SmoothNormals.h \ - Metric.h Matrix.h 3D_Mesh.h Create.h ../Common/Context.h + ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ + Mesh.h Vertex.h Element.h Simplex.h Face.h Edge.h \ + ../Geo/ExtrudeParams.h DiscreteSurface.h ../Common/VertexArray.h \ + ../Common/SmoothNormals.h Metric.h Matrix.h 3D_Mesh.h Create.h \ + ../Common/Context.h 3D_Transfinite.o: 3D_Transfinite.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h Mesh.h Vertex.h Element.h Simplex.h \ @@ -237,16 +238,16 @@ depend: ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - ../Common/Context.h Create.h Vertex.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + ../Common/Context.h Create.h 3D_Extrude_Old.o: 3D_Extrude_Old.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - ../Common/Context.h Create.h Vertex.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + ../Common/Context.h Create.h 3D_Coherence.o: 3D_Coherence.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ @@ -267,10 +268,10 @@ depend: Metric.h Matrix.h 3D_Mesh_Netgen.o: 3D_Mesh_Netgen.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../DataStr/Tools.h Mesh.h Vertex.h Element.h Simplex.h \ - Face.h Edge.h ../Geo/ExtrudeParams.h DiscreteSurface.h \ - ../Common/VertexArray.h ../Common/SmoothNormals.h Metric.h Matrix.h \ - Create.h ../Numeric/Numeric.h ../Common/Context.h + ../DataStr/avl.h ../DataStr/Tools.h ../Geo/Geo.h Mesh.h Vertex.h \ + Element.h Simplex.h Face.h Edge.h ../Geo/ExtrudeParams.h \ + DiscreteSurface.h ../Common/VertexArray.h ../Common/SmoothNormals.h \ + Metric.h Matrix.h Create.h ../Numeric/Numeric.h ../Common/Context.h BDS.o: BDS.cpp BDS.h ../Numeric/Numeric.h MeshQuality.o: MeshQuality.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ @@ -284,9 +285,9 @@ Create.o: Create.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Utils.h Vertex.h ../Common/Context.h Create.h -Generator.o: Generator.cpp ../Common/Gmsh.h ../Common/Message.h \ + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Utils.h \ + ../Common/Context.h Create.h +Generator.o: Generator.cpp BDS.h ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h Mesh.h \ Vertex.h Element.h Simplex.h Face.h Edge.h ../Geo/ExtrudeParams.h \ @@ -300,24 +301,23 @@ Print_Mesh.o: Print_Mesh.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Create.h Vertex.h ../Common/Context.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Create.h \ + ../Common/Context.h Read_Mesh.o: Read_Mesh.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Geo/Geo.h ../Geo/CAD.h \ ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \ ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - 3D_Mesh.h Create.h Vertex.h ../Geo/MinMax.h ../Common/Context.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h 3D_Mesh.h \ + Create.h ../Geo/MinMax.h ../Common/Context.h DiscreteSurface.o: DiscreteSurface.cpp ../Common/Gmsh.h \ ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ ../Numeric/Numeric.h Mesh.h Vertex.h Element.h Simplex.h Face.h Edge.h \ ../Geo/ExtrudeParams.h DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h Metric.h Matrix.h ../Geo/CAD.h ../Mesh/Mesh.h \ - ../Mesh/Vertex.h ../Geo/Geo.h Create.h Interpolation.h \ - ../Common/Context.h BDS.h + ../Common/SmoothNormals.h Metric.h Matrix.h ../Geo/CAD.h ../Geo/Geo.h \ + Create.h Interpolation.h ../Common/Context.h BDS.h SwapEdge.o: SwapEdge.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h Mesh.h \ @@ -330,30 +330,29 @@ Utils.o: Utils.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Interpolation.h Vertex.h ../Common/Context.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + Interpolation.h ../Common/Context.h Metric.o: Metric.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ ../Geo/CAD.h ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h \ ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h Mesh.h \ - Matrix.h Interpolation.h Vertex.h + ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + Interpolation.h Nurbs.o: Nurbs.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h Nurbs.h Vertex.h Mesh.h Element.h \ Simplex.h Face.h Edge.h ../Geo/ExtrudeParams.h DiscreteSurface.h \ ../Common/VertexArray.h ../Common/SmoothNormals.h Metric.h Matrix.h \ - ../Geo/Geo.h ../Geo/GeoUtils.h ../Mesh/Mesh.h Create.h ../Geo/CAD.h \ - ../Mesh/Vertex.h + ../Geo/Geo.h ../Geo/GeoUtils.h Create.h ../Geo/CAD.h Interpolation.o: Interpolation.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h ../Geo/Geo.h \ Nurbs.h Vertex.h Mesh.h Element.h Simplex.h Face.h Edge.h \ ../Geo/ExtrudeParams.h DiscreteSurface.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h Metric.h Matrix.h ../Geo/CAD.h ../Mesh/Mesh.h \ - ../Mesh/Vertex.h Utils.h Interpolation.h + ../Common/SmoothNormals.h Metric.h Matrix.h ../Geo/CAD.h Utils.h \ + Interpolation.h SecondOrder.o: SecondOrder.cpp ../Common/Gmsh.h ../Common/Message.h \ ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ ../DataStr/avl.h ../DataStr/Tools.h ../Geo/Geo.h Mesh.h Vertex.h \ diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h index eb8c3292f2b3924a4f255753b4b7bb18be3bddb1..54cbe81d3e313cc6fff0737f00cb8fa28e8ab2f2 100644 --- a/Mesh/Mesh.h +++ b/Mesh/Mesh.h @@ -252,7 +252,6 @@ struct _Surf{ Grid_T Grid; // fast search grid ExtrudeParams *Extrude; BDS_Mesh *bds; - int Dirty; // flag to prevent any meshing DrawingColor Color; VertexArray *TriVertexArray; VertexArray *QuadVertexArray; @@ -310,7 +309,6 @@ typedef struct { Tree_T *Hexahedra; Tree_T *Prisms; Tree_T *Pyramids; - int Dirty; //flag to prevent any meshing DrawingColor Color; VertexArray *TriVertexArray; VertexArray *QuadVertexArray; @@ -374,7 +372,6 @@ typedef struct{ int degre; CircParam Circle; char functu[256], functv[256], functw[256]; - int Dirty; // flag to prevent any meshing DrawingColor Color; BDS_Mesh *bds; }Curve; diff --git a/Mesh/Read_Mesh.cpp b/Mesh/Read_Mesh.cpp index a484b624127c8e6c77ce5b0f102cee2f06d764a9..2a07ac1b8f2539052bde4c6c1b3881304697b57e 100644 --- a/Mesh/Read_Mesh.cpp +++ b/Mesh/Read_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Read_Mesh.cpp,v 1.86 2005-03-15 15:36:06 geuzaine Exp $ +// $Id: Read_Mesh.cpp,v 1.87 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -65,16 +65,14 @@ void addPhysicalGroup(Mesh * M, int Type, int Physical, int Elementary) } } -/* Note: the "Dirty" flag only has an influence if one doesn't load - the geometry along with the mesh (since we only add "dirty" - geometrical entities if they don't already exist). */ +// If a "normal" elementary entity does not exist, we create a +// "discrete" entity, i.e., an entity entirely defined by its mesh Curve *addElementaryCurve(Mesh * M, int Num) { Curve *c; if(!(c = FindCurve(Num, M))) { - c = Create_Curve(Num, MSH_SEGM_LINE, 0, NULL, NULL, -1, -1, 0., 1.); - c->Dirty = 1; + c = Create_Curve(Num, MSH_SEGM_DISCRETE, 0, NULL, NULL, -1, -1, 0., 1.); Tree_Add(M->Curves, &c); } return c; @@ -84,8 +82,7 @@ Surface *addElementarySurface(Mesh * M, int Num) { Surface *s; if(!(s = FindSurface(Num, M))) { - s = Create_Surface(Num, MSH_SURF_PLAN); - s->Dirty = 1; + s = Create_Surface(Num, MSH_SURF_DISCRETE); Tree_Add(M->Surfaces, &s); } return s; @@ -95,8 +92,7 @@ Volume *addElementaryVolume(Mesh * M, int Num) { Volume *v; if(!(v = FindVolume(Num, M))) { - v = Create_Volume(Num, MSH_VOLUME); - v->Dirty = 1; + v = Create_Volume(Num, MSH_VOLUME_DISCRETE); Tree_Add(M->Volumes, &v); } return v; @@ -560,7 +556,6 @@ void Read_Mesh_VTK(Mesh * m, FILE *fp) sscanf(line, "%s %d %s", dumline1, &NbVertices, dumline2); Surface *surf = Create_Surface(1, MSH_SURF_DISCRETE); - surf->Dirty = 1; Tree_Add(m->Surfaces, &surf); for(i = 0; i < NbVertices; i++) { fscanf(fp, "%le %le %le", &x, &y, &z); @@ -592,7 +587,6 @@ void Read_Mesh_VTK(Mesh * m, FILE *fp) } if(!(surf = FindSurface(1, m))) { surf = Create_Surface(1, MSH_SURF_DISCRETE); - surf->Dirty = 1; Tree_Add(m->Surfaces, &surf); } Tree_Add(surf->Simplexes, &s); @@ -601,8 +595,7 @@ void Read_Mesh_VTK(Mesh * m, FILE *fp) if(NbFaces) m->status = 2; - Volume *vol = Create_Volume(1, MSH_VOLUME); - vol->Dirty = 1; + Volume *vol = Create_Volume(1, MSH_VOLUME_DISCRETE); vol->Surfaces = List_Create(1, 1, sizeof(Surface *)); List_Add(vol->Surfaces, &surf); Tree_Add(m->Volumes, &vol); @@ -699,7 +692,6 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) Curve *c; if(!(c = FindCurve(GEntityId, m))) { c = Create_Curve(GEntityId, MSH_SEGM_DISCRETE, 1, NULL, NULL, -1, -1, 0, 1); - c->Dirty = 1; Tree_Add(m->Curves, &c); } s->iEnt = GEntityId; @@ -711,8 +703,7 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) AllFaces = List_Create(NbFaces, 1, sizeof(Simplex *)); - Volume *vol = Create_Volume(1, MSH_VOLUME); - vol->Dirty = 1; + Volume *vol = Create_Volume(1, MSH_VOLUME_DISCRETE); vol->Surfaces = List_Create(1, 1, sizeof(Surface *)); Tree_Add(m->Volumes, &vol); @@ -800,7 +791,6 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) case ENTITY_FACE: if(!(surf = FindSurface(GEntityId + 10000, m))) { surf = Create_Surface(GEntityId + 10000, MSH_SURF_DISCRETE); - surf->Dirty = 1; if(!NbRegions) List_Add(vol->Surfaces, &surf); Tree_Add(m->Surfaces, &surf); @@ -843,8 +833,7 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) Simplex *s = Create_Simplex(v1, v2, v3, v4); if(!(vol = FindVolume(GEntityId, m))) { - vol = Create_Volume(GEntityId, MSH_VOLUME); - vol->Dirty = 1; + vol = Create_Volume(GEntityId, MSH_VOLUME_DISCRETE); Tree_Add(m->Volumes, &vol); } s->iEnt = GEntityId; diff --git a/Mesh/SecondOrder.cpp b/Mesh/SecondOrder.cpp index de25d13a6b430688f8c3f4a6b95409fe51382fa1..1461fa2ceddef3a6dea96739df8984a9cadb0586 100644 --- a/Mesh/SecondOrder.cpp +++ b/Mesh/SecondOrder.cpp @@ -1,4 +1,4 @@ -// $Id: SecondOrder.cpp,v 1.32 2005-03-26 04:09:16 geuzaine Exp $ +// $Id: SecondOrder.cpp,v 1.33 2005-05-15 01:44:26 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -423,14 +423,12 @@ void ResetDegre2_Pyramid(void *a, void *b) void ResetDegre2_Curve(void *a, void *b) { Curve *c = *(Curve**)a; - if(c->Dirty) return; Tree_Action(c->Simplexes, ResetDegre2_Simplex); } void ResetDegre2_Surface(void *a, void *b) { Surface *s = *(Surface**)a; - if(s->Dirty) return; Tree_Action(s->Simplexes, ResetDegre2_Simplex); Tree_Action(s->Quadrangles, ResetDegre2_Quadrangle); } @@ -438,7 +436,6 @@ void ResetDegre2_Surface(void *a, void *b) void ResetDegre2_Volume(void *a, void *b) { Volume *v = *(Volume**)a; - if(v->Dirty) return; Tree_Action(v->Simplexes, ResetDegre2_Simplex); Tree_Action(v->Hexahedra, ResetDegre2_Hexahedron); Tree_Action(v->Prisms, ResetDegre2_Prism); @@ -476,7 +473,7 @@ void Degre1() void Degre2_Curve(void *a, void *b) { Curve *c = *(Curve**)a; - if(c->Dirty || c->Num < 0) return; + if(c->Num < 0) return; Msg(STATUS3, "Second order curve %d", c->Num); @@ -489,7 +486,6 @@ void Degre2_Curve(void *a, void *b) void Degre2_Surface(void *a, void *b) { Surface *s = *(Surface**)a; - if(s->Dirty) return; Msg(STATUS3, "Second order surface %d", s->Num); @@ -506,7 +502,6 @@ void Degre2_Surface(void *a, void *b) void Degre2_Volume(void *a, void *b) { Volume *v = *(Volume**)a; - if(v->Dirty) return; Msg(STATUS3, "Second order volume %d", v->Num); diff --git a/Parser/Makefile b/Parser/Makefile index 6d2c39d922581b3def216ce20f46520ec2635801..f0c5e9d0041eeb4fe53281eb78685fc0670777f1 100644 --- a/Parser/Makefile +++ b/Parser/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.71 2005-02-02 18:48:00 geuzaine Exp $ +# $Id: Makefile,v 1.72 2005-05-15 01:44:26 geuzaine Exp $ # # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle # @@ -96,17 +96,18 @@ Gmsh.yy.o: Gmsh.yy.cpp ../Common/Gmsh.h ../Common/Message.h \ ../Mesh/DiscreteSurface.h ../Common/VertexArray.h \ ../Common/SmoothNormals.h ../Mesh/Metric.h ../Mesh/Matrix.h \ Gmsh.tab.hpp -OpenFile.o: OpenFile.cpp ../Common/Gmsh.h ../Common/Message.h \ - ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \ - ../DataStr/avl.h ../DataStr/Tools.h ../Numeric/Numeric.h \ - ../Common/Context.h Parser.h OpenFile.h ../Common/CommandLine.h \ - ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \ - ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \ - ../Common/SmoothNormals.h ../Common/GmshMatrix.h \ - ../Common/AdaptiveViews.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \ - ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \ - ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h ../Mesh/Metric.h \ - ../Mesh/Matrix.h ../Geo/MinMax.h ../Common/Visibility.h \ - ../Graphics/ReadImg.h ../Common/GmshUI.h ../Graphics/Draw.h \ - ../Fltk/GUI.h ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h +OpenFile.o: OpenFile.cpp ../Mesh/BDS.h ../Common/Gmsh.h \ + ../Common/Message.h ../DataStr/Malloc.h ../DataStr/List.h \ + ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \ + ../Numeric/Numeric.h ../Common/Context.h Parser.h OpenFile.h \ + ../Common/CommandLine.h ../Plugin/PluginManager.h ../Plugin/Plugin.h \ + ../Common/Options.h ../Common/Views.h ../Common/ColorTable.h \ + ../Common/VertexArray.h ../Common/SmoothNormals.h \ + ../Common/GmshMatrix.h ../Common/AdaptiveViews.h ../Geo/Geo.h \ + ../Mesh/Mesh.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Simplex.h \ + ../Mesh/Face.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h \ + ../Mesh/DiscreteSurface.h ../Mesh/Metric.h ../Mesh/Matrix.h \ + ../Geo/MinMax.h ../Common/Visibility.h ../Graphics/ReadImg.h \ + ../Common/GmshUI.h ../Graphics/Draw.h ../Fltk/GUI.h \ + ../Fltk/Opengl_Window.h ../Fltk/Colorbar_Window.h FunctionManager.o: FunctionManager.cpp FunctionManager.h