X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD%2FHOMARD_YACS.cxx;h=a124cb1e1fb5e4d8ac7c341985c791436c1b10a4;hb=refs%2Ftags%2FV9_13_0b1;hp=9931af09d0b5b3be42ca762b5d6fc703b5af5122;hpb=e7d9ea599135529b719de1d2868e678b28f17fa4;p=modules%2Fhomard.git diff --git a/src/HOMARD/HOMARD_YACS.cxx b/src/HOMARD/HOMARD_YACS.cxx index 9931af09..a124cb1e 100644 --- a/src/HOMARD/HOMARD_YACS.cxx +++ b/src/HOMARD/HOMARD_YACS.cxx @@ -1,11 +1,11 @@ // HOMARD HOMARD : implementation of HOMARD idl descriptions // -// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 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,9 +81,13 @@ 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 eventuelle du schema - aScript << "\t#" << _Name << ".Write()\n"; +// L'ecriture du schema + aScript << "\tcodret = " << _Name << ".Write()\n"; MESSAGE (". Fin de l ecriture du schema " << _Name ); @@ -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 ); @@ -135,6 +189,16 @@ std::string HOMARD_YACS::GetScriptFile() const 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 //=============================================================================