From eb9868c360dd2f3c097d206f4f1a4f8195832f8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9rald=20NICOLAS?= Date: Wed, 10 Jun 2020 11:22:21 +0200 Subject: [PATCH] =?utf8?q?Les=20pr=C3=A9f=C3=A9rences=20pour=20MG-Adapt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- resources/SalomeApp.xml.in | 16 ++++--- src/ADAPT_I/ADAPT_Gen_i.cxx | 12 ++--- src/SMESHGUI/SMESHGUI.cxx | 39 +++++++++++----- src/SMESHGUI/SMESHGUI_AdaptDlg.cxx | 18 ++++---- src/SMESHGUI/SMESH_msg_en.ts | 70 ++++++++++++++++++++++------- src/SMESHGUI/SMESH_msg_fr.ts | 72 ++++++++++++++++++++++-------- 6 files changed, 160 insertions(+), 67 deletions(-) diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 3c928f1d7..8009476ad 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -98,12 +98,16 @@ - - - - - - + + + + + + + + + +
diff --git a/src/ADAPT_I/ADAPT_Gen_i.cxx b/src/ADAPT_I/ADAPT_Gen_i.cxx index 6b055fd62..eb58aeee3 100644 --- a/src/ADAPT_I/ADAPT_Gen_i.cxx +++ b/src/ADAPT_I/ADAPT_Gen_i.cxx @@ -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 ; } } } } diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index c653ff1ac..5056902dd 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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 } diff --git a/src/SMESHGUI/SMESHGUI_AdaptDlg.cxx b/src/SMESHGUI/SMESHGUI_AdaptDlg.cxx index 2e48cc2aa..e48ed4d85 100644 --- a/src/SMESHGUI/SMESHGUI_AdaptDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AdaptDlg.cxx @@ -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 > VRef" ) ) { _YACSTypeTest = 1 ; } // else if ( ( QString_v == "VTest < VRef" ) || ( QString_v == "VTest < VRef" ) ) { _YACSTypeTest = 2 ; } // else { _YACSTypeTest = 0 ; } diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 9055b7530..2c68a790b 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -2942,41 +2942,77 @@ Check algorithm documentation for supported geometry Adaptation - ADAPT_PREF_PUBLICATION - Publication + ADAPT_PREF_NONE + None - ADAPT_PREF_PUBLICATION_MAILLAGE_IN - IN meshes + ADAPT_PREF_HOMARD_PUBLICATION + Publication of meshes with HOMARD - ADAPT_PREF_PUBLICATION_MAILLAGE_OUT - OUT meshes + ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_IN + IN mesh - ADAPT_PREF_YACS_MAX - Maximum numbers for a YACS schema with HOMARD + ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_OUT + OUT mesh - ADAPT_PREF_YACS_MAX_ITER - Iterations + ADAPT_PREF_HOMARD_YACS + A YACS schema with HOMARD - ADAPT_PREF_YACS_MAX_NODE - Nodes + ADAPT_PREF_HOMARD_YACS_MAX_ITER + Maximal number of iterations - ADAPT_PREF_YACS_MAX_ELEM - Elements + ADAPT_PREF_HOMARD_YACS_MAX_NODE + Maximal number of nodes - ADAPT_PREF_YACS_CONVERGENCE - Convergence + ADAPT_PREF_HOMARD_YACS_MAX_ELEM + Maximal number of elements - ADAPT_PREF_YACS_TYPE_TEST + ADAPT_PREF_HOMARD_YACS_TYPE_CONVERGENCE Test type for a YACS schema with HOMARD + + ADAPT_PREF_MG_ADAPT + Adaptation with MG-Adapt + + + ADAPT_PREF_MG_ADAPT_FILE_MAILLAGE_OUT + Write the OUT mesh + + + ADAPT_PREF_MG_ADAPT_PUBLICATION_MAILLAGE_OUT + Publication of the OUT mesh + + + ADAPT_PREF_MG_ADAPT_SIZE_MAP + Size map + + + ADAPT_PREF_MG_ADAPT_SIZE_MAP_LOCAL + Local + + + ADAPT_PREF_MG_ADAPT_SIZE_MAP_BACKGROUND + Background + + + ADAPT_PREF_MG_ADAPT_TIME_STEP + Time step + + + ADAPT_PREF_MG_ADAPT_TIME_STEP_LAST + Last + + + ADAPT_PREF_MG_ADAPT_TIME_STEP_C + Value + SMESH_VISU_PROBLEM Mesh visualization failed diff --git a/src/SMESHGUI/SMESH_msg_fr.ts b/src/SMESHGUI/SMESH_msg_fr.ts index d66f06849..c82129921 100644 --- a/src/SMESHGUI/SMESH_msg_fr.ts +++ b/src/SMESHGUI/SMESH_msg_fr.ts @@ -2904,40 +2904,76 @@ Référez-vous à la documentation sur l'algorithme et la géométrie suppo Adaptation - ADAPT_PREF_PUBLICATION - Publication + ADAPT_PREF_NONE + Sans - ADAPT_PREF_PUBLICATION_MAILLAGE_IN - Les maillages d'entrée + ADAPT_PREF_HOMARD_PUBLICATION + Publication des maillages avec HOMARD - ADAPT_PREF_PUBLICATION_MAILLAGE_OUT - Les maillages de sortie + ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_IN + Le maillage d'entrée - ADAPT_PREF_YACS_MAX - Nombres maximaux pour un schéma YACS avec HOMARD + ADAPT_PREF_HOMARD_PUBLICATION_MAILLAGE_OUT + Le maillage de sortie - ADAPT_PREF_YACS_MAX_ITER - Itérations + ADAPT_PREF_HOMARD_YACS + Schéma YACS avec HOMARD - ADAPT_PREF_YACS_MAX_NODE - Noeuds + ADAPT_PREF_HOMARD_YACS_MAX_ITER + Nombre maximal d'itérations - ADAPT_PREF_YACS_MAX_ELEM - Eléments + ADAPT_PREF_HOMARD_YACS_MAX_NODE + Nombre maximal de noeuds + + + ADAPT_PREF_HOMARD_YACS_MAX_ELEM + Nombre maximal d'éléments + + + ADAPT_PREF_HOMARD_YACS_TYPE_CONVERGENCE + Type de test pour la convergence + + + ADAPT_PREF_MG_ADAPT + Adaptation avec MG-Adapt + + + ADAPT_PREF_MG_ADAPT_FILE_MAILLAGE_OUT + Ecriture du maillage de sortie + + + ADAPT_PREF_MG_ADAPT_PUBLICATION_MAILLAGE_OUT + Publication du maillage de sortie + + + ADAPT_PREF_MG_ADAPT_SIZE_MAP + Carte de tailles - ADAPT_PREF_YACS_CONVERGENCE - Convergence + ADAPT_PREF_MG_ADAPT_SIZE_MAP_LOCAL + Locale - ADAPT_PREF_YACS_TYPE_TEST - Type de test pour un schéma YACS avec HOMARD + ADAPT_PREF_MG_ADAPT_SIZE_MAP_BACKGROUND + Arrière-plan + + + ADAPT_PREF_MG_ADAPT_TIME_STEP + Choix du pas de temps + + + ADAPT_PREF_MG_ADAPT_TIME_STEP_LAST + Dernier + + + ADAPT_PREF_MG_ADAPT_TIME_STEP_C + Valeur SMESH_VISU_PROBLEM -- 2.39.2