From d27f6c2f35a46b63c75a5b03136297a5c9b45f30 Mon Sep 17 00:00:00 2001 From: Eric Bechet <eric.bechet@ulg.ac.be> Date: Mon, 30 Nov 2015 15:19:55 +0000 Subject: [PATCH] Thinlayerfismeshplugin needs mesh to compile --- Plugin/ThinLayerFixMesh.cpp | 80 +++++++++++++++++++++++-------------- Plugin/ThinLayerFixMesh.h | 7 ++++ 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/Plugin/ThinLayerFixMesh.cpp b/Plugin/ThinLayerFixMesh.cpp index fc13bc63e5..7a8b786b48 100644 --- a/Plugin/ThinLayerFixMesh.cpp +++ b/Plugin/ThinLayerFixMesh.cpp @@ -9,10 +9,49 @@ #include "GModel.h" #include "robustPredicates.h" #include "GRegion.h" +#if defined(HAVE_MESH) #include "meshGFaceDelaunayInsertion.h" +#endif + //#include "meshGFace.h" +extern "C" +{ + GMSH_Plugin *GMSH_RegisterThinLayerFixMeshPlugin() + { + return new GMSH_ThinLayerFixMeshPlugin(); + } +} +StringXNumber ThingLayerFixMeshOptions_Number[] = { +// {GMSH_FULLRC, "Dimension", NULL, 1.}, +// {GMSH_FULLRC, "PhysicalGroup", NULL, 1.}, +// {GMSH_FULLRC, "OpenBoundaryPhysicalGroup", NULL, 0.}, +}; + + + +//GMSH_ThinLayerFixMeshPlugin::GMSH_ThinLayerFixMeshPlugin(){} + +//GMSH_ThinLayerFixMeshPlugin::~GMSH_ThinLayerFixMeshPlugin(){} + +std::string GMSH_ThinLayerFixMeshPlugin::getHelp() const +{ + return "Fix the mesh in thin parts"; +} + +int GMSH_ThinLayerFixMeshPlugin::getNbOptions() const +{ + return sizeof(ThingLayerFixMeshOptions_Number) / sizeof(StringXNumber); +} + +StringXNumber *GMSH_ThinLayerFixMeshPlugin::getOption(int iopt) +{ + return &ThingLayerFixMeshOptions_Number[iopt]; +} + + +#if defined(HAVE_MESH) CorrespVerticesFixMesh::CorrespVerticesFixMesh(){ // std::cout<<"started init CorrespVerticesFixMesh"<<std::endl; @@ -115,38 +154,7 @@ int CorrespVerticesFixMesh::getTagMaster(){ return tagMaster; } -StringXNumber ThingLayerFixMeshOptions_Number[] = { -// {GMSH_FULLRC, "Dimension", NULL, 1.}, -// {GMSH_FULLRC, "PhysicalGroup", NULL, 1.}, -// {GMSH_FULLRC, "OpenBoundaryPhysicalGroup", NULL, 0.}, -}; - -extern "C" -{ - GMSH_Plugin *GMSH_RegisterThinLayerFixMeshPlugin() - { - return new GMSH_ThinLayerFixMeshPlugin(); - } -} - -//GMSH_ThinLayerFixMeshPlugin::GMSH_ThinLayerFixMeshPlugin(){} - -//GMSH_ThinLayerFixMeshPlugin::~GMSH_ThinLayerFixMeshPlugin(){} - -std::string GMSH_ThinLayerFixMeshPlugin::getHelp() const -{ - return "Fix the mesh in thin parts"; -} -int GMSH_ThinLayerFixMeshPlugin::getNbOptions() const -{ - return sizeof(ThingLayerFixMeshOptions_Number) / sizeof(StringXNumber); -} - -StringXNumber *GMSH_ThinLayerFixMeshPlugin::getOption(int iopt) -{ - return &ThingLayerFixMeshOptions_Number[iopt]; -} PView *GMSH_ThinLayerFixMeshPlugin::execute(PView *view) { @@ -1160,3 +1168,13 @@ std::map<MTetrahedron*,MTet4*> GMSH_ThinLayerFixMeshPlugin::TetToTet4; std::map<MVertex*,std::vector<CorrespVerticesFixMesh*> > GMSH_ThinLayerFixMeshPlugin::VertexToCorresp; std::vector<std::vector<CorrespVerticesFixMesh*> > GMSH_ThinLayerFixMeshPlugin::vecOfThinSheets; + +#else + +PView *GMSH_ThinLayerFixMeshPlugin::execute(PView *view) +{ + Msg::Error("Plugin(ThinLayerFixMesh requires mesh module"); + return view; +} + +#endif \ No newline at end of file diff --git a/Plugin/ThinLayerFixMesh.h b/Plugin/ThinLayerFixMesh.h index ad41218924..0832837368 100644 --- a/Plugin/ThinLayerFixMesh.h +++ b/Plugin/ThinLayerFixMesh.h @@ -11,13 +11,17 @@ #include "Plugin.h" #include "MVertex.h" #include "MTriangle.h" +#if defined(HAVE_MESH) #include "meshGRegionDelaunayInsertion.h" +#endif + extern "C" { GMSH_Plugin *GMSH_RegisterThinLayerFixMeshPlugin(); } +#if defined(HAVE_MESH) static int faces[4][3] = {{0,1,2}, {0,2,3}, {0,3,1}, {1,3,2}}; struct faceXtetFM{ @@ -134,6 +138,7 @@ public: bool getIsMaster(); int getTagMaster(); }; +#endif class GMSH_ThinLayerFixMeshPlugin : public GMSH_PostPlugin { @@ -150,6 +155,7 @@ public: int getNbOptions() const; StringXNumber* getOption(int iopt); PView *execute(PView *); +#if defined(HAVE_MESH) static void perform(); static void checkOppositeTriangles(); static void fillvecOfThinSheets(); @@ -170,6 +176,7 @@ public: static const double distP2PMax = 5.0; static void fillVertexToTets(); static void fillTetToTet4(); +#endif }; -- GitLab