From: Afeef Date: Wed, 6 Jul 2022 12:19:21 +0000 (+0200) Subject: New Quasi-structured Quad Algorithm X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eee537e6b62fa5907f0518ff4f8a134fb80f89b1;p=plugins%2Fgmshplugin.git New Quasi-structured Quad Algorithm New algorithm fo quad meshing from Gmsh --- diff --git a/src/GMSHPlugin/GMSHPlugin_Hypothesis.hxx b/src/GMSHPlugin/GMSHPlugin_Hypothesis.hxx index 51a485f..d5c38fb 100644 --- a/src/GMSHPlugin/GMSHPlugin_Hypothesis.hxx +++ b/src/GMSHPlugin/GMSHPlugin_Hypothesis.hxx @@ -45,7 +45,12 @@ public: delaunay, frontal, delaunayforquad, +#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10 + packingparallelograms, + quadqs +#else packingparallelograms +#endif }; void Set2DAlgo(Algo2D the2DAlgo); diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx index 2ef4d4f..23aa4d9 100644 --- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx @@ -218,9 +218,9 @@ void GMSHPlugin_Mesher::SetParameters(const GMSHPlugin_Hypothesis* hyp) void GMSHPlugin_Mesher::SetMaxThreadsGmsh() { MESSAGE("GMSHPlugin_Mesher::SetMaxThreadsGmsh"); - // compound meshing (_compounds.size() > 0) and quad meshing (_algo2d == 5) will + // compound meshing (_compounds.size() > 0) and quad meshing (_algo2d >= 5) will // not be multi-threaded - if (_compounds.size() > 0 || _algo2d == 5){ + if (_compounds.size() > 0 || _algo2d >= 5){ _maxThreads = 1; } else @@ -261,6 +261,9 @@ void GMSHPlugin_Mesher::SetGmshOptions() mapAlgo2d[3]=6; // Frontal-Delaunay mapAlgo2d[4]=8; // DelQuad (Frontal-Delaunay for Quads) mapAlgo2d[5]=9; // Packing of parallelograms +#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10 + mapAlgo2d[6]=11;// Quasistructured quads with cross-fields +#endif std::map mapAlgo3d; mapAlgo3d[0]=1; // Delaunay diff --git a/src/GUI/GMSHPluginGUI_HypothesisCreator.cxx b/src/GUI/GMSHPluginGUI_HypothesisCreator.cxx index 5f850f0..a048c16 100644 --- a/src/GUI/GMSHPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GMSHPluginGUI_HypothesisCreator.cxx @@ -53,7 +53,12 @@ enum Algo2D delaunay, frontal, delaunayforquad, +#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10 + packingparallelograms, + quadqs +#else packingparallelograms +#endif }; enum Algo3D @@ -61,7 +66,8 @@ enum Algo2D delaunay3, frontal3, mmg3d, - rtree + rtree, + hxt }; #if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8 @@ -158,8 +164,17 @@ QFrame* GMSHPluginGUI_HypothesisCreator::buildFrame() aGroupLayout->addWidget( new QLabel( tr( "GMSH_2D_ALGO" ), GroupC1 ), row, 0 ); my2DAlgo = new QComboBox( GroupC1 ); QStringList types2DAlgo; - types2DAlgo << tr( "GMSH_AUTOMATIC" ) << tr( "GMSH_MESH_ADAPT" ) << tr( "GMSH_DELAUNAY" ) << - tr( "GMSH_FRONTAL" ) << tr( "GMSH_DELAUNAY_FOR_QUAD" ) << tr( "GMSH_PACKING_OF_PARALLELOGRAMS" ); + types2DAlgo << tr( "GMSH_AUTOMATIC" ) + << tr( "GMSH_MESH_ADAPT" ) + << tr( "GMSH_DELAUNAY" ) + << tr( "GMSH_FRONTAL" ) + << tr( "GMSH_DELAUNAY_FOR_QUAD" ) +#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10 + << tr( "GMSH_PACKING_OF_PARALLELOGRAMS" ) + << tr( "GMSH_QUASI_STRUCTURED_QUAD" ); +#else + << tr( "GMSH_PACKING_OF_PARALLELOGRAMS" ); +#endif my2DAlgo->addItems( types2DAlgo ); aGroupLayout->addWidget( my2DAlgo, row, 1 ); row++; diff --git a/src/GUI/GMSHPlugin_msg_en.ts b/src/GUI/GMSHPlugin_msg_en.ts index 75efd4d..167f7ec 100644 --- a/src/GUI/GMSHPlugin_msg_en.ts +++ b/src/GUI/GMSHPlugin_msg_en.ts @@ -65,7 +65,7 @@ GMSH_MESH_ADAPT - Mesh adapt + MeshAdapt GMSH_DELAUNAY @@ -73,11 +73,15 @@ GMSH_FRONTAL - Frontal + Frontal-Delaunay GMSH_DELAUNAY_FOR_QUAD - Delaunay for quads + Frontal-Delaunay for Quads + + + GMSH_QUASI_STRUCTURED_QUAD + Quasi-Structured Quad GMSH_PACKING_OF_PARALLELOGRAMS diff --git a/src/GUI/GMSHPlugin_msg_fr.ts b/src/GUI/GMSHPlugin_msg_fr.ts index 656cb48..aba7088 100644 --- a/src/GUI/GMSHPlugin_msg_fr.ts +++ b/src/GUI/GMSHPlugin_msg_fr.ts @@ -83,6 +83,10 @@ GMSH_DELAUNAY_FOR_QUAD Delaunay pour quads + + GMSH_QUASI_STRUCTURED_QUAD + Quadrangles quasi-structuré + GMSH_PACKING_OF_PARALLELOGRAMS Remplissage de parallélogrammes