X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD_I%2FHOMARD_Gen_i.hxx;h=423dea84e3c1a165b7e36459bd9ef8b29de2aa85;hb=222b99e1a96feddb4e7fda5526e58769c22bc1e2;hp=84af738e40afa742a8a9f2e451ec6ad542f0ff33;hpb=ab970555a7eea806bb7ecc5141b1272aa07f5899;p=modules%2Fhomard.git diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index 84af738e..423dea84 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -1,9 +1,9 @@ -// // Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// Copyright (C) 2011-2020 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 @@ -35,24 +35,23 @@ #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 #include -class HOMARDENGINE_EXPORT HOMARD_Gen_i: - public virtual Engines_Component_i, - public virtual POA_HOMARD::HOMARD_Gen +class HOMARDENGINE_EXPORT HOMARD_Gen_i : public Engines_Component_i, public POA_HOMARD::HOMARD_Gen { public: HOMARD_Gen_i( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, const char* instanceName, - const char* interfaceName ); + const char* interfaceName, + bool checkNS); virtual ~HOMARD_Gen_i(); @@ -60,8 +59,10 @@ public: // 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, @@ -141,9 +142,7 @@ public: 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 @@ -177,11 +176,13 @@ public: 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); char* VerifieDir(const char* nomDir); @@ -212,6 +213,8 @@ public: CORBA::Long GetYACSMaxIter(); CORBA::Long GetYACSMaxNode(); CORBA::Long GetYACSMaxElem(); + void SetYACSConvergenceType(CORBA::Long YACSTypeTest); + CORBA::Long GetYACSConvergenceType(); // --------------------------------------------------------------- @@ -254,8 +257,7 @@ public: // --> 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); @@ -274,16 +276,15 @@ public: // 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, @@ -299,10 +300,9 @@ private: 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 ) ; @@ -318,11 +318,9 @@ private: std::map _mesZones; std::map _idmap; }; - typedef std::map ContextMap; ::HOMARD_Gen* myHomard; - SALOMEDS::Study_var myCurrentStudy; - ContextMap myContextMap; + StudyContext myStudyContext; SALOME_NamingService* _NS; int _tag_gene ; @@ -339,8 +337,9 @@ private: int _YACSMaxIter ; int _YACSMaxNode ; int _YACSMaxElem ; - ; - + int _YACSTypeTest ; +protected: + SALOMEDS::Study_var myStudy; }; #endif