// HOMARD HOMARD : implementation of HOMARD idl descriptions
//
-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2022 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_Cas.cxx
-// Author : Paul RASCLE, EDF
+// Author : Gerald NICOLAS, EDF
// Module : HOMARD
//
// Remarques :
#include "HOMARD_Cas.hxx"
#include "utilities.h"
+#include "HOMARD.hxx"
#include <iostream>
#include <sys/stat.h>
*/
//=============================================================================
HOMARD_Cas::HOMARD_Cas():
- _Name(""), _NomDir("/tmp"), _ConfType(1)
+ _Name(""), _NomDir("/tmp"), _ConfType(0), _ExtType(0)
{
MESSAGE("HOMARD_Cas");
}
aScript << _NomDir << "\")\n";
aScript << "\t" <<_Name << ".SetConfType(";
aScript << _ConfType << ")\n";
+ aScript << "\t" <<_Name << ".SetExtType(";
+ aScript << _ExtType << ")\n";
// Suivi de frontieres
std::list<std::string>::const_iterator it = _ListBoundaryGroup.begin();
while(it != _ListBoundaryGroup.end())
//=============================================================================
int HOMARD_Cas::SetDirName( const char* NomDir )
{
- MESSAGE("SetDirName, NomDir : "<<NomDir);
- MESSAGE("SetDirName, _NomDir : "<<_NomDir);
+// MESSAGE("SetDirName, NomDir : "<<NomDir);
+// MESSAGE("SetDirName, _NomDir : "<<_NomDir);
int erreur = 0 ;
- // On vérifie qu'aucun calcul n'a eu lieu pour ce cas
- MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
+ // On vérifie qu'aucun calcul n'a eu lieu pour ce cas
+// MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
if ( _ListIter.size() > 1 ) { erreur = 1 ; }
// Creation
-#ifndef WIN32
- if ( chdir(NomDir) == 0 )
-#else
- if ( _chdir(NomDir) == 0 )
-#endif
+ if ( CHDIR(NomDir) == 0 )
{ _NomDir = std::string( NomDir ); }
else
{
#ifndef WIN32
if ( mkdir(NomDir, S_IRWXU|S_IRGRP|S_IXGRP) == 0 )
- {
- if ( chdir(NomDir) == 0 )
#else
if ( _mkdir(NomDir) == 0 )
- {
- if ( _chdir(NomDir) == 0 )
#endif
- { _NomDir = std::string( NomDir ); }
+ {
+ if ( CHDIR(NomDir) == 0 ) { _NomDir = std::string( NomDir ); }
else { erreur = 2 ; }
}
else { erreur = 2 ; }
{
return _ListIter.size();
}
+//
+// Le type de conformite ou non conformite
+//
//=============================================================================
void HOMARD_Cas::SetConfType( int Conftype )
{
+// VERIFICATION( (Conftype>=-2) && (Conftype<=3) );
_ConfType = Conftype;
}
//=============================================================================
return _ConfType;
}
//
+// Le type exterieur
+//
+//=============================================================================
+void HOMARD_Cas::SetExtType( int ExtType )
+{
+// VERIFICATION( (ExtType>=0) && (ExtType<=2) );
+ _ExtType = ExtType;
+}
+//=============================================================================
+const int HOMARD_Cas::GetExtType() const
+{
+ return _ExtType;
+}
+//
// La boite englobante
//
//=============================================================================
// Les frontieres
//
//=============================================================================
+void HOMARD_Cas::AddBoundary( const char* Boundary )
+{
+// MESSAGE ( ". HOMARD_Cas::AddBoundary : Boundary = " << Boundary );
+ const char* Group = "";
+ AddBoundaryGroup( Boundary, Group );
+}
+//=============================================================================
void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
{
+// MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Boundary = " << Boundary );
+// MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Group = " << Group );
_ListBoundaryGroup.push_back( Boundary );
_ListBoundaryGroup.push_back( Group );
}