1 // HOMARD HOMARD : implementation of HOMARD idl descriptions
3 // Copyright (C) 2011-2021 CEA/DEN, EDF R&D
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // Author : Gerald NICOLAS, EDF
25 #ifndef _SMESH_HOMARD_ADAPT_HXX_
26 #define _SMESH_HOMARD_ADAPT_HXX_
28 #include "SMESH_SMESH.hxx"
38 #pragma warning ( disable: 4251 )
41 namespace SMESHHOMARDImpl
44 class SMESH_EXPORT HOMARD_Boundary
51 void SetName( const char* Name );
52 std::string GetName() const;
54 std::string GetDumpPython() const;
57 void SetType( int Type );
60 void SetMeshName( const char* MeshName );
61 std::string GetMeshName() const;
63 void SetDataFile( const char* DataFile );
64 std::string GetDataFile() const;
66 void SetCylinder( double X0, double X1, double X2, double X3,
67 double X4, double X5, double X6 );
68 void SetSphere( double X0, double X1, double X2, double X3 );
69 void SetConeR( double Xcentre1, double Ycentre1, double Zcentre1, double Rayon1,
70 double Xcentre2, double Ycentre2, double Zcentre2, double Rayon2);
71 void SetConeA( double Xaxe, double Yaxe, double Zaxe, double Angle,
72 double Xcentre, double Ycentre, double ZCentre);
73 void SetTorus( double X0, double X1, double X2, double X3,
74 double X4, double X5, double X6, double X7 );
76 std::vector<double> GetCoords() const;
78 void SetLimit( double X0, double X1, double X2 );
79 std::vector<double> GetLimit() const;
81 void AddGroup( const char* LeGroupe);
82 void SetGroups(const std::list<std::string>& ListGroup );
83 const std::list<std::string>& GetGroups() const;
87 std::string _DataFile;
88 std::string _MeshName;
90 double _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
91 double _Xaxe, _Yaxe, _Zaxe;
92 double _Xcentre, _Ycentre, _Zcentre, _rayon;
93 double _Xincr, _Yincr, _Zincr;
94 double _Xcentre1, _Ycentre1, _Zcentre1, _Rayon1;
95 double _Xcentre2, _Ycentre2, _Zcentre2, _Rayon2;
98 std::list<std::string> _ListGroupSelected;
101 class SMESH_EXPORT HOMARD_Cas
108 std::string GetDumpPython() const;
111 int SetDirName( const char* NomDir );
112 std::string GetDirName() const;
114 void SetBoundingBox( const std::vector<double>& extremas );
115 const std::vector<double>& GetBoundingBox() const;
117 void AddGroup( const char* Group);
118 void SetGroups( const std::list<std::string>& ListGroup );
119 const std::list<std::string>& GetGroups() const;
122 void AddBoundary( const char* Boundary );
123 void AddBoundaryGroup( const char* Boundary, const char* Group );
124 const std::list<std::string>& GetBoundaryGroup() const;
125 void SupprBoundaryGroup();
127 void AddIteration( const char* NomIteration );
133 std::vector<double> _Boite; // cf HomardQTCommun pour structure du vecteur
134 std::list<std::string> _ListGroup;
135 std::list<std::string> _ListBoundaryGroup;
137 typedef std::string IterName;
138 typedef std::list<IterName> IterNames;
142 class SMESH_EXPORT HomardDriver
145 HomardDriver(const std::string siter, const std::string siterp1);
148 void TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
149 void TexteInfo( int TypeBila, int NumeIter );
150 void TexteMajCoords( int NumeIter );
151 void CreeFichierDonn();
154 void TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
155 void TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres );
156 void TexteConfRaffDera( int ConfType );
158 void TexteBoundaryOption( int BoundaryOption );
159 void TexteBoundaryCAOGr( const std::string GroupName );
160 void TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
161 void TexteBoundaryDiGr( const std::string GroupName );
162 void TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 );
163 void TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName );
165 void TexteAdvanced( int NivMax, double DiamMin, int AdapInit, int LevelOutput );
166 void TexteInfoCompute( int MessInfo );
172 std::string _HOMARD_Exec;
174 std::string _NomFichierConfBase;
175 std::string _NomFichierConf;
176 std::string _NomFichierDonn;
178 std::string _siterp1;
183 class HOMARD_Iteration;
185 class SMESH_EXPORT HOMARD_Gen
192 class SMESH_EXPORT HOMARD_Iteration
199 void SetName( const char* Name );
200 std::string GetName() const;
203 void SetDirNameLoc( const char* NomDir );
204 std::string GetDirNameLoc() const;
206 void SetNumber( int NumIter );
207 int GetNumber() const;
209 void SetState( int etat );
210 int GetState() const;
212 void SetMeshName( const char* NomMesh );
213 std::string GetMeshName() const;
215 void SetMeshFile( const char* MeshFile );
216 std::string GetMeshFile() const;
218 void SetLogFile( const char* LogFile );
219 std::string GetLogFile() const;
221 void SetFileInfo( const char* FileInfo );
222 std::string GetFileInfo() const;
225 void SetInfoCompute( int MessInfo );
226 int GetInfoCompute() const;
232 std::string _NomMesh;
233 std::string _MeshFile;
234 std::string _LogFile;
236 std::string _FileInfo;
240 } // namespace SMESHHOMARDImpl