diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp index 7fe5c74d10b1e68b6fe647f4cd9f627ff35b860b..b6ce69a20a47f803e3fa20383408fa8b156cae52 100644 --- a/Mesh/3D_Mesh.cpp +++ b/Mesh/3D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_Mesh.cpp,v 1.48 2003-03-01 22:36:41 geuzaine Exp $ +// $Id: 3D_Mesh.cpp,v 1.49 2003-03-02 16:10:28 geuzaine Exp $ // // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle // @@ -72,12 +72,11 @@ inline void cgsmpl(Simplex * s, double &x, double &y, double &z) s->V[1]->Pos.Z + s->V[2]->Pos.Z + s->V[3]->Pos.Z); } -struct closestSimplex -{ +struct closestSimplex { double X, Y, Z; - closestSimplex(double x, double y, double z) - : X(x), Y(y), Z(z) + closestSimplex(double x, double y, double z) : X(x), Y(y), Z(z) { + ; } bool operator () (Simplex * a, Simplex * b) { @@ -92,8 +91,6 @@ struct closestSimplex } }; - - void DebugSimplexe(Simplex * s) { int i; @@ -227,8 +224,7 @@ inline int Pt_In_Circum(Simplex * s, Vertex * v) return (0); } -struct SimplexInteriorCheck -{ +struct SimplexInteriorCheck { bool operator() (Simplex * s, double x[3], double u[3]) { Vertex v(x[0], x[1], x[2]); @@ -236,11 +232,11 @@ struct SimplexInteriorCheck } }; -struct SimplexInBox -{ +struct SimplexInBox { double sizeBox; - SimplexInBox(double sb):sizeBox(sb) + SimplexInBox(double sb) : sizeBox(sb) { + ; } void operator() (Simplex * s, double min[3], double max[3]) { @@ -372,21 +368,23 @@ void Box_6_Tetraedron(List_T * P, Mesh * m) #define LOIN 0.2 int i, j; - static int pts[8][3] = { {0, 0, 0}, - {1, 0, 0}, - {1, 1, 0}, - {0, 1, 0}, - {0, 0, 1}, - {1, 0, 1}, - {1, 1, 1}, - {0, 1, 1} + static int pts[8][3] = { + {0, 0, 0}, + {1, 0, 0}, + {1, 1, 0}, + {0, 1, 0}, + {0, 0, 1}, + {1, 0, 1}, + {1, 1, 1}, + {0, 1, 1} }; - static int tet[6][4] = { {1, 5, 2, 4}, - {2, 5, 6, 4}, - {4, 5, 6, 8}, - {6, 4, 8, 7}, - {6, 4, 7, 3}, - {2, 3, 4, 6} + static int tet[6][4] = { + {1, 5, 2, 4}, + {2, 5, 6, 4}, + {4, 5, 6, 8}, + {6, 4, 8, 7}, + {6, 4, 7, 3}, + {2, 3, 4, 6} }; double Xm = 0., Ym = 0., Zm = 0., XM = 0., YM = 0., ZM = 0., Xc, Yc, Zc; Simplex *S, *ps; @@ -446,7 +444,7 @@ void Box_6_Tetraedron(List_T * P, Mesh * m) | /| /| | / | / | | / | / | - 5|/___|________/6 | + 5|/___|________/6 | | 4|________|___|3 | / | / | / Y | / @@ -677,20 +675,21 @@ bool Bowyer_Watson(Mesh * m, Vertex * v, Simplex * S, int force) for(i = 0; i < List_Nbr(Simplexes_New); i++) { Simplex *theNewS; List_Read(Simplexes_New, i, &theNewS); - /* if(force) - { - double xc = theNewS->Center.X; - double yc = theNewS->Center.Y; - double zc = theNewS->Center.Z; - double rd = theNewS->Radius; - cgsmpl (theNewS,x,y,z); - THEM->Metric->setMetric (x, y, z); - THEM->Metric->setSimplexQuality (theNewS); - theNewS->Center.X = xc; - theNewS->Center.Y = yc; - theNewS->Center.Z = zc; - theNewS->Radius = rd; - } */ +#if 0 + if(force) { + double xc = theNewS->Center.X; + double yc = theNewS->Center.Y; + double zc = theNewS->Center.Z; + double rd = theNewS->Radius; + cgsmpl (theNewS,x,y,z); + THEM->Metric->setMetric (x, y, z); + THEM->Metric->setSimplexQuality (theNewS); + theNewS->Center.X = xc; + theNewS->Center.Y = yc; + theNewS->Center.Z = zc; + theNewS->Radius = rd; + } +#endif Tree_Add(m->Simplexes, &theNewS); } @@ -1035,18 +1034,18 @@ void Maillage_Volume(void *data, void *dum) SwapEdges3D(THEM, v, CTX.mesh.quality, true); } +#if 0 // this is wrong if(CTX.mesh.nb_smoothing) { - /* - Msg(STATUS3, "Laplacian smoothing"); - tnxe = Tree_Create (sizeof (NXE), compareNXE); - create_NXE (v->Vertices, v->Simplexes, tnxe); - for (int i = 0; i < CTX.mesh.nb_smoothing; i++) - Tree_Action (tnxe, ActionLiss); - delete_NXE (tnxe); - Msg(STATUS3, "Swapping edges (last pass)"); - SwapEdges3D (THEM, v, 0.5, true); - */ + Msg(STATUS3, "Laplacian smoothing"); + tnxe = Tree_Create (sizeof (NXE), compareNXE); + create_NXE (v->Vertices, v->Simplexes, tnxe); + for (int i = 0; i < CTX.mesh.nb_smoothing; i++) + Tree_Action (tnxe, ActionLiss); + delete_NXE (tnxe); + Msg(STATUS3, "Swapping edges (last pass)"); + SwapEdges3D (THEM, v, 0.5, true); } +#endif if(CTX.mesh.degree == 2) Degre2(THEM->Vertices, THEM->VertexEdges, v->Simplexes, NULL, NULL); diff --git a/Mesh/3D_SMesh.cpp b/Mesh/3D_SMesh.cpp index b557eaadab4a56dddba6299619be1a02f995d9be..f2ba2b2dc0b697e7f9b5bed9c7de454b60d8beb5 100644 --- a/Mesh/3D_SMesh.cpp +++ b/Mesh/3D_SMesh.cpp @@ -1,4 +1,4 @@ -// $Id: 3D_SMesh.cpp,v 1.16 2003-03-01 22:36:41 geuzaine Exp $ +// $Id: 3D_SMesh.cpp,v 1.17 2003-03-02 16:10:28 geuzaine Exp $ // // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle // @@ -179,12 +179,21 @@ int MeshTransfiniteVolume(Volume * vol) Simplex *simp; int NbFacesFound = 0; - static int tab1hex[] = - { 0, 1, 5, 4, 1, 2, 6, 5, 3, 2, 6, 7, 0, 3, 7, 4, 0, 1, 2, 3, 4, 5, 6, -7 }; - static int tab2[] = { 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, - 3, 2, 1, 0, 2, 1, 0, 3, 1, 0, 3, 2, 0, 3, 2, 1 - }; + static int tab1hex[] = { 0, 1, 5, 4, + 1, 2, 6, 5, + 3, 2, 6, 7, + 0, 3, 7, 4, + 0, 1, 2, 3, + 4, 5, 6, 7 }; + + static int tab2[] = { 0, 1, 2, 3, + 1, 2, 3, 0, + 2, 3, 0, 1, + 3, 0, 1, 2, + 3, 2, 1, 0, + 2, 1, 0, 3, + 1, 0, 3, 2, + 0, 3, 2, 1 }; if(vol->Method != TRANSFINI) return (0); @@ -331,16 +340,12 @@ int MeshTransfiniteVolume(Volume * vol) for(j = 0; j < N2; j++) { List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, i, 0), &C[0]); - List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, N1 - 1, j), - &C[1]); - List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, i, N2 - 1), - &C[2]); + List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, N1 - 1, j), &C[1]); + List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, i, N2 - 1), &C[2]); List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, 0, j), &C[3]); List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, i, 0), &C[4]); - List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, N1 - 1, j), - &C[5]); - List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, i, N2 - 1), - &C[6]); + List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, N1 - 1, j), &C[5]); + List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, i, N2 - 1), &C[6]); List_Read(G[5]->TrsfVertices, index2d(F_flag[5], N1, N2, 0, j), &C[7]); List_Read(G[4]->TrsfVertices, index2d(F_flag[4], N1, N2, i, j), &F[4]); @@ -350,24 +355,16 @@ int MeshTransfiniteVolume(Volume * vol) for(k = 0; k < N3; k++) { - List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, 0, k), - &C[8]); - List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, N1 - 1, k), - &C[9]); - List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, N1 - 1, k), - &C[10]); - List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, 0, k), - &C[11]); - - List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, i, k), - &F[0]); - List_Read(G[1]->TrsfVertices, index2d(F_flag[1], N2, N3, j, k), - &F[1]); - List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, i, k), - &F[2]); + List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, 0, k), &C[8]); + List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, N1 - 1, k), &C[9]); + List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, N1 - 1, k), &C[10]); + List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, 0, k), &C[11]); + + List_Read(G[0]->TrsfVertices, index2d(F_flag[0], N1, N3, i, k), &F[0]); + List_Read(G[1]->TrsfVertices, index2d(F_flag[1], N2, N3, j, k), &F[1]); + List_Read(G[2]->TrsfVertices, index2d(F_flag[2], N1, N3, i, k), &F[2]); if(nbs == 6) - List_Read(G[3]->TrsfVertices, index2d(F_flag[3], N2, N3, j, k), - &F[3]); + List_Read(G[3]->TrsfVertices, index2d(F_flag[3], N2, N3, j, k), &F[3]); else if(nbs == 5) F[3] = C[8]; @@ -439,19 +436,16 @@ int MeshTransfiniteVolume(Volume * vol) list[(i) + N1 * (j) + N1 * N2 * (k + 1)], list[(i) + N1 * (j + 1) + N1 * N2 * (k)], list[(i + 1) + N1 * (j + 1) + N1 * N2 * (k)], - list[(i) + N1 * (j + 1) + - N1 * N2 * (k + 1)]); + list[(i) + N1 * (j + 1) + N1 * N2 * (k + 1)]); prism->iEnt = vol->Num; Tree_Replace(vol->Prisms, &prism); prism = Create_Prism(list[(i + 1) + N1 * (j) + N1 * N2 * (k + 1)], list[(i) + N1 * (j) + N1 * N2 * (k + 1)], list[(i + 1) + N1 * (j) + N1 * N2 * (k)], - list[(i + 1) + N1 * (j + 1) + - N1 * N2 * (k + 1)], + list[(i + 1) + N1 * (j + 1) + N1 * N2 * (k + 1)], list[(i) + N1 * (j + 1) + N1 * N2 * (k + 1)], - list[(i + 1) + N1 * (j + 1) + - N1 * N2 * (k)]); + list[(i + 1) + N1 * (j + 1) + N1 * N2 * (k)]); prism->iEnt = vol->Num; Tree_Replace(vol->Prisms, &prism); diff --git a/Mesh/SMS.cpp b/Mesh/SMS.cpp index cdeace605624cb00fd1ff2bf4e774699b6e9b581..a79ce7ca9fff3ddedd976f714737177d4aa69884 100644 --- a/Mesh/SMS.cpp +++ b/Mesh/SMS.cpp @@ -1,4 +1,4 @@ -// $Id: SMS.cpp,v 1.12 2003-03-01 22:36:42 geuzaine Exp $ +// $Id: SMS.cpp,v 1.13 2003-03-02 16:10:28 geuzaine Exp $ // // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle // @@ -45,7 +45,9 @@ extern Context_T CTX; #define ENTITY_FACE 2 #define ENTITY_REGION 3 #define ENTITY_NONE 4 + extern int FACE_DIMENSION; + void TRIE_MON_GARS2(void *a, void *b) { Simplex *s = *(Simplex **) a; @@ -233,7 +235,6 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) if(GEntityId) { fscanf(in, "%d %d", &GEntityType, &NbEdgesOnFace); - List_T *Lists[4] = { 0, 0, 0, 0 }; if(NbEdgesOnFace == 3) { @@ -381,167 +382,176 @@ void Read_Mesh_SMS(Mesh * m, FILE * in) Msg(INFO, "Done."); } -/* -void Write_SMS_FILE (Mesh *m, char *filename) +#if 0 + +void Write_SMS_FILE(Mesh * m, char *filename) { - FILE *f = fopen (filename,"w"); + FILE *f = fopen(filename, "w"); // write first the global infos - int i,j; -// Edge e; + int i, j; + // Edge e; List_T *l; - List_T *AllFaces = List_Create(100,100,sizeof(Simplex*)); + List_T *AllFaces = List_Create(100, 100, sizeof(Simplex *)); Surface *surf; Simplex *s; Vertex *v; Curve *c; - l = Tree2List(m->Surfaces); EdgesContainer AllEdges(l); - - for(i=0;i<List_Nbr(l);i++) - { - List_Read(l,i,&surf); - List_T *all = Tree2List(surf->Simplexes); - for(j=0;j<List_Nbr(all);j++)List_Add(AllFaces,List_Pointer(all,j)); - List_Delete(all); - } + for(i = 0; i < List_Nbr(l); i++) { + List_Read(l, i, &surf); + List_T *all = Tree2List(surf->Simplexes); + for(j = 0; j < List_Nbr(all); j++) + List_Add(AllFaces, List_Pointer(all, j)); + List_Delete(all); + } List_Delete(l); - fprintf(f,"gmsh 2\n"); - fprintf(f,"0 %d %d %d %d\n" - ,List_Nbr(AllFaces) - ,Tree_Nbr(AllEdges.AllEdges) - ,Tree_Nbr(m->Vertices) - ,Tree_Nbr(m->Vertices)); + fprintf(f, "gmsh 2\n"); + fprintf(f, "0 %d %d %d %d\n", List_Nbr(AllFaces) + , Tree_Nbr(AllEdges.AllEdges) + , Tree_Nbr(m->Vertices) + , Tree_Nbr(m->Vertices)); l = Tree2List(m->Vertices); int MaxFrozen; - for(i = 0;i<List_Nbr(l);i++) - { - List_Read(l,i,&v); - MaxFrozen = (MaxFrozen>=v->Frozen)?MaxFrozen:v->Frozen; - } + for(i = 0; i < List_Nbr(l); i++) { + List_Read(l, i, &v); + MaxFrozen = (MaxFrozen >= v->Frozen) ? MaxFrozen : v->Frozen; + } - for(i = 0;i<List_Nbr(l);i++) - { - List_Read(l,i,&v); - int mtype = ((v->ListCurves)?((List_Nbr(v->ListCurves)== 1)?ENTITY_EDGE:ENTITY_VERTEX):ENTITY_FACE); - int gent; - switch(mtype) - { - case ENTITY_VERTEX : gent = i+1;break; - case ENTITY_EDGE : List_Read(v->ListCurves,0,&c);gent = c->ipar[3]+1;break; - case ENTITY_FACE : List_Read(v->ListSurf,0,&surf);gent = surf->ipar[3]+1;break; - } - v->Frozen = i+1; - int nn = 7; // arbitrary - fprintf(f,"%d %d %d\n",gent,mtype,nn); - switch(mtype) - { - case ENTITY_VERTEX : fprintf(f,"%12.5E %12.5E %12.5E\n",v->Pos.X,v->Pos.Y,v->Pos.Z) ;break; - case ENTITY_EDGE : fprintf(f,"%12.5E %12.5E %12.5E 0 \n",v->Pos.X,v->Pos.Y,v->Pos.Z) ;break; - case ENTITY_FACE : fprintf(f,"%12.5E %12.5E %12.5E 0 0 1\n",v->Pos.X,v->Pos.Y,v->Pos.Z) ;break; - } + for(i = 0; i < List_Nbr(l); i++) { + List_Read(l, i, &v); + int mtype = + ((v-> + ListCurves) ? ((List_Nbr(v->ListCurves) == + 1) ? ENTITY_EDGE : ENTITY_VERTEX) : ENTITY_FACE); + int gent; + switch (mtype) { + case ENTITY_VERTEX: + gent = i + 1; + break; + case ENTITY_EDGE: + List_Read(v->ListCurves, 0, &c); + gent = c->ipar[3] + 1; + break; + case ENTITY_FACE: + List_Read(v->ListSurf, 0, &surf); + gent = surf->ipar[3] + 1; + break; } + v->Frozen = i + 1; + int nn = 7; // arbitrary + fprintf(f, "%d %d %d\n", gent, mtype, nn); + switch (mtype) { + case ENTITY_VERTEX: + fprintf(f, "%12.5E %12.5E %12.5E\n", v->Pos.X, v->Pos.Y, v->Pos.Z); + break; + case ENTITY_EDGE: + fprintf(f, "%12.5E %12.5E %12.5E 0 \n", v->Pos.X, v->Pos.Y, v->Pos.Z); + break; + case ENTITY_FACE: + fprintf(f, "%12.5E %12.5E %12.5E 0 0 1\n", v->Pos.X, v->Pos.Y, + v->Pos.Z); + break; + } + } // extern int DEGRE2; - printf("%d edges\n",Tree_Nbr(AllEdges.AllEdges)); + printf("%d edges\n", Tree_Nbr(AllEdges.AllEdges)); l = Tree2List(m->Curves); - for(i=0;i<List_Nbr(l);i++) - { - List_Read(l,i,&c); - AllEdges.AddTree(c->Simplexes,false); - // if(c->Num > 0 && c->Typ != MSH_SEGM_LINE)AllEdges.AddPoints(c,DEGRE2-1); - } + for(i = 0; i < List_Nbr(l); i++) { + List_Read(l, i, &c); + AllEdges.AddTree(c->Simplexes, false); + // if(c->Num > 0 && c->Typ != MSH_SEGM_LINE)AllEdges.AddPoints(c,DEGRE2-1); + } List_Delete(l); - printf("%d edges\n",Tree_Nbr(AllEdges.AllEdges)); - + printf("%d edges\n", Tree_Nbr(AllEdges.AllEdges)); + l = Tree2List(AllEdges.AllEdges); - int compareEdgeNum (const void *a, const void *b); - - List_Sort(l,compareEdgeNum); - - for(i = 0;i<List_Nbr(l);i++) - { - int mtype = ENTITY_FACE; - Edge *pe = (Edge*)List_Pointer(l,i); - int nn = 0,gent; - for(j=0;j<List_Nbr(pe->Simplexes);j++) - { - List_Read(pe->Simplexes,j,&s); - if(!s->V[2]){ - mtype = ENTITY_EDGE; - gent = s->iEnt; - } - if(mtype == ENTITY_FACE) - { - nn ++; - gent = s->iEnt; - } - } - if(!pe->Points) - fprintf(f,"%d %d %d %d %d 0\n",gent,mtype,pe->V[0]->Frozen,pe->V[1]->Frozen,nn); - else - { - fprintf(f,"%d %d %d %d %d %d\n",gent,mtype,pe->V[0]->Frozen,pe->V[1]->Frozen,nn, - List_Nbr(pe->Points)); - for(int k=0;k<List_Nbr(pe->Points);k++) - { - Coord cr; - List_Read(pe->Points,k,&cr); - fprintf(f,"%12.5E %12.5E %12.5E %12.5E ",cr.X,cr.Y,cr.Z,0.0); - } - fprintf(f,"\n"); - } + int compareEdgeNum(const void *a, const void *b); + + List_Sort(l, compareEdgeNum); + + for(i = 0; i < List_Nbr(l); i++) { + int mtype = ENTITY_FACE; + Edge *pe = (Edge *) List_Pointer(l, i); + int nn = 0, gent; + for(j = 0; j < List_Nbr(pe->Simplexes); j++) { + List_Read(pe->Simplexes, j, &s); + if(!s->V[2]) { + mtype = ENTITY_EDGE; + gent = s->iEnt; + } + if(mtype == ENTITY_FACE) { + nn++; + gent = s->iEnt; + } + } + if(!pe->Points) + fprintf(f, "%d %d %d %d %d 0\n", gent, mtype, pe->V[0]->Frozen, + pe->V[1]->Frozen, nn); + else { + fprintf(f, "%d %d %d %d %d %d\n", gent, mtype, pe->V[0]->Frozen, + pe->V[1]->Frozen, nn, List_Nbr(pe->Points)); + for(int k = 0; k < List_Nbr(pe->Points); k++) { + Coord cr; + List_Read(pe->Points, k, &cr); + fprintf(f, "%12.5E %12.5E %12.5E %12.5E ", cr.X, cr.Y, cr.Z, 0.0); + } + fprintf(f, "\n"); } + } Edge *ed[4]; int ori[4]; - int *edids = new int[List_Nbr(l)+1]; - for(i=0;i<List_Nbr(l)+1;i++)edids[i] = 0; + int *edids = new int[List_Nbr(l) + 1]; + for(i = 0; i < List_Nbr(l) + 1; i++) + edids[i] = 0; List_Delete(l); - for(i = 0;i<List_Nbr(AllFaces);i++) - { - List_Read(AllFaces,i,&s); - AllEdges.GetEdges(s,false,ed,ori); - if(!ed[3]) - { - for(int k=0;k<3;k++) - { - if(edids[ed[k]->Num] == ori[k]) - { - Simplex *s1,*s2; - List_Read(ed[k]->Simplexes,0,&s1); - List_Read(ed[k]->Simplexes,1,&s2); - printf("Edge %d %d\n",ed[k]->V[0]->Num,ed[k]->V[1]->Num); - printf("s1 = %d %d %d\n",s1->V[0]->Num,s1->V[1]->Num,s1->V[2]->Num); - printf("s2 = %d %d %d\n",s2->V[0]->Num,s2->V[1]->Num,s2->V[2]->Num); - } - else - { - edids[ed[k]->Num] = ori[k]; - } - } - - fprintf(f,"%d %d 3 %d %d %d 0\n",s->iEnt,ENTITY_FACE,ori[0] * ed[0]->Num, - ori[1]*ed[1]->Num,ori[2]*ed[2]->Num); - } - else fprintf(f,"%d %d 4 %d %d %d %d 0\n",s->iEnt,ENTITY_FACE,ori[0]*ed[0]->Num, - ori[1]*ed[1]->Num,ori[2]*ed[2]->Num,ori[3]*ed[3]->Num); + for(i = 0; i < List_Nbr(AllFaces); i++) { + List_Read(AllFaces, i, &s); + AllEdges.GetEdges(s, false, ed, ori); + if(!ed[3]) { + for(int k = 0; k < 3; k++) { + if(edids[ed[k]->Num] == ori[k]) { + Simplex *s1, *s2; + List_Read(ed[k]->Simplexes, 0, &s1); + List_Read(ed[k]->Simplexes, 1, &s2); + printf("Edge %d %d\n", ed[k]->V[0]->Num, ed[k]->V[1]->Num); + printf("s1 = %d %d %d\n", s1->V[0]->Num, s1->V[1]->Num, + s1->V[2]->Num); + printf("s2 = %d %d %d\n", s2->V[0]->Num, s2->V[1]->Num, + s2->V[2]->Num); + } + else { + edids[ed[k]->Num] = ori[k]; + } + } + + fprintf(f, "%d %d 3 %d %d %d 0\n", s->iEnt, ENTITY_FACE, + ori[0] * ed[0]->Num, ori[1] * ed[1]->Num, ori[2] * ed[2]->Num); } + else + fprintf(f, "%d %d 4 %d %d %d %d 0\n", s->iEnt, ENTITY_FACE, + ori[0] * ed[0]->Num, ori[1] * ed[1]->Num, ori[2] * ed[2]->Num, + ori[3] * ed[3]->Num); + } delete edids; List_Delete(AllFaces); - fclose (f); - + fclose(f); + } -*/ + +#endif + int isTopologic(Vertex * v, List_T * curves) { Curve *c; diff --git a/doc/FAQ b/doc/FAQ index cf90958e13512328b28c851434cb0fef42054f99..39b13f34814ce96b6b8e511a0ac816faee3e5c22 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -1,4 +1,4 @@ -This is the Gmsh FAQ - $Date: 2003-03-02 06:57:07 $ +This is the Gmsh FAQ - $Date: 2003-03-02 16:10:28 $ ******************************************************************** @@ -8,11 +8,11 @@ Section 1: The basics Gmsh is an automatic three-dimensional finite element mesh generator, primarily Delaunay, with built-in pre- and post-processing -facilities. Its primal goal is to provide a simple meshing tool for -academic test cases with parametric input and up to date visualization -capabilities. One of the strengths of Gmsh is its ability to respect -a characteristic length field for the generation of adapted meshes on -lines, surfaces and volumes. +facilities. Its primal design goal was to provide a simple meshing +tool for academic test cases with parametric input and up to date +visualization capabilities. One of the strengths of Gmsh is its +ability to respect a characteristic length field for the generation of +adapted meshes on lines, surfaces and volumes. * 1.2 What are the terms and conditions of use? @@ -80,7 +80,7 @@ Section 3: General problems * 3.1 Gmsh [from a binary distribution] complains about missing libraries. -Try 'ldd gmsh' (or 'otool -L gmsh' under Mac OS X) to check if all the +Try 'ldd gmsh' (or 'otool -L gmsh' on Mac OS X) to check if all the required shared libraries are installed on your system. If not, install them. If it still doesn't work, recompile Gmsh from the sources. @@ -125,7 +125,7 @@ Try one of the other 2D algorithms, e.g.: - on the command line: gmsh -algo tri - in the interface: Tools->Options->Mesh->2D->Isotropic algorithm (Triangle) - in input files: Mesh.Algorithm = 3 -The old 2D algorithm will disappear once all its features are +The old 2D algorithm may disappear once all its features are integrated in the new ones, so please don't send bug reports on the old algorithm anymore. @@ -159,10 +159,10 @@ very big meshes, see the answer to the previous question... * 5.6 The quality of the elements generated by the 3D algorithm is very bad. -Yes, this is normal(!). At the time of this writing, we do not -post-process the 3D Delaunay mesh, so that some (typically 0.1 to -0.5%) badly shaped tetrahedra will likely subsist in any unstructured -3D mesh. This may/should be fixed in the future. +Yes, this is normal(!). At the time of this writing (March 2003), we +do not post-process the 3D Delaunay mesh, so that some (typically 0.1 +to 0.5%) badly shaped tetrahedra will likely subsist in any +unstructured 3D mesh. This will be fixed in the future. * 5.7 Non-recombined 3D extruded meshes sometimes fail. diff --git a/doc/gmsh.html b/doc/gmsh.html index e3621630188ab77f6c4cc8b9ea8a07a386cfd361..80d4e2ac9f242856c7a435c2c7df673badffea21 100644 --- a/doc/gmsh.html +++ b/doc/gmsh.html @@ -43,8 +43,8 @@ generator with built-in pre- and post-processing facilities</h1> Gmsh (pronounced "<em>Gnu-mesh</em>") is a <a href="http://www.gnu.org/copyleft/gpl-faq.html">free</a> automatic three-dimensional finite element mesh generator, primarily Delaunay, -with built-in pre- and post-processing facilities. Its primal goal is -to provide a simple meshing tool for academic test cases with +with built-in pre- and post-processing facilities. Its primal design +goal was to provide a simple meshing tool for academic test cases with parametric input and up to date visualization capabilities. One of the strengths of Gmsh is its ability to respect a characteristic length field for the generation of adapted meshes on lines, surfaces and