From 07c342ca896487055a8c097af1be118acf31a7d4 Mon Sep 17 00:00:00 2001 From: Gerald NICOLAS Date: Tue, 19 Apr 2016 11:38:42 +0200 Subject: [PATCH] Pilotage de l'adaptation pour Code_Saturne --- doc/en/tui_create_case.rst | 3 +- doc/fr/tui_create_case.rst | 3 +- src/HOMARD/HOMARD_Cas.cxx | 2 +- src/HOMARD/HomardDriver.cxx | 11 ++++--- src/HOMARDGUI/CreateCase.ui | 56 +++++++++++++++------------------ src/HOMARDGUI/MonCreateCase.cxx | 10 +++++- src/HOMARDGUI/MonCreateCase.h | 1 + src/HOMARDGUI/MonEditCase.cxx | 5 ++- src/HOMARD_I/HOMARD_Cas_i.cxx | 2 +- src/HOMARD_I/HOMARD_Gen_i.cxx | 7 +++-- 10 files changed, 57 insertions(+), 43 deletions(-) diff --git a/doc/en/tui_create_case.rst b/doc/en/tui_create_case.rst index ddb9252f..b0151a29 100644 --- a/doc/en/tui_create_case.rst +++ b/doc/en/tui_create_case.rst @@ -141,7 +141,8 @@ Methods of the class cas | - ``ext_type`` : integer as follows: | | | | * 0 : Standard MED (default) | -| * 1 : Saturne 2D | +| * 1 : Saturne MED | +| * 2 : Saturne 2D MED | +---------------------------------------------------------------+ | .. module:: GetExtType | | | diff --git a/doc/fr/tui_create_case.rst b/doc/fr/tui_create_case.rst index 7f0d7d0a..a795348d 100644 --- a/doc/fr/tui_create_case.rst +++ b/doc/fr/tui_create_case.rst @@ -141,7 +141,8 @@ Méthodes de la classe cas | - ``ext_type`` : entier précisant le type externe | | | | * 0 : MED standard (défaut) | -| * 1 : Saturne 2D | +| * 1 : Saturne MED | +| * 2 : Saturne 2D MED | +---------------------------------------------------------------+ | .. module:: GetExtType | | | diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index 9fb002cb..9e23c1ce 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -164,7 +164,7 @@ const int HOMARD_Cas::GetConfType() const //============================================================================= void HOMARD_Cas::SetExtType( int ExtType ) { -// VERIFICATION( (ExtType>=0) && (ExtType<=1) ); +// VERIFICATION( (ExtType>=0) && (ExtType<=2) ); _ExtType = ExtType; } //============================================================================= diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index df126588..6867372c 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -80,8 +80,9 @@ void HomardDriver::TexteAdap( int ExtType ) MESSAGE("TexteAdap"); // _Texte += "Action homa\n" ; - if ( ExtType == 0 ) { _Texte += "CCAssoci med\n" ; } - else { _Texte += "CCAssoci saturne_2d\n" ; } + if ( ExtType == 0 ) { _Texte += "CCAssoci med\n" ; } + else if ( ExtType == 1 ) { _Texte += "CCAssoci saturne\n" ; } + else { _Texte += "CCAssoci saturne_2d\n" ; } _Texte += "ModeHOMA 1\n" ; _Texte += "NumeIter " + _siter + "\n" ; // @@ -230,10 +231,10 @@ void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, // MESSAGE("A la fin de HomardDriver::TexteConfRaffDera, _Texte ="<<_Texte); } //=============================================================================== -void HomardDriver::TexteCompo( int NumeComp, const std::string NompCompo) +void HomardDriver::TexteCompo( int NumeComp, const std::string NomCompo) { - MESSAGE("TexteCompo, NumeComp = "<true - + @@ -57,7 +57,7 @@ - + Qt::Horizontal @@ -70,7 +70,7 @@ - + 6 @@ -107,7 +107,7 @@ - + Qt::Vertical @@ -120,7 +120,7 @@ - + 6 @@ -157,7 +157,7 @@ - + Qt::Vertical @@ -170,7 +170,7 @@ - + Conformity type @@ -202,7 +202,7 @@ - + 6 @@ -226,7 +226,7 @@ - + Qt::Vertical @@ -239,7 +239,7 @@ - + Qt::Vertical @@ -252,7 +252,7 @@ - + @@ -329,7 +329,7 @@ - + @@ -405,7 +405,7 @@ - + Qt::Vertical @@ -418,14 +418,14 @@ - + Advanced options - + Advanced options @@ -502,6 +502,13 @@ + + + Saturne + + + + Saturne 2D @@ -514,7 +521,7 @@ - + Qt::Horizontal @@ -530,7 +537,7 @@ - + Qt::Vertical @@ -543,7 +550,7 @@ - + No comment. @@ -618,7 +625,7 @@ - + Qt::Horizontal @@ -635,17 +642,6 @@ - WName - GBTypeConf - GBBoundaryD - GBBoundaryA - CBAdvanced - GBAdvancedOptions - Comment - GroupButtons - RBSaturne2D - RBSaturne2D - RBSaturne2D diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index a00a876f..a912f79c 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -102,6 +102,7 @@ void MonCreateCase::InitConnect() connect( RBNCQuelconque, SIGNAL(clicked()), this, SLOT(SetNCQuelconque())); connect( RBMED, SIGNAL(clicked()), this, SLOT(SetMED())); + connect( RBSaturne, SIGNAL(clicked()), this, SLOT(SetSaturne())); connect( RBSaturne2D, SIGNAL(clicked()), this, SLOT(SetSaturne2D())); connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK())); @@ -419,10 +420,17 @@ void MonCreateCase::SetMED() RBMED->setChecked(true); } // ------------------------------------------------------------------------ -void MonCreateCase::SetSaturne2D() +void MonCreateCase::SetSaturne() // ------------------------------------------------------------------------ { _ExtType = 1 ; + RBSaturne->setChecked(true); +} +// ------------------------------------------------------------------------ +void MonCreateCase::SetSaturne2D() +// ------------------------------------------------------------------------ +{ + _ExtType = 2 ; RBSaturne2D->setChecked(true); } // ------------------------------------------------------------------------ diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h index 4761bc4a..7b381599 100644 --- a/src/HOMARDGUI/MonCreateCase.h +++ b/src/HOMARDGUI/MonCreateCase.h @@ -71,6 +71,7 @@ public slots: virtual void SetNCQuelconque(); virtual void SetMED(); + virtual void SetSaturne(); virtual void SetSaturne2D(); virtual void SetBoundaryD(); diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index c4e8c760..2ad3ef4e 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -210,10 +210,13 @@ void MonEditCase::InitValEdit() else { GBFormat->setVisible(1); RBMED->setVisible(1); + RBSaturne->setVisible(1); RBSaturne2D->setVisible(1); - RBSaturne2D->setChecked(true); + if ( ExtType == 1 ) { RBSaturne->setChecked(true); } + else { RBSaturne2D->setChecked(true); } } RBMED->setEnabled(false); + RBSaturne->setEnabled(false); RBSaturne2D->setEnabled(false); } else diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx index 3eb45ec9..6558e235 100755 --- a/src/HOMARD_I/HOMARD_Cas_i.cxx +++ b/src/HOMARD_I/HOMARD_Cas_i.cxx @@ -250,7 +250,7 @@ CORBA::Long HOMARD_Cas_i::GetConfType() void HOMARD_Cas_i::SetExtType( CORBA::Long ExtType ) { ASSERT( myHomardCas ); -// VERIFICATION( (ExtType>=0) && (ExtType<=1) ); +// VERIFICATION( (ExtType>=0) && (ExtType<=2) ); myHomardCas->SetExtType( ExtType ); } //============================================================================= diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 475064cf..b1e21019 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -3083,8 +3083,11 @@ void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HO for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++) { std::string nomCompo = std::string((*mescompo)[NumeComp]); - MESSAGE( "... nomCompo = " << nomCompo ); - myDriver->TexteCompo(NumeComp, nomCompo); + if ((system(nomCompo.c_str())) != 0) + { + MESSAGE( "... nomCompo = " << nomCompo ); + myDriver->TexteCompo(NumeComp, nomCompo); + } } return ; } -- 2.39.2