-// Copyright (C) 2011-2012 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
//
+
// Remarques :
// L'ordre de description des fonctions est le meme dans tous les fichiers
// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
MESSAGE( "Default constructor, not for use" );
ASSERT( 0 );
}
-
//=============================================================================
/*!
* standard constructor
myHomardIteration = new ::HOMARD_Iteration();
ASSERT( myHomardIteration );
}
-
//=============================================================================
/*!
* standard destructor
// Caracteristiques
//=============================================================================
//=============================================================================
-void HOMARD_Iteration_i::SetDirName( const char* NomDir )
+void HOMARD_Iteration_i::SetDirNameLoc( const char* NomDir )
+{
+ ASSERT( myHomardIteration );
+ myHomardIteration->SetDirNameLoc( NomDir );
+}
+//=============================================================================
+char* HOMARD_Iteration_i::GetDirNameLoc()
{
ASSERT( myHomardIteration );
- myHomardIteration->SetDirName( NomDir );
+ return CORBA::string_dup( myHomardIteration->GetDirNameLoc().c_str() );
}
//=============================================================================
char* HOMARD_Iteration_i::GetDirName()
{
ASSERT( myHomardIteration );
- return CORBA::string_dup( myHomardIteration->GetDirName().c_str() );
+ std::string casename = myHomardIteration->GetCaseName() ;
+ HOMARD::HOMARD_Cas_ptr caseiter = _gen_i->GetCase(casename.c_str()) ;
+ std::string dirnamecase = caseiter->GetDirName() ;
+ std::string dirname = dirnamecase + "/" + GetDirNameLoc() ;
+ return CORBA::string_dup( dirname.c_str() );
}
//=============================================================================
void HOMARD_Iteration_i::SetNumber( CORBA::Long NumIter )
CORBA::Long HOMARD_Iteration_i::GetNumber()
{
ASSERT( myHomardIteration );
- return myHomardIteration->GetNumber() ;
+ return myHomardIteration->GetNumber() ;
}
//=============================================================================
-void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat )
+void HOMARD_Iteration_i::SetState( CORBA::Long Etat )
{
ASSERT( myHomardIteration );
- myHomardIteration->SetEtat( Etat );
+ myHomardIteration->SetState( Etat );
}
//=============================================================================
-CORBA::Boolean HOMARD_Iteration_i::GetEtat()
+CORBA::Long HOMARD_Iteration_i::GetState()
{
ASSERT( myHomardIteration );
- return CORBA::Boolean( myHomardIteration->GetEtat());
+ return myHomardIteration->GetState() ;
}
//=============================================================================
void HOMARD_Iteration_i::SetMeshName( const char* NomMesh )
return CORBA::string_dup( myHomardIteration->GetFieldFile().c_str() );
}
//=============================================================================
+// Instants pour le champ de pilotage
+//=============================================================================
+void HOMARD_Iteration_i::SetTimeStep( CORBA::Long TimeStep )
+{
+ ASSERT( myHomardIteration );
+ myHomardIteration->SetTimeStep( TimeStep );
+}
+//=============================================================================
void HOMARD_Iteration_i::SetTimeStepRank( CORBA::Long TimeStep, CORBA::Long Rank )
{
ASSERT( myHomardIteration );
return CORBA::Long( myHomardIteration->GetRank() );
}
//=============================================================================
+// Instants pour un champ a interpoler
+//=============================================================================
+void HOMARD_Iteration_i::SetFieldInterpTimeStep( const char* FieldInterp, CORBA::Long TimeStep )
+{
+ SetFieldInterpTimeStepRank( FieldInterp, TimeStep, TimeStep );
+}
+//=============================================================================
+void HOMARD_Iteration_i::SetFieldInterpTimeStepRank( const char* FieldInterp, CORBA::Long TimeStep, CORBA::Long Rank )
+{
+ ASSERT( myHomardIteration );
+ myHomardIteration->SetFieldInterpTimeStepRank( FieldInterp, TimeStep, Rank );
+}
+//=============================================================================
+HOMARD::listeFieldInterpTSRsIter* HOMARD_Iteration_i::GetFieldInterpsTimeStepRank()
+{
+ ASSERT( myHomardIteration );
+ const std::list<std::string>& ListString = myHomardIteration->GetFieldInterpsTimeStepRank();
+ HOMARD::listeFieldInterpTSRsIter_var aResult = new HOMARD::listeFieldInterpTSRsIter;
+ aResult->length( ListString.size() );
+ std::list<std::string>::const_iterator it;
+ int i = 0;
+ for ( it = ListString.begin(); it != ListString.end(); it++ )
+ {
+ aResult[i++] = CORBA::string_dup( (*it).c_str() );
+ }
+ return aResult._retn();
+}
+//=============================================================================
+void HOMARD_Iteration_i::SetFieldInterp( const char* FieldInterp )
+{
+ myHomardIteration->SetFieldInterp( FieldInterp );
+}
+//=============================================================================
+HOMARD::listeFieldInterpsIter* HOMARD_Iteration_i::GetFieldInterps()
+{
+ ASSERT( myHomardIteration );
+ const std::list<std::string>& ListString = myHomardIteration->GetFieldInterps();
+ HOMARD::listeFieldInterpsIter_var aResult = new HOMARD::listeFieldInterpsIter;
+ aResult->length( ListString.size() );
+ std::list<std::string>::const_iterator it;
+ int i = 0;
+ for ( it = ListString.begin(); it != ListString.end(); it++ )
+ {
+ aResult[i++] = CORBA::string_dup( (*it).c_str() );
+ }
+ return aResult._retn();
+}
+//=============================================================================
+void HOMARD_Iteration_i::SupprFieldInterps()
+{
+ ASSERT( myHomardIteration );
+ myHomardIteration->SupprFieldInterps();
+}
+//=============================================================================
void HOMARD_Iteration_i::SetLogFile( const char* LogFile )
{
ASSERT( myHomardIteration );
return CORBA::string_dup( myHomardIteration->GetLogFile().c_str() );
}
//=============================================================================
-CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
+CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage, CORBA::Long Option)
{
- MESSAGE ( "Compute : calcul d'une iteration" );
+ MESSAGE ( "Compute : calcul d'une iteration, etatMenage = "<<etatMenage<<", Option = "<<Option );
ASSERT( myHomardIteration );
//
// Nom de l'iteration
char* IterName = GetName() ;
CORBA::Long modeHOMARD = 1 ;
- CORBA::Long Option = 1 ;
+ CORBA::Long Option1 = 1 ;
MESSAGE ( "Compute : calcul de l'teration " << IterName );
- return _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+ return _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option1, Option) ;
}
//=============================================================================
void HOMARD_Iteration_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
MESSAGE ( "MeshInfoOption : information sur le maillage de l'iteration " << IterName );
- CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+ CORBA::Long Option2 = 1 ;
+ CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option, Option2) ;
MESSAGE ( "MeshInfoOption : codret = " << codret );
//
return ;
ASSERT( myHomardIteration );
return CORBA::string_dup( myHomardIteration->GetHypoName().c_str() );
}
+//=============================================================================
+//=============================================================================
+// Divers
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration_i::SetInfoCompute( CORBA::Long MessInfo )
+{
+ ASSERT( myHomardIteration );
+ myHomardIteration->SetInfoCompute( MessInfo );
+}
+//=============================================================================
+CORBA::Long HOMARD_Iteration_i::GetInfoCompute()
+{
+ ASSERT( myHomardIteration );
+ return myHomardIteration->GetInfoCompute() ;
+}