diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b2c49df3e7da54ee97c115e49ff9bcd376725d..2c0e056389c03ff10355c74e56f845681fb7acf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,9 +112,9 @@ if(MSVC) set(GMSH_CONFIG_PRAGMAS "#pragma warning(disable:4800)") endif(MSVC) -macro(append_gmsh_src DIRECTORY_NAME SRC_FILES) - foreach(FILE ${SRC_FILES}) - list(APPEND LIST ${DIRECTORY_NAME}/${FILE}) +macro(append_gmsh_src DIRNAME FILES) + foreach(FILE ${FILES}) + list(APPEND LIST ${DIRNAME}/${FILE}) endforeach(FILE) set(GMSH_SRC ${GMSH_SRC};${LIST} PARENT_SCOPE) endmacro(append_gmsh_src) @@ -625,7 +625,7 @@ include_directories(Common Fltk Geo Graphics Mesh Numeric Parser Plugin contrib/Tetgen contrib/Fl_Tree contrib/gmm contrib/kbipack ${EXTERNAL_INCLUDES} ${CMAKE_BINARY_DIR}/Common) -# static lib target: we don't build it by default (we could then +# static library target: we don't build it by default (we could then # create the gmsh target by linking with it) because doing so slows # down the compile/link development a lot: running ranlib+ar on a # large static lib every time we recompile is frustratingly @@ -642,13 +642,21 @@ if(MSVC) endif(ENABLE_OOFELIE) endif(MSVC) -# shared lib target: we don't build it by default either +# shared library target: we don't build it by default either add_library(shared SHARED EXCLUDE_FROM_ALL ${GMSH_SRC}) set_target_properties(shared PROPERTIES OUTPUT_NAME Gmsh) if(HAVE_LAPACK AND LAPACK_FLAGS) set_target_properties(shared PROPERTIES LINK_FLAGS ${LAPACK_FLAGS}) endif(HAVE_LAPACK AND LAPACK_FLAGS) -target_link_libraries(shared ${EXTERNAL_LIBRARIES} ${LAPACK_LIBRARIES}) +if(HAVE_FLTK) + target_link_libraries(shared ${FLTK_LIBRARIES} ${EXTERNAL_LIBRARIES} + ${OPENGL_LIBRARIES} ${LAPACK_LIBRARIES}) +elseif(ENABLE_GRAPHICS) + target_link_libraries(shared ${EXTERNAL_LIBRARIES} ${OPENGL_LIBRARIES} + ${LAPACK_LIBRARIES}) +else(HAVE_FLTK) + target_link_libraries(shared ${EXTERNAL_LIBRARIES} ${LAPACK_LIBRARIES}) +endif(HAVE_FLTK) # binary targets if(HAVE_FLTK) @@ -776,10 +784,12 @@ endif(TEXI2PDF) if(MAKEINFO AND TEXI2PDF) add_custom_target(doc COMMAND ${CMAKE_COMMAND} -E tar zcf ${CMAKE_BINARY_DIR}/gmsh-${GMSH_VERSION}-doc.tgz - FAQ.txt CREDITS.txt VERSIONS.txt gmsh.1 - texinfo/gmsh.info texinfo/gmsh.txt texinfo/gmsh.html - texinfo/gmsh.pdf DEPENDS ${TEX_DIR}/gmsh.info - ${TEX_DIR}/gmsh.txt ${TEX_DIR}/gmsh.html ${TEX_DIR}/gmsh.pdf + CREDITS.txt FAQ.txt LICENSE.txt VERSIONS.txt gmsh.1 + texinfo/gmsh.html texinfo/gmsh.info texinfo/gmsh.pdf + texinfo/gmsh.txt + COMMAND ${CMAKE_COMMAND} -E remove ${TEX_OBJ} + DEPENDS ${TEX_DIR}/gmsh.info ${TEX_DIR}/gmsh.txt + ${TEX_DIR}/gmsh.html ${TEX_DIR}/gmsh.pdf WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doc) endif(MAKEINFO AND TEXI2PDF) @@ -857,7 +867,5 @@ message("") message("Run 'ccmake ${CMAKE_SOURCE_DIR}' to fine-tune the configuration.") message("") -mark_as_advanced(BISON ENABLE_GRAPHICS FLEX GMP_LIB GMSH_EXTRA_VERSION - HDF5_LIB LIBGUIDE MAKEINFO MED_LIB MKL_C MKL_CORE MKL_INTEL_C - MKL_INTEL_THREAD OCC_INC REF_BLAS REF_G2C REF_GCC REF_LAPACK - SZ_LIB TAUCS_LIB TEXI2PDF) +mark_as_advanced(BISON FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO + MED_LIB OCC_INC SZ_LIB TAUCS_LIB TEXI2PDF) diff --git a/Geo/GEdgeCompound.h b/Geo/GEdgeCompound.h index fe31fff1126737aaf986b96f406008b4d5a74b76..ea5476df7f9bb20a1ec765c72a9e9663cfca245f 100644 --- a/Geo/GEdgeCompound.h +++ b/Geo/GEdgeCompound.h @@ -16,9 +16,9 @@ class GEdgeCompound : public GEdge { std::vector<GEdge*> _compound; std::vector<int> _orientation; std::vector<double> _pars; - void parametrize() ; - void orderEdges() ; -public: + void parametrize(); + void orderEdges(); + public: void getLocalParameter(const double &t, int &iEdge, double & tLoc) const; void getCompoundParameter(GEdge *ge, const double &tLoc, double &t) const; GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound); diff --git a/Geo/GFace.h b/Geo/GFace.h index 7bfaeaec820653e15cebc02eb8cb72aab6621532..ac78c14bdb69a681b0f4b2bf2d2110b9cffbc4b1 100644 --- a/Geo/GFace.h +++ b/Geo/GFace.h @@ -122,7 +122,7 @@ class GFace : public GEntity // geometry and the mesh. Both approaches should give the same result ;-) // by default, genus is ZERO int poincareMesh (); - int genusMesh () {return (poincareMesh() + edgeLoops.size() - 2)/2;} + int genusMesh () { return (poincareMesh() + edgeLoops.size() - 2) / 2; } virtual int genusGeom (); // return the point on the face corresponding to the given parameter @@ -229,7 +229,6 @@ class GFace : public GEntity void setCompound(GFaceCompound *gfc) { compound = gfc; } GFaceCompound *getCompound() const { return compound; } - struct { // do we recombine the triangles of the mesh? int recombine; diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 70fbd7346a529b3628ff408322d756d1ab922290..3ed8303ef171e68693929c573f1d2788fe776f80 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -176,10 +176,11 @@ static void myPolygon(std::vector<MElement*> &vTri, std::vector<MVertex*> &vPoly } -bool GFaceCompound::trivial() const { - if (_compound.size() == 1 && - (*(_compound.begin()))->getNativeType()==GEntity::OpenCascadeModel && - (*(_compound.begin()))->geomType() != GEntity::DiscreteSurface ){ +bool GFaceCompound::trivial() const +{ + if(_compound.size() == 1 && + (*(_compound.begin()))->getNativeType() == GEntity::OpenCascadeModel && + (*(_compound.begin()))->geomType() != GEntity::DiscreteSurface){ return true; } return false; diff --git a/Geo/GFaceCompound.h b/Geo/GFaceCompound.h index e7c58505e580f774f28ede73fa650b446e4f2660..376c9cabae1de7e098821a92ae2ccc1c5e6de807 100644 --- a/Geo/GFaceCompound.h +++ b/Geo/GFaceCompound.h @@ -75,12 +75,9 @@ class GFaceCompound : public GFace { bool trivial() const ; public: typedef enum {UNITCIRCLE, SQUARE} typeOfIsomorphism; - GFaceCompound(GModel *m, int tag, - std::list<GFace*> &compound, - std::list<GEdge*> &U0, - std::list<GEdge*> &U1, - std::list<GEdge*> &V0, - std::list<GEdge*> &V1); + GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, + std::list<GEdge*> &U0, std::list<GEdge*> &U1, + std::list<GEdge*> &V0, std::list<GEdge*> &V1); virtual ~GFaceCompound(); Range<double> parBounds(int i) const { return trivial() ? (*(_compound.begin()))->parBounds(i) : Range<double>(-1, 1); } diff --git a/Geo/GPoint.h b/Geo/GPoint.h index 070f98b850c3a85c3d669f68e47ff0273c787922..6b3a5ac5428afb4811f063619e861d5a6866ae15 100644 --- a/Geo/GPoint.h +++ b/Geo/GPoint.h @@ -52,13 +52,8 @@ class GPoint double dz = Z - p.z(); return sqrt(dx * dx + dy * dy + dz * dz); } - bool succeeded () const{ - return success; - } - bool setNoSuccess (){ - success = false; - return success; - } + bool succeeded() const{ return success; } + bool setNoSuccess(){ success = false; return success; } }; #endif diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp index bc5c520d3d62fb08dec9cbf96a1364162a511f72..d9522cb04d21fecb8ca16993b2b5c4838959d996 100644 --- a/Geo/GeoInterpolation.cpp +++ b/Geo/GeoInterpolation.cpp @@ -592,7 +592,7 @@ static Vertex InterpolateExtrudedSurface(Surface *s, double u, double v) Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v) { - if( derivee == 1 ) { + if(derivee == 1) { double eps = 1.e-6; Vertex D[4]; if(u_v == 1) { @@ -619,8 +619,7 @@ Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v) (D[1].Pos.Y - D[0].Pos.Y) / eps, (D[1].Pos.Z - D[0].Pos.Z) / eps); } - - else if ( derivee == 2 ) { + else if (derivee == 2) { double eps = 1.e-6; Vertex D[2]; if(u_v == 1) { // dudu @@ -689,4 +688,3 @@ Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v) return Vertex(0., 0., 0.); } } - diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp index 6328fd9f86b65a135cdf9b76b02385c4bd33d114..4afead0bbe50bbcf9ae8e271d521e36186e2676d 100644 --- a/Geo/GeomMeshMatcher.cpp +++ b/Geo/GeomMeshMatcher.cpp @@ -43,16 +43,17 @@ template <class T> void removeDuplicates(std::list<T>& L, std::list<T>& res) } } -//----------------------------------------------------------------------------- - -template <class T> void getIntersection(std::vector<T>& res, std::vector<std::list<T> >& lists) +template <class T> void getIntersection(std::vector<T>& res, + std::vector<std::list<T> >& lists) { res.clear(); std::list<T> first_list = lists[0]; - for (typename std::list<T>::iterator item = first_list.begin(); item != first_list.end(); item++) { + for (typename std::list<T>::iterator item = first_list.begin(); + item != first_list.end(); item++) { bool found = true; - for (typename std::vector<std::list<T> >::iterator list_iter = lists.begin(); list_iter != lists.end(); list_iter++) { + for (typename std::vector<std::list<T> >::iterator list_iter = lists.begin(); + list_iter != lists.end(); list_iter++) { if (find((*list_iter).begin(), (*list_iter).end(), (*item)) == (*list_iter).end()) { found = false; break; @@ -64,11 +65,10 @@ template <class T> void getIntersection(std::vector<T>& res, std::vector<std::li } } -//----------------------------------------------------------------------------- - template <class T> T findMatching(std::vector<Pair<T,T> >& matching, T& entity) { - for (typename std::vector<Pair<T,T> >::iterator pair = matching.begin(); pair != matching.end(); pair++) { + for (typename std::vector<Pair<T,T> >::iterator pair = matching.begin(); + pair != matching.end(); pair++) { if ( (*pair).left() == entity) { return((*pair).right()); } @@ -77,7 +77,8 @@ template <class T> T findMatching(std::vector<Pair<T,T> >& matching, T& entity) } // Private -std::vector<Pair<GVertex*,GVertex*> >* GeomMeshMatcher::matchVertices(GModel* m1, GModel *m2) +std::vector<Pair<GVertex*,GVertex*> >* +GeomMeshMatcher::matchVertices(GModel* m1, GModel *m2) { // Vector that will be returned. std::vector<Pair<GVertex*,GVertex*> >* coresp_v = new std::vector<Pair<GVertex*, @@ -131,7 +132,8 @@ std::vector<Pair<GVertex*,GVertex*> >* GeomMeshMatcher::matchVertices(GModel* m1 // geometrical one. coresp_v->push_back(Pair<GVertex*,GVertex*>((GVertex*) *entity1, (GVertex*) *entity2)); - ((GVertex*) *entity2)->setTag(((GVertex*) *entity1)->tag()); // TODO : Double-check this part... + // TODO : Double-check this part... + ((GVertex*) *entity2)->setTag(((GVertex*) *entity1)->tag()); num_matched_vertices++; break; } @@ -144,7 +146,9 @@ std::vector<Pair<GVertex*,GVertex*> >* GeomMeshMatcher::matchVertices(GModel* m1 return (coresp_v); } -std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GModel* m2, std::vector<Pair<GVertex*,GVertex*> >* coresp_v) +std::vector<Pair<GEdge*,GEdge*> >* +GeomMeshMatcher::matchEdges(GModel* m1, GModel* m2, + std::vector<Pair<GVertex*,GVertex*> >* coresp_v) { int num_matched_edges = 0; @@ -185,7 +189,8 @@ std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GMod common_edges[0]->setTag(((GEdge*) *entity1)->tag()); num_matched_edges++; } else { - // More than one edge between the two points ? No worries, let us use those bounding boxes ! + // More than one edge between the two points ? No worries, let + // us use those bounding boxes ! Msg::Info("There are %i edges that could match.",common_edges.size()); // So, first step is to build an array of points taken on the geo entity // Then, compute the minimal bounding box @@ -194,9 +199,11 @@ std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GMod GEdge* choice = 0; double best_score = DBL_MAX; // Next, let's iterate over the mesh entities. - for (std::vector<GEdge*>::iterator candidate = common_edges.begin(); candidate != common_edges.end(); candidate++) { + for (std::vector<GEdge*>::iterator candidate = common_edges.begin(); + candidate != common_edges.end(); candidate++) { SOrientedBoundingBox mesh_obb = (*candidate)->getOBB(); - Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); + Msg::Info("Comparing score : %f", + SOrientedBoundingBox::compare(geo_obb,mesh_obb)); //if (geo_obb->intersects(mesh_obb)) { @@ -212,7 +219,6 @@ std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GMod //double score4 = fabs(geo_obb->getSize()[2]-mesh_obb->getSize()[2]); double score = SOrientedBoundingBox::compare(geo_obb,mesh_obb); if (score < best_score) { - best_score = score; choice = (*candidate); } @@ -234,9 +240,10 @@ std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GMod } -std::vector<Pair<GFace*,GFace*> >* GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2, std::vector<Pair<GEdge*,GEdge*> >* coresp_e) +std::vector<Pair<GFace*,GFace*> >* +GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2, + std::vector<Pair<GEdge*,GEdge*> >* coresp_e) { - int num_matched_faces = 0; int num_total_faces = 0; @@ -256,7 +263,8 @@ std::vector<Pair<GFace*,GFace*> >* GeomMeshMatcher:: matchFaces(GModel* m1, GMod std::vector<std::list<GFace*> > lists; std::list<GEdge*> boundary_edges = ((GEdge*)(*entity1))->edges(); - for (std::list<GEdge*>::iterator boundary_edge = boundary_edges.begin(); boundary_edge != boundary_edges.end(); boundary_edge++) { + for (std::list<GEdge*>::iterator boundary_edge = boundary_edges.begin(); + boundary_edge != boundary_edges.end(); boundary_edge++) { lists.push_back(findMatching<GEdge*>(*coresp_e,*boundary_edge)->faces()); } std::vector<GFace*> common_faces; @@ -275,7 +283,8 @@ std::vector<Pair<GFace*,GFace*> >* GeomMeshMatcher:: matchFaces(GModel* m1, GMod GFace* choice = 0; double best_score = DBL_MAX; // Next, let's iterate over the mesh entities. - for (std::vector<GFace*>::iterator candidate = common_faces.begin(); candidate != common_faces.end(); candidate++) { + for (std::vector<GFace*>::iterator candidate = common_faces.begin(); + candidate != common_faces.end(); candidate++) { SOrientedBoundingBox mesh_obb = (*candidate)->getOBB(); Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); @@ -309,9 +318,9 @@ std::vector<Pair<GFace*,GFace*> >* GeomMeshMatcher:: matchFaces(GModel* m1, GMod } - - -std::vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1, GModel* m2, std::vector<Pair<GFace*,GFace*> >* coresp_f) +std::vector<Pair<GRegion*,GRegion*> >* +GeomMeshMatcher::matchRegions(GModel* m1, GModel* m2, + std::vector<Pair<GFace*,GFace*> >* coresp_f) { int num_matched_regions = 0; int num_total_regions = 0; @@ -330,13 +339,13 @@ std::vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1 if ((*entity1)->dim() != 3) continue; num_total_regions++; - //std::vector<list<GRegion*> > lists; std::list<GFace*> boundary_faces = ((GFace*)(*entity1))->faces(); std::list<GFace*> coresp_bound_faces; std::vector<GRegion*> common_regions; - for (std::list<GFace*>::iterator boundary_face = boundary_faces.begin(); boundary_face != boundary_faces.end(); boundary_face++) { + for (std::list<GFace*>::iterator boundary_face = boundary_faces.begin(); + boundary_face != boundary_faces.end(); boundary_face++) { coresp_bound_faces.push_back(findMatching<GFace*>(*coresp_f,*boundary_face)); } for (std::vector<GEntity*>::iterator entity2 = m2_entities.begin(); @@ -356,7 +365,7 @@ std::vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1 } if (common_regions.size() == 1) { - coresp_r->push_back( Pair<GRegion*,GRegion*> ((GRegion*) *entity1, common_regions[0])); + coresp_r->push_back(Pair<GRegion*,GRegion*> ((GRegion*) *entity1, common_regions[0])); common_regions[0]->setTag(((GRegion*) *entity1)->tag()); num_matched_regions++; } else if (common_regions.size() > 1) { @@ -374,10 +383,12 @@ std::vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1 GRegion* choice = 0; double best_score = DBL_MAX; // Next, let's iterate over the mesh entities. - for (std::vector<GRegion*>::iterator candidate = common_regions.begin(); candidate != common_regions.end(); candidate++) { + for (std::vector<GRegion*>::iterator candidate = common_regions.begin(); + candidate != common_regions.end(); candidate++) { // Again, build an array with the vertices. SOrientedBoundingBox mesh_obb = (*candidate)->getOBB(); - Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); + Msg::Info("Comparing score : %f", + SOrientedBoundingBox::compare(geo_obb,mesh_obb)); if (geo_obb.intersects(mesh_obb)) { double cen_dist1 = geo_obb.getCenter()[0]-mesh_obb.getCenter()[0]; @@ -410,7 +421,6 @@ std::vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1 } - // Public GeomMeshMatcher* GeomMeshMatcher::instance() { diff --git a/Mesh/BDS.h b/Mesh/BDS.h index 57df6f50b2dc6701430dff559a169a818e8a700e..c4a6297141fe168e7449a27669eebcc95f53687d 100644 --- a/Mesh/BDS.h +++ b/Mesh/BDS.h @@ -211,7 +211,7 @@ class BDS_Edge } inline BDS_Face * otherFace(const BDS_Face *f) const { - if(numfaces()!=2) { + if(numfaces() != 2) { Msg::Fatal("otherFace wrong, ony %d faces attached to edge %d %d", numfaces(), p1->iD, p2->iD); return 0; diff --git a/Mesh/BackgroundMesh.h b/Mesh/BackgroundMesh.h index a4d03c3400c65c01aa1409ff10d996927a8aa6bd..2ad6f7faad43082e618af99d28fab403d45ffa8f 100644 --- a/Mesh/BackgroundMesh.h +++ b/Mesh/BackgroundMesh.h @@ -5,8 +5,11 @@ #ifndef _BACKGROUND_MESH_H_ #define _BACKGROUND_MESH_H_ + #include "STensor3.h" + class GEntity; + double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double Z); SMetric3 BGM_MeshMetric(GEntity *ge, double U, double V, double X, double Y, double Z); bool Extend1dMeshIn2dSurfaces(); diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp index e8917bba337d4c103aa28449b5bcb56ed75c49eb..8fa38bb91ab7964789289e115ec258520a2c80c0 100644 --- a/Mesh/HighOrder.cpp +++ b/Mesh/HighOrder.cpp @@ -701,16 +701,13 @@ static void setHighOrder(GEdge *ge, edgeContainer &edgeVertices, bool linear, ge->deleteVertexArrays(); } -MTriangle* setHighOrder(MTriangle *t, - GFace *gf, +MTriangle* setHighOrder(MTriangle *t, GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices, - bool linear, - bool incomplete, - int nPts, + bool linear, bool incomplete, int nPts, gmshHighOrderSmoother *displ2D, - gmshHighOrderSmoother *displ3D){ - + gmshHighOrderSmoother *displ3D) +{ std::vector<MVertex*> ve, vf; getEdgeVertices(gf, t, ve, edgeVertices, linear, nPts, displ2D, displ3D); if(nPts == 1){ @@ -723,16 +720,16 @@ MTriangle* setHighOrder(MTriangle *t, ve, nPts + 1); } else{ - // MTriangleN incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2), - // ve, nPts + 1); if (displ2D && gf->geomType() == GEntity::Plane){ MTriangle incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2)); - getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); + getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, + displ3D); } else{ - MTriangleN incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2), - ve, nPts + 1); - getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); + MTriangleN incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2), + ve, nPts + 1); + getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, + displ3D); } ve.insert(ve.end(), vf.begin(), vf.end()); return new MTriangleN(t->getVertex(0), t->getVertex(1), t->getVertex(2), @@ -741,7 +738,6 @@ MTriangle* setHighOrder(MTriangle *t, } } - static void setHighOrder(GFace *gf, edgeContainer &edgeVertices, faceContainer &faceVertices, bool linear, bool incomplete, int nPts = 1, gmshHighOrderSmoother *displ2D = 0, @@ -956,7 +952,8 @@ void SetOrder1(GModel *m) removeHighOrderVertices(*it); } -static void checkHighOrderTriangles(const char* cc, GModel *m, std::vector<MElement*> &bad, double &minJGlob) +static void checkHighOrderTriangles(const char* cc, GModel *m, + std::vector<MElement*> &bad, double &minJGlob) { bad.clear(); minJGlob = 1.0; @@ -976,12 +973,17 @@ static void checkHighOrderTriangles(const char* cc, GModel *m, std::vector<MElem else if (disto < 0.2) nbfair++; } } - if (minJGlob > 0) Msg::Info("%s : Worst Triangle Smoothness %g Gamma %g NbFair = %d", cc,minJGlob, minGGlob,nbfair ); - else Msg::Warning("%s : Worst Triangle Smoothness %g (%d negative jacobians) Worst Gamma %g Avg Smoothness %g",cc, minJGlob, bad.size(),minGGlob,avg/(count?count:1)); + if (minJGlob > 0) + Msg::Info("%s : Worst Triangle Smoothness %g Gamma %g NbFair = %d", + cc, minJGlob, minGGlob,nbfair ); + else + Msg::Warning("%s : Worst Triangle Smoothness %g (%d negative jacobians) " + "Worst Gamma %g Avg Smoothness %g", cc, minJGlob, bad.size(), + minGGlob, avg / (count ? count : 1)); } - -static void checkHighOrderTetrahedron(const char* cc,GModel *m, std::vector<MElement*> &bad, double &minJGlob) +static void checkHighOrderTetrahedron(const char* cc, GModel *m, + std::vector<MElement*> &bad, double &minJGlob) { bad.clear(); minJGlob = 1.0; @@ -1001,11 +1003,15 @@ static void checkHighOrderTetrahedron(const char* cc,GModel *m, std::vector<MEle else if (disto < 0.2) nbfair++; } } - if (minJGlob > 0) Msg::Info("%s : Worst Tetrahedron Smoothness %g Gamma %g NbFair = %d", cc, minJGlob, minGGlob,nbfair ); - else Msg::Warning("%s : Worst Tetrahedron Smoothness %g (%d negative jacobians) Worst Gamma %g Avg Smoothness %g", cc, minJGlob, bad.size(),minGGlob,avg/(count?count:1)); + if (minJGlob > 0) + Msg::Info("%s : Worst Tetrahedron Smoothness %g Gamma %g NbFair = %d", + cc, minJGlob, minGGlob, nbfair); + else + Msg::Warning("%s : Worst Tetrahedron Smoothness %g (%d negative jacobians) " + "Worst Gamma %g Avg Smoothness %g", cc, minJGlob, bad.size(), + minGGlob, avg / (count ? count : 1)); } - extern double mesh_functional_distorsion(MTriangle *t, double u, double v); static void printJacobians(GModel *m, const char *nm)