From 153e5729fda35bb9dbbc8530ce322c08af462149 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 13 Aug 2001 20:05:42 +0000 Subject: [PATCH] *** empty log message *** --- Mesh/Print_Mesh.cpp | 8 +++----- Mesh/Read_Mesh.cpp | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Mesh/Print_Mesh.cpp b/Mesh/Print_Mesh.cpp index d81d43457e..6e79357cef 100644 --- a/Mesh/Print_Mesh.cpp +++ b/Mesh/Print_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Print_Mesh.cpp,v 1.25 2001-08-11 23:28:32 geuzaine Exp $ +// $Id: Print_Mesh.cpp,v 1.26 2001-08-13 20:05:42 geuzaine Exp $ #include "Gmsh.h" #include "Numeric.h" @@ -431,7 +431,7 @@ int process_2D_elements (FILE * funv, Mesh * m){ List_T *AllSurfaces = List_Create (2, 2, sizeof (Surface *)); Simplex *sx; Surface *s; - int nbtri = 0, i, j, nsup, n, ntot, k, geo, fetyp; + int i, j, nsup, n, ntot, k, geo, fetyp; for (i = 0; i < List_Nbr (ListVolumes); i++){ List_Read (ListVolumes, i, &vol); @@ -494,7 +494,6 @@ int process_2D_elements (FILE * funv, Mesh * m){ fprintf (funv, "\n"); } List_Delete (Elements); - nbtri += Tree_Nbr (s->Simplexes); } } List_Delete (ListSurfaces); @@ -511,7 +510,7 @@ int process_1D_elements (FILE * funv, Mesh * m){ Simplex *sx; Curve *c; Surface *surf; - int nblig = 0, k, ntot, i, j, geo, fetyp, n, nsup; + int k, ntot, i, j, geo, fetyp, n, nsup; for (i = 0; i < List_Nbr (ListSurfaces); i++){ List_Read (ListSurfaces, i, &surf); @@ -530,7 +529,6 @@ int process_1D_elements (FILE * funv, Mesh * m){ if (!List_Search (AllCurves, &c, compareCurve)){ Elements = Tree2List (c->Simplexes); for (j = 0; j < List_Nbr (Elements); j++){ - nblig++; List_Read (Elements, j, &sx); if (sx->VSUP){ fetyp = BEAM2; diff --git a/Mesh/Read_Mesh.cpp b/Mesh/Read_Mesh.cpp index b55b8e5c71..ed35c76a18 100644 --- a/Mesh/Read_Mesh.cpp +++ b/Mesh/Read_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Read_Mesh.cpp,v 1.23 2001-08-09 20:48:31 geuzaine Exp $ +// $Id: Read_Mesh.cpp,v 1.24 2001-08-13 20:05:42 geuzaine Exp $ #include "Gmsh.h" #include "Geo.h" @@ -110,6 +110,10 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){ if(CTX.mesh.check_duplicates) Duplicates = Tree_Create (sizeof (Vertex *), comparePosition); +#ifdef MOES + Tree_T Duplicates2 = Tree_Create (sizeof (Vertex *), comparePosition); +#endif + for (i_Element = 0 ; i_Element < Nbr_Elements ; i_Element++) { // HACK FROM JF @@ -199,6 +203,16 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){ Tree_Insert(s->Simplexes, &simp) ; Tree_Insert(M->Simplexes, &simp) ; M->Statistics[7]++; + +#ifdef MOES + if(!(vertspp = (Vertex**)Tree_PQuery(Duplicates2, &vertsp[0]))) + printf("vertex %d belongs to no simplex...", vertsp[0]->Num); + if(!(vertspp = (Vertex**)Tree_PQuery(Duplicates2, &vertsp[1]))) + printf("vertex %d belongs to no simplex...", vertsp[1]->Num); + if(!(vertspp = (Vertex**)Tree_PQuery(Duplicates2, &vertsp[2]))) + printf("vertex %d belongs to no simplex...", vertsp[2]->Num); +#endif + break; case QUA1: simp = Create_Quadrangle(vertsp[0], vertsp[1], vertsp[2], vertsp[3]); @@ -215,6 +229,14 @@ void Read_Mesh_MSH (Mesh *M, FILE *File_GEO){ Tree_Insert(v->Simplexes, &simp) ; Tree_Insert(M->Simplexes, &simp) ; M->Statistics[9]++; + +#ifdef MOES + Tree_Insert(Duplicates2, &vertsp[0]); + Tree_Insert(Duplicates2, &vertsp[1]); + Tree_Insert(Duplicates2, &vertsp[2]); + Tree_Insert(Duplicates2, &vertsp[3]); +#endif + break; case HEX1: hex = Create_Hexahedron(vertsp[0], vertsp[1], vertsp[2], vertsp[3], -- GitLab