Salome HOME
7377aa25eff229db0f34425d88234f569d6338ff
[modules/homard.git] / src / HOMARD / HomardDriver.hxx
1 //  HOMARD HOMARD : implementation of HOMARD idl descriptions
2 //
3 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
4 //
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.
9 //
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.
14 //
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
18 //
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 //
21
22 # ifndef __HOMARDDRIVER_H__
23 # define __HOMARDDRIVER_H__
24
25 #include <iostream>
26 #include <fstream>
27
28 class HomardDriver
29 {
30 public:
31   HomardDriver(const std::string siter, const std::string siterp1);
32   ~HomardDriver();
33   //
34   void        TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
35   void        TexteInfo( int TypeBila, int NumeIter );
36   void        CreeFichierDonn();
37   void        TexteAdap( );
38   void        CreeFichier();
39   void        TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
40   void        TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres );
41   void        TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera );
42   void        TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 );
43   void        TexteGroup( const std::string GroupName );
44   void        TexteField( const std::string FieldName, const std::string FieldFile,
45                           int TimeStep, int Rank,
46                           int TypeThR, double ThreshR, int TypeThC, double ThreshC,
47                           int UsField, int UsCmpI );
48   void        TexteCompo( int NumeComp, const std::string NomCompo);
49
50   void        TexteBoundaryOption( int BoundaryOption );
51   void        TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
52   void        TexteBoundaryDiGr( const std::string GroupName );
53   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 );
54   void        TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName );
55
56   void        TexteFieldInterp( int TypeFieldInterp, const std::string FieldFile, const std::string MeshFile,
57                                 int TimeStep, int Rank );
58   void        TexteFieldInterpName( int NumeChamp, const std::string FieldName);
59   void        TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput);
60   void        CloseFichier();
61   //
62   int         ExecuteHomard(int option);
63   //
64   bool        LireFichier();
65   bool        EcrireFichier();
66   void        SetTexte( const std::string texte );
67   std::string GetTexte();
68   std::string GetFichierInfo();
69   std::string GetFichierBasic();
70   std::string GetFichierResultMed();
71   std::string GetFichierHomard();
72   int         GetFichierNumeroIter();
73
74 public:
75   std::string _HOMARD_Exec;
76   std::string _NomDir;
77   std::string _NomFichierConfBase;
78   std::string _NomFichierConf;
79   std::string _NomFichierDonn;
80   std::string _siter;
81   std::string _siterp1;
82   std::string _Texte;
83   int         _TimeStep;
84   int         _Rank;
85   bool _bLu;
86
87 private :
88   std::string GetStringInTexte( std::string chaineCherchee, int longueur = 9 );
89 };
90
91 # endif         /* # ifndef __HOMARDDRIVER_H__ */