diff --git a/Common/Message.cpp b/Common/Message.cpp index 5ee5115b32e0d602c5026217fd0b2455fc3c360a..1b97705d7c7b3a93d41c90bd6fac3db5fd0ff602 100644 --- a/Common/Message.cpp +++ b/Common/Message.cpp @@ -1,4 +1,4 @@ -// $Id: Message.cpp,v 1.2 2008-05-06 21:11:46 geuzaine Exp $ +// $Id: Message.cpp,v 1.3 2008-06-27 18:00:51 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -49,7 +49,7 @@ int Message::_warningCount = 0; int Message::_errorCount = 0; #if defined(HAVE_NO_VSNPRINTF) -int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) +static int vsnprintf(char *str, size_t size, const char *fmt, va_list ap) { if(strlen(fmt) > size - 1){ // just copy the format strncpy(str, fmt, size - 1); diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp index b81acc56a92d720038f8cb7f58026f5dac11357d..8d00b8a43d3618f800c7a96e4b328c5ccd65e297 100644 --- a/Geo/GeoStringInterface.cpp +++ b/Geo/GeoStringInterface.cpp @@ -1,4 +1,4 @@ -// $Id: GeoStringInterface.cpp,v 1.24 2008-06-19 15:58:41 geuzaine Exp $ +// $Id: GeoStringInterface.cpp,v 1.25 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -38,7 +38,7 @@ extern Context_T CTX; // Some old systems don't have snprintf... Just call sprintf instead. #if defined(HAVE_NO_SNPRINTF) -int snprintf(char *str, size_t size, const char* fmt, ...) +static int snprintf(char *str, size_t size, const char* fmt, ...) { va_list args; va_start(args, fmt); @@ -139,7 +139,7 @@ void coherence(const char *fich) add_infile("Coherence;", fich, true); } -void strncat_list(char *text, List_T *list) +static void strncat_list(char *text, List_T *list) { char text2[BUFFSIZE]; for(int i = 0; i < List_Nbr(list); i++){ @@ -243,25 +243,34 @@ void add_point(const char *fich, const char *x, const char *y, const char *z, add_infile(text, fich); } -void add_field_option(int field_id, const char *option_name, const char *option_value, const char *fich){ - std::ostringstream sstream; - sstream<<"Field["<<field_id<<"]."<<std::string(option_name)<<" = "<<std::string(option_value)<<";"; - add_infile(sstream.str().c_str(),fich); +void add_field_option(int field_id, const char *option_name, const char *option_value, + const char *fich) +{ + std::ostringstream sstream; + sstream<<"Field["<<field_id<<"]."<<std::string(option_name)<<" = " + <<std::string(option_value)<<";"; + add_infile(sstream.str().c_str(),fich); } -void add_field(int field_id, const char *type_name, const char *fich){ - std::ostringstream sstream; - sstream<<"Field["<<field_id<<"] = "<<std::string(type_name)<<";"; - add_infile(sstream.str().c_str(),fich); + +void add_field(int field_id, const char *type_name, const char *fich) +{ + std::ostringstream sstream; + sstream<<"Field["<<field_id<<"] = "<<std::string(type_name)<<";"; + add_infile(sstream.str().c_str(),fich); } -void delete_field(int field_id, const char *fich){ - std::ostringstream sstream; - sstream<<"Delete Field ["<<field_id<<"];"; - add_infile(sstream.str().c_str(),fich); + +void delete_field(int field_id, const char *fich) +{ + std::ostringstream sstream; + sstream<<"Delete Field ["<<field_id<<"];"; + add_infile(sstream.str().c_str(),fich); } -void set_background_field(int field_id,const char *fich){ - std::ostringstream sstream; - sstream<<"Background Field = "<<field_id<<";"; - add_infile(sstream.str().c_str(),fich); + +void set_background_field(int field_id,const char *fich) +{ + std::ostringstream sstream; + sstream<<"Background Field = "<<field_id<<";"; + add_infile(sstream.str().c_str(),fich); } void add_line(int p1, int p2, const char *fich) diff --git a/Mesh/DivideAndConquer.cpp b/Mesh/DivideAndConquer.cpp index 2e5699da12931f7f9f88f8ad1287fa59868b52b2..b8afbea596d877c3a31a831106533a41c30849bf 100644 --- a/Mesh/DivideAndConquer.cpp +++ b/Mesh/DivideAndConquer.cpp @@ -1,4 +1,4 @@ -// $Id: DivideAndConquer.cpp,v 1.19 2008-06-07 17:20:48 geuzaine Exp $ +// $Id: DivideAndConquer.cpp,v 1.20 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -41,10 +41,10 @@ static PointRecord *pPointArray; -int Insert(PointNumero a, PointNumero b); -int Delete(PointNumero a, PointNumero b); +static int Insert(PointNumero a, PointNumero b); +static int Delete(PointNumero a, PointNumero b); -PointNumero Predecessor(PointNumero a, PointNumero b) +static PointNumero Predecessor(PointNumero a, PointNumero b) { DListPeek p = pPointArray[a].adjacent; if(p == NULL) @@ -59,7 +59,7 @@ PointNumero Predecessor(PointNumero a, PointNumero b) return -1; } -PointNumero Successor(PointNumero a, PointNumero b) +static PointNumero Successor(PointNumero a, PointNumero b) { DListPeek p = pPointArray[a].adjacent; if(p == NULL) @@ -74,7 +74,7 @@ PointNumero Successor(PointNumero a, PointNumero b) return -1; } -int FixFirst(PointNumero x, PointNumero f) +static int FixFirst(PointNumero x, PointNumero f) { DListPeek p = pPointArray[x].adjacent; if(p == NULL) @@ -93,12 +93,12 @@ int FixFirst(PointNumero x, PointNumero f) return out; } -PointNumero First(PointNumero x) +static PointNumero First(PointNumero x) { return (pPointArray[x].adjacent)->point_num; } -int IsLeftOf(PointNumero x, PointNumero y, PointNumero check) +static int IsLeftOf(PointNumero x, PointNumero y, PointNumero check) { double pa[2] = {(double)pPointArray[x].where.h, (double)pPointArray[x].where.v}; double pb[2] = {(double)pPointArray[y].where.h, (double)pPointArray[y].where.v}; @@ -110,12 +110,12 @@ int IsLeftOf(PointNumero x, PointNumero y, PointNumero check) return result > 0; } -int IsRightOf(PointNumero x, PointNumero y, PointNumero check) +static int IsRightOf(PointNumero x, PointNumero y, PointNumero check) { return IsLeftOf(y, x, check); } -Segment LowerCommonTangent(DT vl, DT vr) +static Segment LowerCommonTangent(DT vl, DT vr) { PointNumero x, y, z, z1, z2, temp; Segment s; @@ -144,7 +144,7 @@ Segment LowerCommonTangent(DT vl, DT vr) } } -Segment UpperCommonTangent(DT vl, DT vr) +static Segment UpperCommonTangent(DT vl, DT vr) { PointNumero x, y, z, z1, z2, temp; Segment s; @@ -174,7 +174,7 @@ Segment UpperCommonTangent(DT vl, DT vr) } // return 1 if the point k is NOT in the circumcircle of triangle hij -int Qtest(PointNumero h, PointNumero i, PointNumero j, PointNumero k) +static int Qtest(PointNumero h, PointNumero i, PointNumero j, PointNumero k) { if((h == i) && (h == j) && (h == k)) { Msg::Error("3 identical points in Qtest"); @@ -192,7 +192,7 @@ int Qtest(PointNumero h, PointNumero i, PointNumero j, PointNumero k) return (result < 0) ? 1 : 0; } -int merge(DT vl, DT vr) +static int merge(DT vl, DT vr) { Segment bt, ut; int a, b, out; @@ -279,7 +279,7 @@ int merge(DT vl, DT vr) return 1; } -DT recur_trig(PointNumero left, PointNumero right) +static DT recur_trig(PointNumero left, PointNumero right) { int n, m; DT dt; @@ -323,7 +323,7 @@ DT recur_trig(PointNumero left, PointNumero right) return dt; } -int comparePoints(const void *i, const void *j) +static int comparePoints(const void *i, const void *j) { double x, y; @@ -337,7 +337,7 @@ int comparePoints(const void *i, const void *j) } // this fonction builds the delaunay triangulation for a window -int BuildDelaunay(DocRecord *doc) +static int BuildDelaunay(DocRecord *doc) { pPointArray = doc->points; qsort(doc->points, doc->numPoints, sizeof(PointRecord), comparePoints); @@ -347,7 +347,7 @@ int BuildDelaunay(DocRecord *doc) // This routine insert the point 'newPoint' in the list dlist, // respecting the clock-wise orientation -int DListInsert(DListRecord **dlist, MPoint center, PointNumero newPoint) +static int DListInsert(DListRecord **dlist, MPoint center, PointNumero newPoint) { DListRecord *p, *newp; double alpha1, alpha, beta, xx, yy; @@ -410,14 +410,14 @@ int DListInsert(DListRecord **dlist, MPoint center, PointNumero newPoint) // This routine inserts the point 'a' in the adjency list of 'b' and // the point 'b' in the adjency list of 'a' -int Insert(PointNumero a, PointNumero b) +static int Insert(PointNumero a, PointNumero b) { int rslt = DListInsert(&pPointArray[a].adjacent, pPointArray[a].where, b); rslt &= DListInsert(&pPointArray[b].adjacent, pPointArray[b].where, a); return rslt; } -int DListDelete(DListPeek *dlist, PointNumero oldPoint) +static int DListDelete(DListPeek *dlist, PointNumero oldPoint) { DListPeek p; @@ -451,7 +451,7 @@ int DListDelete(DListPeek *dlist, PointNumero oldPoint) // This routine removes the point 'a' in the adjency list of 'b' and // the point 'b' in the adjency list of 'a' -int Delete(PointNumero a, PointNumero b) +static int Delete(PointNumero a, PointNumero b) { int rslt = DListDelete(&pPointArray[a].adjacent, b); rslt &= DListDelete(&pPointArray[b].adjacent, a); @@ -459,7 +459,7 @@ int Delete(PointNumero a, PointNumero b) } // compte les points sur le polygone convexe -int CountPointsOnHull(int n, PointRecord *pPointArray) +static int CountPointsOnHull(int n, PointRecord *pPointArray) { PointNumero p, p2, temp; int i; @@ -478,7 +478,7 @@ int CountPointsOnHull(int n, PointRecord *pPointArray) return (i <= n) ? i : -1; } -PointNumero *ConvertDlistToArray(DListPeek *dlist, int *n) +static PointNumero *ConvertDlistToArray(DListPeek *dlist, int *n) { DListPeek p, temp; int i, max = 0; @@ -506,7 +506,7 @@ PointNumero *ConvertDlistToArray(DListPeek *dlist, int *n) } // Convertir les listes d'adjacence en triangles -int ConvertDListToTriangles(DocRecord *doc) +static int ConvertDListToTriangles(DocRecord *doc) { // on suppose que n >= 3. gPointArray est suppose OK. @@ -559,7 +559,7 @@ int ConvertDListToTriangles(DocRecord *doc) } // Cette routine efface toutes les listes d'adjacence du pPointArray -void RemoveAllDList(int n, PointRecord *pPointArray) +static void RemoveAllDList(int n, PointRecord *pPointArray) { int i; DListPeek p, temp; diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index df13f58c60c9ca10ee41ff845c5e2f64b8d32677..a8c9cd59ba8423efb6d05d7cbedfebf1b0fc9f2c 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -1,4 +1,4 @@ -// $Id: meshGEdge.cpp,v 1.64 2008-06-07 17:20:48 geuzaine Exp $ +// $Id: meshGEdge.cpp,v 1.65 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -51,7 +51,7 @@ struct xi2lc { static std::vector<xi2lc> interpLc; -void smoothInterpLc(int nbSmooth) +static void smoothInterpLc(int nbSmooth) { for(int j = 0; j < nbSmooth; j++){ for(int i = 0 ; i < (int)interpLc.size(); i++){ @@ -65,7 +65,7 @@ void smoothInterpLc(int nbSmooth) } } -void printInterpLc(const char *name) +static void printInterpLc(const char *name) { FILE *f = fopen(name,"w"); for(unsigned int i = 0; i < interpLc.size(); i++){ @@ -75,7 +75,7 @@ void printInterpLc(const char *name) fclose(f); } -void buildInterpLc(List_T *lcPoints) +static void buildInterpLc(List_T *lcPoints) { IntPoint p; interpLc.clear(); @@ -85,7 +85,7 @@ void buildInterpLc(List_T *lcPoints) } } -double F_Lc_usingInterpLc(GEdge *ge, double t) +static double F_Lc_usingInterpLc(GEdge *ge, double t) { std::vector<xi2lc>::iterator it = std::lower_bound(interpLc.begin(), interpLc.end(), xi2lc(t, 0)); @@ -101,7 +101,7 @@ double F_Lc_usingInterpLc(GEdge *ge, double t) return d * l; } -double F_Lc_usingInterpLcBis(GEdge *ge, double t) +static double F_Lc_usingInterpLcBis(GEdge *ge, double t) { GPoint p = ge->point(t); double lc_here; @@ -120,7 +120,7 @@ double F_Lc_usingInterpLcBis(GEdge *ge, double t) return 1 / lc_here; } -double F_Lc(GEdge *ge, double t) +static double F_Lc(GEdge *ge, double t) { GPoint p = ge->point(t); double lc_here; @@ -141,7 +141,7 @@ double F_Lc(GEdge *ge, double t) return d / lc_here; } -double F_Transfinite(GEdge *ge, double t) +static double F_Transfinite(GEdge *ge, double t) { double val, r; @@ -199,20 +199,20 @@ double F_Transfinite(GEdge *ge, double t) return val; } -double F_One(GEdge *ge, double t) +static double F_One(GEdge *ge, double t) { SVector3 der = ge->firstDer(t) ; return norm(der); } -double trapezoidal(IntPoint * P1, IntPoint * P2) +static double trapezoidal(IntPoint * P1, IntPoint * P2) { return (0.5 * (P1->lc + P2->lc) * (P2->t - P1->t)); } -void RecursiveIntegration(GEdge *ge, IntPoint * from, IntPoint * to, - double (*f) (GEdge *e, double X), List_T * pPoints, - double Prec, int *depth) +static void RecursiveIntegration(GEdge *ge, IntPoint * from, IntPoint * to, + double (*f) (GEdge *e, double X), List_T * pPoints, + double Prec, int *depth) { IntPoint P, p1; @@ -243,9 +243,9 @@ void RecursiveIntegration(GEdge *ge, IntPoint * from, IntPoint * to, (*depth)--; } -double Integration(GEdge *ge, double t1, double t2, - double (*f) (GEdge *e, double X), - List_T * pPoints, double Prec) +static double Integration(GEdge *ge, double t1, double t2, + double (*f) (GEdge *e, double X), + List_T * pPoints, double Prec) { IntPoint from, to; diff --git a/Mesh/meshGEdgeExtruded.cpp b/Mesh/meshGEdgeExtruded.cpp index b1ca6cf0d91fb87c6028157f21d7571083d3e339..dcac5bd9b1e44a2bd459c66555b251fa1620eeb7 100644 --- a/Mesh/meshGEdgeExtruded.cpp +++ b/Mesh/meshGEdgeExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGEdgeExtruded.cpp,v 1.13 2008-05-04 08:31:16 geuzaine Exp $ +// $Id: meshGEdgeExtruded.cpp,v 1.14 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -25,7 +25,7 @@ #include "ExtrudeParams.h" #include "Message.h" -void extrudeMesh(GVertex *from, GEdge *to) +static void extrudeMesh(GVertex *from, GEdge *to) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -40,7 +40,7 @@ void extrudeMesh(GVertex *from, GEdge *to) } } -void copyMesh(GEdge *from, GEdge *to) +static void copyMesh(GEdge *from, GEdge *to) { ExtrudeParams *ep = to->meshAttributes.extrude; diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index a4cb15bd91ced6f328c854e19d49464099c70c8d..ade44ab427016c35adef766c450ccefdd40a5f49 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFace.cpp,v 1.136 2008-06-10 08:37:34 remacle Exp $ +// $Id: meshGFace.cpp,v 1.137 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -60,7 +60,7 @@ void fourthPoint(double *p1, double *p2, double *p3, double *p4) p4[2] = c[2] + R * vz[2]; } -bool noseam(GFace *gf) +static bool noseam(GFace *gf) { std::list<GEdge*> edges = gf->edges(); std::list<GEdge*>::iterator it = edges.begin(); @@ -73,8 +73,8 @@ bool noseam(GFace *gf) return true; } -void remeshUnrecoveredEdges(std::set<EdgeToRecover> &edgesNotRecovered, - std::list<GFace*> &facesToRemesh) +static void remeshUnrecoveredEdges(std::set<EdgeToRecover> &edgesNotRecovered, + std::list<GFace*> &facesToRemesh) { facesToRemesh.clear(); deMeshGFace dem; @@ -156,17 +156,17 @@ void remeshUnrecoveredEdges(std::set<EdgeToRecover> &edgesNotRecovered, } } -bool AlgoDelaunay2D(GFace *gf) +static bool AlgoDelaunay2D(GFace *gf) { - if(noseam(gf) && /*gf->getNativeType() == GEntity::GmshModel &&*/ - (CTX.mesh.algo2d == ALGO_2D_DELAUNAY || CTX.mesh.algo2d == ALGO_2D_FRONTAL) /*&& gf->geomType() == GEntity::Plane*/) + if(noseam(gf) && (CTX.mesh.algo2d == ALGO_2D_DELAUNAY || + CTX.mesh.algo2d == ALGO_2D_FRONTAL)) return true; return false; } void computeEdgeLoops(const GFace *gf, - std::vector<MVertex*> &all_mvertices, - std::vector<int> &indices) + std::vector<MVertex*> &all_mvertices, + std::vector<int> &indices) { std::list<GEdge*> edges = gf->edges(); std::list<int> ori = gf->orientations(); @@ -230,8 +230,8 @@ void computeElementShapes(GFace *gf, double &worst, double &avg, double &best, avg /= nT; } -bool recover_medge(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, - std::set<EdgeToRecover> *not_recovered, int pass_) +static bool recover_medge(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, + std::set<EdgeToRecover> *not_recovered, int pass_) { BDS_GeomEntity *g = 0; if (pass_ == 2){ @@ -329,7 +329,7 @@ bool recover_medge(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, // Builds An initial triangular mesh that respects the boundaries of // the domain, including embedded points and surfaces -bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true) +static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true) { BDS_GeomEntity CLASS_F (1, 2); typedef std::set<MVertex*> v_container; @@ -747,14 +747,14 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true) // case of periodicty, some curves are present 2 times in the wire // (seams). Those must be meshed separately -inline double dist2 (const SPoint2 &p1,const SPoint2 &p2) +static inline double dist2(const SPoint2 &p1, const SPoint2 &p2) { const double dx = p1.x() - p2.x(); const double dy = p1.y() - p2.y(); return dx*dx+dy*dy; } -void printMesh1d (int iEdge, int seam, std::vector<SPoint2> &m) +static void printMesh1d(int iEdge, int seam, std::vector<SPoint2> &m) { printf("Mesh1D for edge %d seam %d\n", iEdge, seam); for (unsigned int i = 0; i < m.size(); i++){ @@ -762,12 +762,12 @@ void printMesh1d (int iEdge, int seam, std::vector<SPoint2> &m) } } -bool buildConsecutiveListOfVertices(GFace *gf, GEdgeLoop &gel, - std::vector<BDS_Point*> &result, - SBoundingBox3d &bbox, BDS_Mesh *m, - std::map<BDS_Point*, MVertex*> &recover_map_global, - int &count, int countTot, double tol, - bool seam_the_first = false) +static bool buildConsecutiveListOfVertices(GFace *gf, GEdgeLoop &gel, + std::vector<BDS_Point*> &result, + SBoundingBox3d &bbox, BDS_Mesh *m, + std::map<BDS_Point*, MVertex*> &recover_map_global, + int &count, int countTot, double tol, + bool seam_the_first = false) { // for each edge, we build a list of points that are the mapping of // the edge points on the face for seams, we build the list for @@ -986,7 +986,7 @@ bool buildConsecutiveListOfVertices(GFace *gf, GEdgeLoop &gel, return true; } -bool gmsh2DMeshGeneratorPeriodic(GFace *gf, bool debug = true) +static bool gmsh2DMeshGeneratorPeriodic(GFace *gf, bool debug = true) { std::map<BDS_Point*,MVertex*> recover_map; @@ -1345,7 +1345,7 @@ void meshGFace::operator() (GFace *gf) } template<class T> -bool shouldRevert(MEdge &reference, std::vector<T*> &elements) +static bool shouldRevert(MEdge &reference, std::vector<T*> &elements) { for(unsigned int i = 0; i < elements.size(); i++){ for(int j = 0; j < elements[i]->getNumEdges(); j++){ diff --git a/Mesh/meshGFace.h b/Mesh/meshGFace.h index 7edc8816c8e5d9460a58afa480f6e0e09c6f9ffe..ad36c6dab2aaec2c1b4b0402e8720e83b0259549 100644 --- a/Mesh/meshGFace.h +++ b/Mesh/meshGFace.h @@ -49,6 +49,8 @@ class orientMeshGFace { void operator () (GFace *); }; +void fourthPoint (double *p1, double *p2, double *p3, double *p4); + // Compute edge loops of the face, all_mvertices are the vertices of // the void computeEdgeLoops(const GFace *gf, @@ -59,5 +61,4 @@ int MeshTransfiniteSurface(GFace *gf); int MeshExtrudedSurface(GFace *gf, std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges=0); -void fourthPoint (double *p1, double *p2, double *p3, double *p4); #endif diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp index def7fef5d8e452e53f71c15eee8c3bd940d608e5..d3702f72196c1ec9513b22cbfefa5af7f884d016 100644 --- a/Mesh/meshGFaceExtruded.cpp +++ b/Mesh/meshGFaceExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFaceExtruded.cpp,v 1.30 2008-05-06 21:11:48 geuzaine Exp $ +// $Id: meshGFaceExtruded.cpp,v 1.31 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -28,8 +28,8 @@ extern Context_T CTX; -void createQuaTri(std::vector<MVertex*> &v, GFace *to, - std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) +static void createQuaTri(std::vector<MVertex*> &v, GFace *to, + std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -61,9 +61,9 @@ void createQuaTri(std::vector<MVertex*> &v, GFace *to, } } -void extrudeMesh(GEdge *from, GFace *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) +static void extrudeMesh(GEdge *from, GFace *to, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -122,8 +122,8 @@ void extrudeMesh(GEdge *from, GFace *to, } } -void copyMesh(GFace *from, GFace *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) +static void copyMesh(GFace *from, GFace *to, + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { ExtrudeParams *ep = to->meshAttributes.extrude; diff --git a/Mesh/meshGRegionExtruded.cpp b/Mesh/meshGRegionExtruded.cpp index 5c7255e02ea96228ffa8e53ffb15d05e8c8b4d4b..1e0af3f04bf043b80edc142ecbd22b2f25e7ee7c 100644 --- a/Mesh/meshGRegionExtruded.cpp +++ b/Mesh/meshGRegionExtruded.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegionExtruded.cpp,v 1.26 2008-05-06 21:11:48 geuzaine Exp $ +// $Id: meshGRegionExtruded.cpp,v 1.27 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -30,7 +30,7 @@ extern Context_T CTX; -void createPriPyrTet(std::vector<MVertex*> &v, GRegion *to) +static void createPriPyrTet(std::vector<MVertex*> &v, GRegion *to) { int dup[3]; int j = 0; @@ -60,7 +60,7 @@ void createPriPyrTet(std::vector<MVertex*> &v, GRegion *to) } } -void createHexPri(std::vector<MVertex*> &v, GRegion *to) +static void createHexPri(std::vector<MVertex*> &v, GRegion *to) { int dup[4]; int j = 0; @@ -86,15 +86,15 @@ void createHexPri(std::vector<MVertex*> &v, GRegion *to) } } -void createTet(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, GRegion *to) +static void createTet(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, GRegion *to) { if(v1 != v2 && v1 != v3 && v1 != v4 && v2 != v3 && v2 != v4 && v3 != v4) to->tetrahedra.push_back(new MTetrahedron(v1, v2, v3, v4)); } -int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::vector<MVertex*> &verts) +static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<MVertex*> &verts) { std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; double x[8], y[8], z[8]; @@ -125,8 +125,8 @@ int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, return verts.size(); } -void extrudeMesh(GFace *from, GRegion *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) +static void extrudeMesh(GFace *from, GRegion *to, + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -169,8 +169,8 @@ void extrudeMesh(GFace *from, GRegion *to, } } -void insertAllVertices(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) +static void insertAllVertices(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { pos.insert(gr->mesh_vertices.begin(), gr->mesh_vertices.end()); std::list<GFace*> faces = gr->faces(); @@ -231,31 +231,31 @@ void meshGRegionExtruded::operator() (GRegion *gr) MVertexLessThanLexicographic::tolerance = old_tol; } -int edgeExists(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) +static int edgeExists(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); return edges.count(p); } -void createEdge(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) +static void createEdge(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); edges.insert(p); } -void deleteEdge(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) +static void deleteEdge(MVertex *v1, MVertex *v2, + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); edges.erase(p); } // subdivide the 3 lateral faces of each prism -void phase1(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges) +static void phase1(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); @@ -288,11 +288,11 @@ void phase1(GRegion *gr, } // modify lateral edges to make them "tet-compatible" -void phase2(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges, - std::set<std::pair<MVertex*, MVertex*> > &edges_swap, - int &swap) +static void phase2(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges, + std::set<std::pair<MVertex*, MVertex*> > &edges_swap, + int &swap) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); @@ -356,9 +356,9 @@ void phase2(GRegion *gr, } // create tets -void phase3(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges) +static void phase3(GRegion *gr, + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); diff --git a/Mesh/meshGRegionTransfinite.cpp b/Mesh/meshGRegionTransfinite.cpp index b1a31ed09b5e520c1395be1040ece18327a2f9df..675fb0a57ba29209783781b5bbc6bef23410e7e1 100644 --- a/Mesh/meshGRegionTransfinite.cpp +++ b/Mesh/meshGRegionTransfinite.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegionTransfinite.cpp,v 1.12 2008-06-12 12:23:29 geuzaine Exp $ +// $Id: meshGRegionTransfinite.cpp,v 1.13 2008-06-27 18:00:52 geuzaine Exp $ // // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // @@ -112,14 +112,14 @@ tab[i + 1][j + 1][k + 1], \ tab[i + 1][j + 1][k ]) -double transfiniteHex(double f1, double f2, double f3, double f4, - double f5, double f6, - double c1, double c2, double c3, double c4, - double c5, double c6, double c7, double c8, - double c9, double c10, double c11, double c12, - double s1, double s2, double s3, double s4, - double s5, double s6, double s7, double s8, - double u, double v, double w) +static double transfiniteHex(double f1, double f2, double f3, double f4, + double f5, double f6, + double c1, double c2, double c3, double c4, + double c5, double c6, double c7, double c8, + double c9, double c10, double c11, double c12, + double s1, double s2, double s3, double s4, + double s5, double s6, double s7, double s8, + double u, double v, double w) { return (1-u)*f4 + u*f2 + (1-v)*f1 + v*f3 + (1-w)*f5 + w*f6 - ((1-u)*(1-v)*c9 + (1-u)*v*c12 + u*(1-v)*c10 + u*v*c11) - @@ -129,15 +129,15 @@ double transfiniteHex(double f1, double f2, double f3, double f4, (1-u)*(1-v)*w*s5 + u*(1-v)*w*s6 + u*v*w*s7 + (1-u)*v*w*s8; } -MVertex *transfiniteHex(GRegion *gr, - MVertex *f1, MVertex *f2, MVertex *f3, MVertex *f4, - MVertex *f5, MVertex *f6, - MVertex *c1, MVertex *c2, MVertex *c3, MVertex *c4, - MVertex *c5, MVertex *c6, MVertex *c7, MVertex *c8, - MVertex *c9, MVertex *c10, MVertex *c11, MVertex *c12, - MVertex *s1, MVertex *s2, MVertex *s3, MVertex *s4, - MVertex *s5, MVertex *s6, MVertex *s7, MVertex *s8, - double u, double v, double w) +static MVertex *transfiniteHex(GRegion *gr, + MVertex *f1, MVertex *f2, MVertex *f3, MVertex *f4, + MVertex *f5, MVertex *f6, + MVertex *c1, MVertex *c2, MVertex *c3, MVertex *c4, + MVertex *c5, MVertex *c6, MVertex *c7, MVertex *c8, + MVertex *c9, MVertex *c10, MVertex *c11, MVertex *c12, + MVertex *s1, MVertex *s2, MVertex *s3, MVertex *s4, + MVertex *s5, MVertex *s6, MVertex *s7, MVertex *s8, + double u, double v, double w) { double x = transfiniteHex(f1->x(), f2->x(), f3->x(), f4->x(), f5->x(), f6->x(), c1->x(), c2->x(), c3->x(), c4->x(), c5->x(), c6->x(), diff --git a/configure b/configure index 75603f79783b16dd524dabf3b61db001481045af..ac626dbe691a308d3033e1a5f4fbd87918a9eab3 100755 --- a/configure +++ b/configure @@ -6891,6 +6891,9 @@ if test $ac_cv_sizeof_size_t != 4; then echo "$as_me: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&2;} else FLAGS="${FLAGS} -DHAVE_64BIT_SIZE_T" + if test "x${OCC}" = "xyes"; then + FLAGS="${FLAGS} -D_OCC64" + fi fi fi diff --git a/configure.in b/configure.in index a5b5c8600410d6002aafdf06bab585c051742235..f69d2230bab0649132acd597d05ef096e57d9ae2 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.157 2008-06-07 17:20:44 geuzaine Exp $ +dnl $Id: configure.in,v 1.158 2008-06-27 18:00:51 geuzaine Exp $ dnl dnl Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle dnl @@ -804,6 +804,9 @@ if test $ac_cv_sizeof_size_t != 4; then AC_MSG_WARN([Unsupported size of size_t - this may affect FNV hashing.]) else FLAGS="${FLAGS} -DHAVE_64BIT_SIZE_T" + if test "x${OCC}" = "xyes"; then + FLAGS="${FLAGS} -D_OCC64" + fi fi fi