]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Les préférences pour MG-Adapt
authorGérald NICOLAS <gerald.nicolas@edf.fr>
Wed, 10 Jun 2020 09:22:21 +0000 (11:22 +0200)
committerGérald NICOLAS <gerald.nicolas@edf.fr>
Wed, 10 Jun 2020 09:22:21 +0000 (11:22 +0200)
resources/SalomeApp.xml.in
src/ADAPT_I/ADAPT_Gen_i.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_AdaptDlg.cxx
src/SMESHGUI/SMESH_msg_en.ts
src/SMESHGUI/SMESH_msg_fr.ts

index 3c928f1d70a1af69ff3121edb408be36e58cdfe1..8009476ad8fe33d6eea4d7c272887256610e77da 100644 (file)
     <parameter name="selection_increment"          value="0"  />
     <parameter name="controls_increment"           value="2"  />
     <!-- Adaptation -->
-    <parameter name="publish_mesh_in"              value="false"  />
-    <parameter name="publish_mesh_out"             value="false"  />
-    <parameter name="yacs_max_iter"                value="0"  />
-    <parameter name="yacs_max_node"                value="0"  />
-    <parameter name="yacs_max_elem"                value="0"  />
-    <parameter name="yacs_type_test"               value="None"  />
+    <parameter name="homard_publish_mesh_in"       value="false"  />
+    <parameter name="homard_publish_mesh_out"      value="false"  />
+    <parameter name="homard_yacs_max_iter"         value="0"  />
+    <parameter name="homard_yacs_max_node"         value="0"  />
+    <parameter name="homard_yacs_max_elem"         value="0"  />
+    <parameter name="homard_yacs_type_test"        value="None"  />
+    <parameter name="mg_adapt_file_mesh_out"       value="true"  />
+    <parameter name="mg_adapt_publish_mesh_out"    value="false"  />
+    <parameter name="mg_adapt_size_map"            value="Local"  />
+    <parameter name="mg_adapt_time_step"           value="None"  />
   </section>
   <section name="smesh_help" >
     <parameter name="User's Guide/Mesh module/User's Guide"      value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/index.html;;http://docs.salome-platform.org/latest/gui/SMESH/index.html"/>
index 6b055fd62b63f49bdcadd5dba9dddb80b7a3f416..eb58aeee302435622a918c675c0169e81417f465 100644 (file)
@@ -5317,13 +5317,13 @@ void ADAPT_Gen_i::SetPreferences( )
           {
             std::istringstream chainebis( chaine ) ;
             // 3.2.1. Les publications
-            if ( chaine2 == "publish_mesh_in" )  { chainebis >> PublisMeshIN ; }
-            if ( chaine2 == "publish_mesh_out" ) { chainebis >> PublisMeshOUT ; }
+            if ( chaine2 == "homard_publish_mesh_in" )  { chainebis >> PublisMeshIN ; }
+            if ( chaine2 == "homard_publish_mesh_out" ) { chainebis >> PublisMeshOUT ; }
             // 3.2.2. Les maximum pour YACS
-            if ( chaine2 == "yacs_max_iter" ) { chainebis >> YACSMaxIter ; }
-            if ( chaine2 == "yacs_max_node" ) { chainebis >> YACSMaxNode ; }
-            if ( chaine2 == "yacs_max_elem" ) { chainebis >> YACSMaxElem ; }
-            if ( chaine2 == "yacs_type_test" ) { YACSTypeTestchaine = chaine ; }
+            if ( chaine2 == "homard_yacs_max_iter" ) { chainebis >> YACSMaxIter ; }
+            if ( chaine2 == "homard_yacs_max_node" ) { chainebis >> YACSMaxNode ; }
+            if ( chaine2 == "homard_yacs_max_elem" ) { chainebis >> YACSMaxElem ; }
+            if ( chaine2 == "homard_yacs_type_test" ) { YACSTypeTestchaine = chaine ; }
           }
         }
       }
index c653ff1ac9c1060471347a82556c036c50ce6c9a..5056902dd93b4331bcd13c5bd6a4a081a67976d9 100644 (file)
@@ -5763,33 +5763,50 @@ void SMESHGUI::createPreferences()
   int adaptTab = addPreference( tr( "ADAPT_PREF_TAB_GENERAL" ) );
   int bloc, pref ;
   // Refinement with HOMARD
-  bloc = addPreference( tr( "ADAPT_PREF_PUBLICATION" ), adaptTab );
+  bloc = addPreference( tr( "ADAPT_PREF_HOMARD_PUBLICATION" ), adaptTab );
   setPreferenceProperty( bloc, "columns", 1 );
