Salome HOME
updated copyright message
[modules/homard.git] / src / HOMARD / HOMARD_YACS.cxx
index 67f04c2a312a2ec0621803ec7d715bbf978d9f6e..b63316dc47b1f0c931d124a60c8ce2ff9eeae716 100644 (file)
@@ -1,11 +1,11 @@
 //  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
-// Copyright (C) 2011-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //  File   : HOMARD_YACS.cxx
-//  Author : Paul RASCLE, EDF
+//  Author : Gerald NICOLAS, EDF
 //  Module : HOMARD
 //
 // Remarques :
@@ -44,8 +44,7 @@ HOMARD_YACS::HOMARD_YACS():
   _NomCas( "" ),
   _NomDir( "" ),
   _MeshFile( "" ),
-  _ScriptFile( "" ),
-  _Type( 1 )
+  _ScriptFile( "" )
 {
   MESSAGE("HOMARD_YACS");
 }
@@ -82,6 +81,10 @@ std::string HOMARD_YACS::GetDumpPython() const
   aScript << "\t" << _Name << " = " << _NomCas << ".CreateYACSSchema(\"" << _Name << "\", \"" << _ScriptFile << "\", \"" << _NomDir << "\", \"" << _MeshFile << "\")\n";
 // Le type de schema
   aScript << "\t" << _Name << ".SetType(" << _Type << ")\n";
+// Les controles de convergences
+  if ( _MaxIter > 0 ) { aScript << "\t" << _Name << ".SetMaxIter(" << _MaxIter << ")\n"; }
+  if ( _MaxNode > 0 ) { aScript << "\t" << _Name << ".SetMaxNode(" << _MaxNode << ")\n"; }
+  if ( _MaxElem > 0 ) { aScript << "\t" << _Name << ".SetMaxElem(" << _MaxElem << ")\n"; }
 
 // L'ecriture du schema
   aScript << "\tcodret = " << _Name << ".Write()\n";
@@ -92,7 +95,7 @@ std::string HOMARD_YACS::GetDumpPython() const
 }
 //=============================================================================
 //=============================================================================
-// Caracteristiques
+// Caracteristiques de la convergence
 //=============================================================================
 //=============================================================================
 void HOMARD_YACS::SetType( int Type )
@@ -105,6 +108,57 @@ int HOMARD_YACS::GetType() const
   return _Type;
 }
 //=============================================================================
+void HOMARD_YACS::SetMaxIter( int MaxIter )
+{
+  _MaxIter = MaxIter;
+}
+//=============================================================================
+int HOMARD_YACS::GetMaxIter() const
+{
+  return _MaxIter;
+}
+//=============================================================================
+void HOMARD_YACS::SetMaxNode( int MaxNode )
+{
+  _MaxNode = MaxNode;
+}
+//=============================================================================
+int HOMARD_YACS::GetMaxNode() const
+{
+  return _MaxNode;
+}
+//=============================================================================
+void HOMARD_YACS::SetMaxElem( int MaxElem )
+{
+  _MaxElem = MaxElem;
+}
+//=============================================================================
+int HOMARD_YACS::GetMaxElem() const
+{
+  return _MaxElem;
+}
+//=============================================================================
+void HOMARD_YACS::SetTestConvergence( int TypeTest, double VRef )
+{
+  _TypeTest = TypeTest;
+  _VRef = VRef;
+}
+//=============================================================================
+int HOMARD_YACS::GetTestConvergenceType() const
+{
+  return _TypeTest;
+}
+//=============================================================================
+double HOMARD_YACS::GetTestConvergenceVRef() const
+{
+  return _VRef;
+}
+//=============================================================================
+//=============================================================================
+// Repertoire et fichiers
+//=============================================================================
+//=============================================================================
+//=============================================================================
 void HOMARD_YACS::SetDirName( const char* NomDir )
 {
   _NomDir = std::string( NomDir );