]> SALOME platform Git repositories - plugins/gmshplugin.git/commitdiff
Salome HOME
New Quasi-structured Quad Algorithm
authorAfeef <afeef.badri@gmail.com>
Wed, 6 Jul 2022 12:19:21 +0000 (14:19 +0200)
committerAfeef <afeef.badri@gmail.com>
Wed, 6 Jul 2022 12:19:21 +0000 (14:19 +0200)
New algorithm fo quad meshing from Gmsh

src/GMSHPlugin/GMSHPlugin_Hypothesis.hxx
src/GMSHPlugin/GMSHPlugin_Mesher.cxx
src/GUI/GMSHPluginGUI_HypothesisCreator.cxx
src/GUI/GMSHPlugin_msg_en.ts
src/GUI/GMSHPlugin_msg_fr.ts

index 51a485f78f274003fdb75b6dc3c278124b5f2324..d5c38fbb12de01dca5cc1f9787155e9e6d9028f9 100644 (file)
@@ -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);
index 2ef4d4f9138b3ee6767e912cea28a2edbeab1150..23aa4d9b3395ee6461baeccb8be230e2af8aa07d 100644 (file)
@@ -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 <int,double> mapAlgo3d;
   mapAlgo3d[0]=1; // Delaunay
index 5f850f08114ef79821910a0607bfdc8139c808d8..a048c1656920e7ab4650863175af2e665306ef35 100644 (file)
@@ -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++;
index 75efd4d541d2581e1c21ce51955f9b8beb350efd..167f7ec83fa06f635be105ccf81c7b6732e184a6 100644 (file)
@@ -65,7 +65,7 @@
     </message>
     <message>
         <source>GMSH_MESH_ADAPT</source>
-        <translation>Mesh adapt</translation>
+        <translation>MeshAdapt</translation>
     </message>
     <message>
         <source>GMSH_DELAUNAY</source>
     </message>
     <message>
         <source>GMSH_FRONTAL</source>
-        <translation>Frontal</translation>
+        <translation>Frontal-Delaunay</translation>
     </message>
     <message>
         <source>GMSH_DELAUNAY_FOR_QUAD</source>
-        <translation>Delaunay for quads</translation>
+        <translation>Frontal-Delaunay for Quads</translation>
+    </message>
+    <message>
+        <source>GMSH_QUASI_STRUCTURED_QUAD</source>
+        <translation>Quasi-Structured Quad</translation>
     </message>
     <message>
         <source>GMSH_PACKING_OF_PARALLELOGRAMS</source>
index 656cb48137af94f0790df62b784cc7bbe3844812..aba708808b5fc9635d16f14c884a6e84f7cb2308 100644 (file)
         <source>GMSH_DELAUNAY_FOR_QUAD</source>
         <translation>Delaunay pour quads</translation>
     </message>
+    <message>
+        <source>GMSH_QUASI_STRUCTURED_QUAD</source>
+        <translation>Quadrangles quasi-structuré</translation>
+    </message>
     <message>
         <source>GMSH_PACKING_OF_PARALLELOGRAMS</source>
         <translation>Remplissage de parallélogrammes</translation>