-  pref = addPreference( tr( "ADAPT_PREF_PUBLICATION_MAILLAGE_IN" ), bloc, LightApp_Preferences::Bool, "HOMARD", "publish_mesh_in" );
-  pref = addPreference( tr( "ADAPT_PREF_PUBLICATION_MAILLAGE_OUT" ), bloc, LightApp_Preferences::Bool, "HOMARD", "publish_mesh_out" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_IN" ), bloc, LightApp_Preferences::Bool, "HOMARD", "homard_publish_mesh_in" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_OUT" ), bloc, LightApp_Preferences::Bool, "HOMARD", "homard_publish_mesh_out" );
 
-  bloc = addPreference( tr( "ADAPT_PREF_YACS_MAX" ), adaptTab );
+  // YACS with HOMARD
+  bloc = addPreference( tr( "ADAPT_PREF_HOMARD_YACS" ), adaptTab );
   setPreferenceProperty( bloc, "columns", 1 );
-  pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_ITER" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_iter" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_YACS_MAX_ITER" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "homard_yacs_max_iter" );
   setPreferenceProperty( pref, "min",  0 );
   setPreferenceProperty( pref, "max",  100000000 );
   setPreferenceProperty( pref, "step", 1 );
-  pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_NODE" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_node" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_YACS_MAX_NODE" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "homard_yacs_max_node" );
   setPreferenceProperty( pref, "min",  0 );
   setPreferenceProperty( pref, "max",  100000000 );
   setPreferenceProperty( pref, "step", 1000 );
