Version: 9.16.0
SMESH_Homard_i.hxx
Go to the documentation of this file.
1// Copyright (C) 2011-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef _SMESH_HOMARD_I_HXX_
21#define _SMESH_HOMARD_I_HXX_
22
23#include <SALOMEconfig.h>
24#include CORBA_SERVER_HEADER(SMESH_Homard)
25#include CORBA_CLIENT_HEADER(SALOMEDS)
26#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
27#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
28#include CORBA_CLIENT_HEADER(SMESH_Gen)
29#include CORBA_CLIENT_HEADER(SMESH_Mesh)
30
31#include "SMESH.hxx"
32#include "SMESH_Homard.hxx"
33//#include "FrontTrack.hxx"
34#include "SALOME_Component_i.hxx"
35#include "SALOME_NamingService.hxx"
36#include "Utils_CorbaException.hxx"
37
38#include <map>
39#include <set>
40#include <string>
41#include <vector>
42
43namespace SMESHHOMARD_I
44{
45
46class SMESH_I_EXPORT HOMARD_Boundary_i : public virtual SALOME::GenericObj_i,
47 public virtual POA_SMESHHOMARD::HOMARD_Boundary
48{
49public:
50 HOMARD_Boundary_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
52
53 virtual ~HOMARD_Boundary_i();
54
55 // Generalites
56 void SetName(const char* Name);
57 char* GetName();
58
59 char* GetDumpPython();
60
61 // Caracteristiques
62 void SetType(CORBA::Long Type);
63 CORBA::Long GetType();
64
65 void SetMeshName(const char* MeshName);
66 char* GetMeshName();
67
68 void SetDataFile(const char* DataFile);
69 char* GetDataFile();
70
71 void SetCylinder(double Xcentre, double Ycentre, double ZCentre,
72 double Xaxe, double Yaxe, double Zaxe,
73 double rayon);
74 void SetSphere(double Xcentre, double Ycentre, double ZCentre,
75 double rayon);
76 void SetConeR(double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1,
77 double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
78 void SetConeA(double Xaxe, double Yaxe, double Zaxe, double Angle,
79 double Xcentre, double Ycentre, double ZCentre);
80 void SetTorus(double Xcentre, double Ycentre, double ZCentre,
81 double Xaxe, double Yaxe, double Zaxe,
82 double rayonRev, double rayonPri);
83
84 SMESHHOMARD::double_array* GetCoords();
85
86 void SetLimit(double Xincr, double Yincr, double Zincr);
87 SMESHHOMARD::double_array* GetLimit();
88
89 void AddGroup(const char* Group);
90 void SetGroups(const SMESHHOMARD::ListGroupType& ListGroup);
91 SMESHHOMARD::ListGroupType* GetGroups();
92
93private:
95 SMESHHOMARD::HOMARD_Gen_var _gen_i;
96};
97
98class SMESH_I_EXPORT HOMARD_Cas_i : public virtual SALOME::GenericObj_i,
99 public virtual POA_SMESHHOMARD::HOMARD_Cas
100{
101public:
102 HOMARD_Cas_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
103 HOMARD_Cas_i();
104
105 virtual ~HOMARD_Cas_i();
106
107 char* GetDumpPython();
108
109 // Caracteristiques
110 void SetDirName(const char* NomDir);
111 char* GetDirName();
112
113 void SetBoundingBox(const SMESHHOMARD::extrema& LesExtremes);
114 SMESHHOMARD::extrema* GetBoundingBox();
115
116 void AddGroup(const char* Group);
117 void SetGroups(const SMESHHOMARD::ListGroupType& ListGroup);
118 SMESHHOMARD::ListGroupType* GetGroups();
119
120 void AddBoundary(const char* Boundary);
121 void AddBoundaryGroup(const char* Boundary, const char* Group);
122 SMESHHOMARD::ListBoundaryGroupType* GetBoundaryGroup();
123 void SupprBoundaryGroup();
124
125 void AddIteration(const char* NomIteration);
126
127private:
129 SMESHHOMARD::HOMARD_Gen_var _gen_i;
130};
131
133{
134public:
135 HOMARD_Iteration_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
137
138 virtual ~HOMARD_Iteration_i();
139
140 // Generalites
141 void SetName(const char* Name);
142 char* GetName();
143
144 // Caracteristiques
145 void SetDirNameLoc(const char* NomDir);
146 char* GetDirNameLoc();
147
148 char* GetDirName();
149
150 void SetNumber(CORBA::Long NumIter);
151 CORBA::Long GetNumber();
152
153 void SetState(CORBA::Long etat);
154 CORBA::Long GetState();
155
156 void SetMeshName(const char* NomMesh);
157 char* GetMeshName();
158
159 void SetMeshFile(const char* MeshFile);
160 char* GetMeshFile();
161
162 void SetLogFile(const char* LogFile);
163 char* GetLogFile();
164
165 void SetFileInfo(const char* FileInfo);
166 char* GetFileInfo();
167
168 // Liens avec les autres structures
169 void SetCaseName(const char* NomCas);
170 char* GetCaseName();
171
172 // Drivers
173 void SetInfoCompute(CORBA::Long MessInfo);
174 CORBA::Long GetInfoCompute();
175
176private:
178 SMESHHOMARD::HOMARD_Gen_var _gen_i;
179};
180
181class SMESH_I_EXPORT HOMARD_Gen_i : public virtual SALOME::GenericObj_i,
182 public virtual POA_SMESHHOMARD::HOMARD_Gen
183{
184public:
185 HOMARD_Gen_i();
186 virtual ~HOMARD_Gen_i();
187
188 // Les creations
189 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundary (const char* nomBoundary,
190 CORBA::Long typeBoundary);
191 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryCAO (const char* nomBoundary,
192 const char* DataFile);
193 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryDi (const char* nomBoundary,
194 const char* MeshName, const char* DataFile);
195 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryCylinder
196 (const char* nomBoundary,
197 CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
198 CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
199 CORBA::Double Rayon);
200 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundarySphere
201 (const char* nomBoundary,
202 CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
203 CORBA::Double Rayon);
204 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryConeR
205 (const char* nomBoundary,
206 CORBA::Double Xcentre1, CORBA::Double Ycentre1, CORBA::Double Zcentre1,
207 CORBA::Double Rayon1,
208 CORBA::Double Xcentre2, CORBA::Double Ycentre2, CORBA::Double Zcentre2,
209 CORBA::Double Rayon2);
210 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryConeA
211 (const char* nomBoundary,
212 CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
213 CORBA::Double Angle,
214 CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre);
215 SMESHHOMARD::HOMARD_Boundary_ptr CreateBoundaryTorus
216 (const char* nomBoundary,
217 CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
218 CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
219 CORBA::Double RayonRev, CORBA::Double RayonPri);
220
221 SMESHHOMARD::HOMARD_Cas_ptr CreateCaseOnMesh (const char* MeshName,
222 SMESH::SMESH_Mesh_ptr smeshMesh,
223 const char* theWorkingDir);
224 SMESHHOMARD::HOMARD_Cas_ptr CreateCase (const char* MeshName,
225 const char* FileName,
226 const char* theWorkingDir);
227
228 HOMARD_Iteration_i* CreateIteration();
229
230 // Les informations
231 SMESHHOMARD::HOMARD_Boundary_ptr GetBoundary (const char* nomBoundary);
232 SMESHHOMARD::HOMARD_Cas_ptr GetCase ();
233 HOMARD_Iteration_i* GetIteration (CORBA::Long numIter);
234
235 SMESHHOMARD::listeBoundarys* GetAllBoundarysName();
236
237 void InvalideBoundary(const char* nomBoundary);
238
239 CORBA::Long DeleteBoundary(const char* nomBoundary);
240 void DeleteCase();
241 CORBA::Long DeleteIteration(int numIter);
242
243 void AddBoundary(const char* Boundary);
244 void AddBoundaryGroup(const char* Boundary, const char* Group);
245
246 void AssociateCaseIter(int numIter, const char* labelIter);
247 char* CreateDirNameIter(const char* nomrep, CORBA::Long num);
248
249 CORBA::Long Compute();
250 CORBA::Long ComputeAdap(SMESHHOMARDImpl::HomardDriver* myDriver);
251 CORBA::Long ComputeCAO();
252 CORBA::Long ComputeCAObis();
253 char* ComputeDirManagement();
254 char* ComputeDirPaManagement();
255 int DriverTexteBoundary(SMESHHOMARDImpl::HomardDriver* myDriver);
256
257 void PublishResultInSmesh(const char* NomFich);
258 void DeleteResultInSmesh(std::string NomFich, std::string MeshName);
259
260 void PythonDump();
261
262 // Preferences
263 void SetConfType (CORBA::Long theConfType);
264 void SetKeepMedOUT (bool theKeepMedOUT);
265 void SetPublishMeshOUT (bool thePublishMeshOUT);
266 void SetMeshNameOUT (const char* theMeshNameOUT);
267 void SetMeshFileOUT (const char* theMeshFileOUT);
268
269 void SetVerboseLevel (CORBA::Long theVerboseLevel);
270 void SetKeepWorkingFiles(bool theKeepWorkingFiles);
271 void SetLogInFile(bool theLogInFile);
272 void SetLogFile (const char* theLogFile);
273 void SetRemoveLogOnSuccess(bool theRemoveLogOnSuccess);
274
275private:
276 SMESHHOMARD::HOMARD_Boundary_ptr newBoundary();
277 SMESHHOMARD::HOMARD_Cas_ptr newCase();
278 HOMARD_Iteration_i* newIteration();
279
280private:
284 SMESHHOMARD::HOMARD_Cas_var myCase;
285 std::map<std::string, SMESHHOMARD::HOMARD_Boundary_var> _mesBoundarys;
286
287 // Preferences
288 int _ConfType; // Le type de conformite ou non conformite
295 std::string _MeshNameOUT;
296 std::string _MeshFileOUT;
297 std::string _LogFile;
298
299 // Input data type
301 SMESH::SMESH_Mesh_var _SmeshMesh;
302 std::string _TmpMeshFile;
303};
304
305SMESH_I_EXPORT std::vector<double> GetBoundingBoxInMedFile(const char * aFile);
306SMESH_I_EXPORT std::set<std::string> GetListeGroupesInMedFile(const char * aFile);
307
308}; // namespace SMESHHOMARD_I
309
310#endif
#define SMESH_I_EXPORT
Definition: SMESH.hxx:39
Definition: SMESH_Homard.hxx:45
Definition: SMESH_Homard.hxx:102
Definition: SMESH_Homard.hxx:186
Definition: SMESH_Homard.hxx:193
Definition: SMESH_Homard.hxx:143
Definition: SMESH_Homard_i.hxx:48
SMESHHOMARDImpl::HOMARD_Boundary * myHomardBoundary
Definition: SMESH_Homard_i.hxx:94
SMESHHOMARD::HOMARD_Gen_var _gen_i
Definition: SMESH_Homard_i.hxx:95
Definition: SMESH_Homard_i.hxx:100
SMESHHOMARDImpl::HOMARD_Cas * myHomardCas
Definition: SMESH_Homard_i.hxx:128
SMESHHOMARD::HOMARD_Gen_var _gen_i
Definition: SMESH_Homard_i.hxx:129
Definition: SMESH_Homard_i.hxx:183
bool _KeepWorkingFiles
Definition: SMESH_Homard_i.hxx:291
bool _CaseOnMedFile
Definition: SMESH_Homard_i.hxx:300
int _VerboseLevel
Definition: SMESH_Homard_i.hxx:294
bool _PublishMeshOUT
Definition: SMESH_Homard_i.hxx:290
SMESH::SMESH_Mesh_var _SmeshMesh
Definition: SMESH_Homard_i.hxx:301
bool _LogInFile
Definition: SMESH_Homard_i.hxx:292
bool _RemoveLogOnSuccess
Definition: SMESH_Homard_i.hxx:293
bool _KeepMedOUT
Definition: SMESH_Homard_i.hxx:289
SMESHHOMARD::HOMARD_Cas_var myCase
Definition: SMESH_Homard_i.hxx:284
int _ConfType
Definition: SMESH_Homard_i.hxx:288
std::string _LogFile
Definition: SMESH_Homard_i.hxx:297
std::string _MeshFileOUT
Definition: SMESH_Homard_i.hxx:296
std::map< std::string, SMESHHOMARD::HOMARD_Boundary_var > _mesBoundarys
Definition: SMESH_Homard_i.hxx:285
SMESHHOMARDImpl::HOMARD_Gen * myHomard
Definition: SMESH_Homard_i.hxx:281
std::string _MeshNameOUT
Definition: SMESH_Homard_i.hxx:295
std::string _TmpMeshFile
Definition: SMESH_Homard_i.hxx:302
HOMARD_Iteration_i * myIteration0
Definition: SMESH_Homard_i.hxx:282
HOMARD_Iteration_i * myIteration1
Definition: SMESH_Homard_i.hxx:283
Definition: SMESH_Homard_i.hxx:133
SMESHHOMARDImpl::HOMARD_Iteration * myHomardIteration
Definition: SMESH_Homard_i.hxx:177
SMESHHOMARD::HOMARD_Gen_var _gen_i
Definition: SMESH_Homard_i.hxx:178
void SetCaseName(const char *NomCas)
Definition: SMESH_Homard_i.cxx:99
std::vector< double > GetBoundingBoxInMedFile(const char *aFile)
Definition: SMESH_Homard_i.cxx:2675
std::set< std::string > GetListeGroupesInMedFile(const char *aFile)
Definition: SMESH_Homard_i.cxx:2578
sequence< double > extrema
Definition: SMESH_Homard.idl:31
sequence< double > double_array
Definition: SMESH_Homard.idl:30
sequence< string > ListBoundaryGroupType
Definition: SMESH_Homard.idl:33
sequence< string > listeBoundarys
Definition: SMESH_Homard.idl:34
sequence< string > ListGroupType
Definition: SMESH_Homard.idl:32
QString GetName(const Handle(SALOME_InteractiveObject)&theIO)
Definition: SMESHGUI_Utils.cxx:252
SMESH::SMESH_Group_var AddGroup(SMESH::SMESH_Mesh_ptr theMesh, SMESH::ElementType theType, const QString &theGroupName)
Definition: SMESHGUI_GroupUtils.cxx:38
void SetName(_PTR(SObject) theSObject, const QString &theName)
Definition: SMESHGUI_Utils.cxx:134