-// // 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
#include CORBA_CLIENT_HEADER(SALOMEDS)
#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include "HOMARD_i.hxx"
#include "HOMARD_Gen.hxx"
#include "HomardDriver.hxx"
#include "YACSDriver.hxx"
+#include "FrontTrack.hxx"
#include "SALOME_Component_i.hxx"
#include "SALOME_NamingService.hxx"
#include "Utils_CorbaException.hxx"
-
#include <string>
#include <map>
-class HOMARD_Gen_i:
+class HOMARDENGINE_EXPORT HOMARD_Gen_i:
public virtual Engines_Component_i,
public virtual POA_HOMARD::HOMARD_Gen
{
// Les creations
HOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary);
+ HOMARD::HOMARD_Boundary_ptr CreateBoundaryCAO(const char* nomBoundary,
+ const char* DataFile);
HOMARD::HOMARD_Boundary_ptr CreateBoundaryDi (const char* nomBoundary,
- const char* MeshName, const char* FileName);
+ const char* MeshName, const char* DataFile);
HOMARD::HOMARD_Boundary_ptr CreateBoundaryCylinder (const char* nomBoundary,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
HOMARD::HOMARD_Boundary_ptr CreateBoundaryConeA (const char* nomBoundary,
CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, CORBA::Double Angle,
CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre);
+ HOMARD::HOMARD_Boundary_ptr CreateBoundaryTorus (const char* nomBoundary,
+ CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+ CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
+ CORBA::Double RayonRev, CORBA::Double RayonPri);
HOMARD::HOMARD_Cas_ptr CreateCase (const char* nomCas, const char* MeshName, const char* FileName);
HOMARD::HOMARD_Cas_ptr CreateCaseFromIteration (const char* nomCas, const char* DirNameStart);
HOMARD::HOMARD_Iteration_ptr LastIteration (const char* nomCas);
// L'etude
- SALOMEDS::Study_ptr GetCurrentStudy();
- void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
- CORBA::Long GetCurrentStudyID();
+ void UpdateStudy();
+ void IsValidStudy();
// Liens entre structures
void InvalideBoundary(const char* nomBoundary);
void InvalideIter(const char* nomIter);
void InvalideIterOption(const char* nomIter, CORBA::Long Option);
void InvalideIterInfo(const char* nomIter);
+ void InvalideYACS(const char* nomYACS);
void InvalideZone(const char* nomZone);
CORBA::Long DeleteBoundary(const char* nomBoundary);
CORBA::Long Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option1, CORBA::Long Option2);
CORBA::Long ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2);
+ CORBA::Long ComputeCAO(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
+ CORBA::Long ComputeCAObis(HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
char* ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
char* ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
void DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
void DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
- void DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
+ int DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
void DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
- CORBA::Boolean VerifieDir(const char* nomDir);
+ char* VerifieDir(const char* nomDir);
void PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire);
void PublishFileUnderYACS(const char* NomYACS, const char* NomFich, const char* Commentaire);
void PublishCaseUnderYACS(const char* YACSName, const char* CaseName);
void PublishResultInSmesh(const char* NomFich, CORBA::Long Option);
void DeleteResultInSmesh(std::string NomFich, std::string MeshName);
+ void PublishMeshIterInSmesh(const char* NomIter);
// YACS
HOMARD::HOMARD_YACS_ptr CreateYACSSchema (const char* YACSName, const char* nomCas, const char* ScriptFile, const char* DirName, const char* MeshFile);
CORBA::Long YACSWrite(const char* nomYACS);
- CORBA::Long YACSWriteOnFile(const char* nomYACS, const char* YACSFile);
+ CORBA::Long YACSWriteOnFile(const char* nomYACS, const char* XMLFile);
std::string YACSDriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, YACSDriver* myDriver);
std::string YACSDriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, YACSDriver* myDriver);
- void IsValidStudy();
+// Preferences
+ void SetPreferences() ;
+ void SetLanguageShort(const char* LanguageShort);
+ char* GetLanguageShort();
+ void SetPublisMesh(CORBA::Long PublisMeshIN, CORBA::Long PublisMeshOUT);
+ CORBA::Long GetPublisMeshIN();
+ CORBA::Long GetPublisMeshOUT();
+ void SetYACSMaximum(CORBA::Long YACSMaxIter, CORBA::Long YACSMaxNode, CORBA::Long YACSMaxElem);
+ CORBA::Long GetYACSMaxIter();
+ CORBA::Long GetYACSMaxNode();
+ CORBA::Long GetYACSMaxElem();
+ void SetYACSConvergenceType(CORBA::Long YACSTypeTest);
+ CORBA::Long GetYACSConvergenceType();
+
// ---------------------------------------------------------------
// next functions are inherited from SALOMEDS::Driver interface
// --> Data publishing
virtual CORBA::Boolean CanPublishInStudy(CORBA::Object_ptr theIOR);
- virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
- SALOMEDS::SObject_ptr theSObject,
+ virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
CORBA::Object_ptr theObject,
const char* theName);
// virtual void SALOMEException( std::string message );
private:
- void addInStudy(SALOMEDS::Study_ptr theStudy);
- SALOMEDS::SObject_ptr PublishBoundaryInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+ SALOMEDS::SObject_ptr PublishBoundaryInStudy(SALOMEDS::StudyBuilder_var aStudyBuilder,
HOMARD::HOMARD_Boundary_ptr theObject, const char* theName);
- SALOMEDS::SObject_ptr PublishCaseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+ SALOMEDS::SObject_ptr PublishCaseInStudy(SALOMEDS::StudyBuilder_var aStudyBuilder,
HOMARD::HOMARD_Cas_ptr theObject, const char* theName);
- SALOMEDS::SObject_ptr PublishHypotheseInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+ SALOMEDS::SObject_ptr PublishHypotheseInStudy(SALOMEDS::StudyBuilder_var aStudyBuilder,
HOMARD::HOMARD_Hypothesis_ptr theObject, const char* theName);
- SALOMEDS::SObject_ptr PublishYACSInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+ SALOMEDS::SObject_ptr PublishYACSInStudy(SALOMEDS::StudyBuilder_var aStudyBuilder,
HOMARD::HOMARD_YACS_ptr theObject, const char* theName);
- SALOMEDS::SObject_ptr PublishZoneInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::StudyBuilder_var aStudyBuilder,
+ SALOMEDS::SObject_ptr PublishZoneInStudy(SALOMEDS::StudyBuilder_var aStudyBuilder,
HOMARD::HOMARD_Zone_ptr theObject, const char* theName);
virtual void PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder,
SALOMEDS::SObject_var aResultSO,
HOMARD::HOMARD_Zone_ptr newZone();
- virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
- CORBA::Boolean isPublished,
- CORBA::Boolean isMultiFile,
- CORBA::Boolean& isValidScript);
+ virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
+ CORBA::Boolean isMultiFile,
+ CORBA::Boolean& isValidScript);
virtual char* getVersion();
std::string GetStringInTexte( const std::string Texte, const std::string String, int option ) ;
std::map<std::string, HOMARD::HOMARD_Zone_var> _mesZones;
std::map<int, PortableServer::ServantBase*> _idmap;
};
- typedef std::map<int, StudyContext> ContextMap;
::HOMARD_Gen* myHomard;
- SALOMEDS::Study_var myCurrentStudy;
- ContextMap myContextMap;
+ SALOMEDS::Study_var myStudy;
+ StudyContext myStudyContext;
SALOME_NamingService* _NS;
int _tag_gene ;
int _tag_yacs ;
int _tag_zone ;
+// Preferences
+ std::string _Langue ;
+ std::string _LangueShort ;
+ int _PublisMeshIN ;
+ int _PublisMeshOUT ;
+ int _YACSMaxIter ;
+ int _YACSMaxNode ;
+ int _YACSMaxElem ;
+ int _YACSTypeTest ;
+ ;
+
};
#endif