-  pref = addPreference( tr( "ADAPT_PREF_YACS_MAX_ELEM" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "yacs_max_elem" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_YACS_MAX_ELEM" ), bloc, LightApp_Preferences::IntSpin, "HOMARD", "homard_yacs_max_elem" );
   setPreferenceProperty( pref, "min",  0 );
   setPreferenceProperty( pref, "max",  100000000 );
   setPreferenceProperty( pref, "step", 1000 );
-  bloc = addPreference( tr( "ADAPT_PREF_YACS_CONVERGENCE" ), adaptTab );
-  setPreferenceProperty( bloc, "columns", 1 );
-  pref = addPreference( tr( "ADAPT_PREF_YACS_TYPE_TEST" ), bloc, LightApp_Preferences::Selector, "HOMARD", "yacs_type_test" );
+  pref = addPreference( tr( "ADAPT_PREF_HOMARD_YACS_TYPE_CONVERGENCE" ), bloc, LightApp_Preferences::Selector, "HOMARD", "homard_yacs_type_test" );
   QStringList aListOfTypeTest;
-  aListOfTypeTest << "None";
+  aListOfTypeTest << tr( "ADAPT_PREF_NONE" );
   aListOfTypeTest << "VTest > VRef";
   aListOfTypeTest << "VTest < VRef";
   setPreferenceProperty( pref, "strings", aListOfTypeTest );
+
+  // MG-Adapt
+  bloc = addPreference( tr( "ADAPT_PREF_MG_ADAPT" ), adaptTab );
+  setPreferenceProperty( bloc, "columns", 1 );
+  pref = addPreference( tr( "ADAPT_PREF_MG_ADAPT_FILE_MAILLAGE_OUT" ), bloc, LightApp_Preferences::Bool, "HOMARD", "mg_adapt_file_mesh_out" );
+  pref = addPreference( tr( "ADAPT_PREF_MG_ADAPT_PUBLICATION_MAILLAGE_OUT" ), bloc, LightApp_Preferences::Bool, "HOMARD", "mg_adapt_publish_mesh_out" );
+  pref = addPreference( tr( "ADAPT_PREF_MG_ADAPT_SIZE_MAP" ), bloc, LightApp_Preferences::Selector, "HOMARD", "mg_adapt_size_map" );
+  QStringList aListOfSizeMap;
+  aListOfSizeMap << tr( "ADAPT_PREF_MG_ADAPT_SIZE_MAP_LOCAL" );
+  aListOfSizeMap << tr( "ADAPT_PREF_MG_ADAPT_SIZE_MAP_BACKGROUND" );
+  aListOfSizeMap << tr( "ADAPT_PREF_NONE" );;
+  setPreferenceProperty( pref, "strings", aListOfSizeMap );
+  pref = addPreference( tr( "ADAPT_PREF_MG_ADAPT_TIME_STEP" ), bloc, LightApp_Preferences::Selector, "HOMARD", "mg_adapt_time_step" );
+  QStringList aListOfTimeStep;
+  aListOfTimeStep << tr( "ADAPT_PREF_NONE" );
+  aListOfTimeStep << tr( "ADAPT_PREF_MG_ADAPT_TIME_STEP_LAST" );
+  aListOfTimeStep << tr( "ADAPT_PREF_MG_ADAPT_TIME_STEP_C" );;
+  setPreferenceProperty( pref, "strings", aListOfTimeStep );
   // Adaptation - end
 
 }
index 2e48cc2aaff2c4f5562811b6677757e89c53ac71..e48ed4d852a65c9e3908740b175a176cd6714e9f 100644 (file)
@@ -111,32 +111,32 @@ void SMESHGUI_AdaptDlg::action (int theCommandID)
 //   INFOS ("Enregistrement de LanguageShort = " << _LanguageShort.toStdString().c_str() );
 // //   adaptGen->SetLanguageShort(_LanguageShort.toStdString().c_str());
 //
-// // B.2. Les publications
+// // B.2. Les publications avec HOMARD
 //   bool publish_mesh ;
 //
-//   publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_in", false );
+//   publish_mesh = resMgr->booleanValue("HOMARD", "homard_publish_mesh_in", false );
 //   if ( publish_mesh ) { _PublisMeshIN = 1 ; }
 //   else                { _PublisMeshIN = 0 ; }
 //
-//   publish_mesh = resMgr->booleanValue("HOMARD", "publish_mesh_out", false );
+//   publish_mesh = resMgr->booleanValue("HOMARD", "homard_publish_mesh_out", false );
 //   if ( publish_mesh ) { _PublisMeshOUT = 1 ; }
 //   else                { _PublisMeshOUT = 0 ; }
 //
 //   INFOS ("Enregistrement de PublisMeshIN = " << _PublisMeshIN<<", PublisMeshOUT = "<< _PublisMeshOUT);
 // //   adaptGen->SetPublisMesh(_PublisMeshIN, _PublisMeshOUT);
 //
-// // B.3. Les maximum pour YACS
+// // B.3. Les maximum pour YACS avec HOMARD
 //
-//   _YACSMaxIter = resMgr->integerValue("HOMARD", "yacs_max_iter", 0 );
-//   _YACSMaxNode = resMgr->integerValue("HOMARD", "yacs_max_node", 0 );
-//   _YACSMaxElem = resMgr->integerValue("HOMARD", "yacs_max_elem", 0 );
+//   _YACSMaxIter = resMgr->integerValue("HOMARD", "homard_yacs_max_iter", 0 );
+//   _YACSMaxNode = resMgr->integerValue("HOMARD", "homard_yacs_max_node", 0 );
+//   _YACSMaxElem = resMgr->integerValue("HOMARD", "homard_yacs_max_elem", 0 );
 //
 //   INFOS ("Enregistrement de YACSMaxIter = " << _YACSMaxIter<<", YACSMaxNode = "<< _YACSMaxNode<<", YACSMaxElem = "<< _YACSMaxElem);
 // //   adaptGen->SetYACSMaximum(_YACSMaxIter, _YACSMaxNode, _YACSMaxElem);
 //
-// // B.4. La convergence pour YACS
+// // B.4. La convergence pour YACS avec HOMARD
 //
-//   QString QString_v = resMgr->stringValue ( "HOMARD", "yacs_type_test", "None" );
+//   QString QString_v = resMgr->stringValue ( "HOMARD", "homard_yacs_type_test", "None" );
 //   if ( ( QString_v == "VTest > VRef" ) || ( QString_v == "VTest &gt; VRef" ) )      { _YACSTypeTest = 1 ; }
 //   else if ( ( QString_v == "VTest < VRef" ) || ( QString_v == "VTest &lt; VRef" ) ) { _YACSTypeTest = 2 ; }
 //   else                                                                              { _YACSTypeTest = 0 ; }
index 9055b75306d1d212218de390069db0886a522c27..2c68a790bf4a5595f037e9d3bb7df5ccef752483 100644 (file)
@@ -2942,41 +2942,77 @@ Check algorithm documentation for supported geometry</translation>
         <translation>Adaptation</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION</source>
-        <translation>Publication</translation>
+        <source>ADAPT_PREF_NONE</source>
+        <translation>None</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION_MAILLAGE_IN</source>
-        <translation>IN meshes</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION</source>
+        <translation>Publication of meshes with HOMARD</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION_MAILLAGE_OUT</source>
-        <translation>OUT meshes</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_IN</source>
+        <translation>IN mesh</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX</source>
-        <translation>Maximum numbers for a YACS schema with HOMARD</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_OUT</source>
+        <translation>OUT mesh</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_ITER</source>
-        <translation>Iterations</translation>
+        <source>ADAPT_PREF_HOMARD_YACS</source>
+        <translation>A YACS schema with HOMARD</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_NODE</source>
-        <translation>Nodes</translation>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_ITER</source>
+        <translation>Maximal number of iterations</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_ELEM</source>
-        <translation>Elements</translation>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_NODE</source>
+        <translation>Maximal number of nodes</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_CONVERGENCE</source>
-        <translation>Convergence</translation>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_ELEM</source>
+        <translation>Maximal number of elements</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_TYPE_TEST</source>
+        <source>ADAPT_PREF_HOMARD_YACS_TYPE_CONVERGENCE</source>
         <translation>Test type for a YACS schema with HOMARD</translation>
     </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT</source>
+        <translation>Adaptation with MG-Adapt</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_FILE_MAILLAGE_OUT</source>
+        <translation>Write the OUT mesh</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_PUBLICATION_MAILLAGE_OUT</source>
+        <translation>Publication of the OUT mesh</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP</source>
+        <translation>Size map</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP_LOCAL</source>
+        <translation>Local</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP_BACKGROUND</source>
+        <translation>Background</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP</source>
+        <translation>Time step</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP_LAST</source>
+        <translation>Last</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP_C</source>
+        <translation>Value</translation>
+    </message>
     <message>
         <source>SMESH_VISU_PROBLEM</source>
         <translation>Mesh visualization failed</translation>
index d66f06849267a60e72be57f5bf51f671ff19104d..c82129921dc93b9428af32f6a01c13b66beb6ae1 100644 (file)
@@ -2904,40 +2904,76 @@ Référez-vous à la documentation sur l&apos;algorithme et la géométrie suppo
         <translation>Adaptation</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION</source>
-        <translation>Publication</translation>
+        <source>ADAPT_PREF_NONE</source>
+        <translation>Sans</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION_MAILLAGE_IN</source>
-        <translation>Les maillages d'entrée</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION</source>
+        <translation>Publication des maillages avec HOMARD</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_PUBLICATION_MAILLAGE_OUT</source>
-        <translation>Les maillages de sortie</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_IN</source>
+        <translation>Le maillage d'entrée</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX</source>
-        <translation>Nombres maximaux pour un schéma YACS avec HOMARD</translation>
+        <source>ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_OUT</source>
+        <translation>Le maillage de sortie</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_ITER</source>
-        <translation>Itérations</translation>
+        <source>ADAPT_PREF_HOMARD_YACS</source>
+        <translation>Schéma YACS avec HOMARD</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_NODE</source>
-        <translation>Noeuds</translation>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_ITER</source>
+        <translation>Nombre maximal d'itérations</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_MAX_ELEM</source>
-        <translation>Eléments</translation>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_NODE</source>
+        <translation>Nombre maximal de noeuds</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_HOMARD_YACS_MAX_ELEM</source>
+        <translation>Nombre maximal d'éléments</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_HOMARD_YACS_TYPE_CONVERGENCE</source>
+        <translation>Type de test pour la convergence</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT</source>
+        <translation>Adaptation avec MG-Adapt</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_FILE_MAILLAGE_OUT</source>
+        <translation>Ecriture du maillage de sortie</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_PUBLICATION_MAILLAGE_OUT</source>
+        <translation>Publication du maillage de sortie</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP</source>
+        <translation>Carte de tailles</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_CONVERGENCE</source>
-        <translation>Convergence</translation>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP_LOCAL</source>
+        <translation>Locale</translation>
     </message>
     <message>
-        <source>ADAPT_PREF_YACS_TYPE_TEST</source>
-        <translation>Type de test pour un schéma YACS avec HOMARD</translation>
+        <source>ADAPT_PREF_MG_ADAPT_SIZE_MAP_BACKGROUND</source>
+        <translation>Arrière-plan</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP</source>
+        <translation>Choix du pas de temps</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP_LAST</source>
+        <translation>Dernier</translation>
+    </message>
+    <message>
+        <source>ADAPT_PREF_MG_ADAPT_TIME_STEP_C</source>
+        <translation>Valeur</translation>
     </message>
     <message>
         <source>SMESH_VISU_PROBLEM</source>