// HOMARD HOMARD : implementation of HOMARD idl descriptions
//
-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2019 CEA/DEN, EDF R&D
//
// 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
// 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 :
_NomCas( "" ),
_NomDir( "" ),
_MeshFile( "" ),
- _ScriptFile( "" ),
- _Type( 1 )
+ _ScriptFile( "" )
{
MESSAGE("HOMARD_YACS");
}
MESSAGE (". Ecriture du schema " << _Name );
std::ostringstream aScript;
aScript << "\n# Creation of the schema " << _Name << "\n";
-// Le fichier du maillage initial
- aScript << "\t" << _Name << ".SetMeshFile(\"" << _MeshFile << "\")\n";
+// Creation du schema
+ 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"; }
-// MESSAGE (". Fin de l ecriture du schema " << _Name );
+// L'ecriture du schema
+ aScript << "\tcodret = " << _Name << ".Write()\n";
+
+ MESSAGE (". Fin de l ecriture du schema " << _Name );
return aScript.str();
}
//=============================================================================
//=============================================================================
-// Caracteristiques
+// Caracteristiques de la convergence
//=============================================================================
//=============================================================================
void HOMARD_YACS::SetType( int Type )
{
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 );
return _ScriptFile;
}
//=============================================================================
+void HOMARD_YACS::SetXMLFile( const char* XMLFile )
+{
+ _XMLFile = std::string( XMLFile );
+}
+//=============================================================================
+std::string HOMARD_YACS::GetXMLFile() const
+{
+ return _XMLFile;
+}
+//=============================================================================
//=============================================================================
// Liens avec les autres structures
//=============================================================================