Salome HOME
7f12aa9da1c93bc8398bcebce1618424b5388707
[modules/homard.git] / src / HOMARD / HOMARD_Iteration.hxx
1 //  HOMARD HOMARD : implementation of HOMARD idl descriptions
2 //
3 // Copyright (C) 2011-2022  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, or (at your option) any later version.
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 //  File   : HOMARD_Iteration.hxx
22 //  Author : Gerald NICOLAS, EDF
23 //  Module : HOMARD
24 //
25 // Remarques :
26 // L'ordre de description des fonctions est le meme dans tous les fichiers
27 // HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
28 // 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
29 // 2. Les caracteristiques
30 // 3. Le lien avec les autres structures
31 //
32 // Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
33
34 #ifndef _HOMARD_ITER_HXX_
35 #define _HOMARD_ITER_HXX_
36
37 #include "HOMARD.hxx"
38
39 #include <string>
40 #include <list>
41
42 #if defined WIN32
43 #pragma warning ( disable: 4251 )
44 #endif
45
46 class HOMARDIMPL_EXPORT HOMARD_Iteration
47 {
48 public:
49   HOMARD_Iteration();
50   ~HOMARD_Iteration();
51
52 // Generalites
53   void                          SetName( const char* Name );
54   std::string                   GetName() const;
55
56   std::string                   GetDumpPython() const;
57
58 // Caracteristiques
59   void                          SetDirNameLoc( const char* NomDir );
60   std::string                   GetDirNameLoc() const;
61
62   void                          SetNumber( int NumIter );
63   int                           GetNumber() const;
64
65   void                          SetState( int etat );
66   int                           GetState() const;
67
68   void                          SetMeshName( const char* NomMesh );
69   std::string                   GetMeshName() const;
70
71   void                          SetMeshFile( const char* MeshFile );
72   std::string                   GetMeshFile() const;
73
74   void                          SetFieldFile( const char* FieldFile );
75   std::string                   GetFieldFile() const;
76 // Instants pour le champ de pilotage
77   void                          SetTimeStep( int TimeStep );
78   void                          SetTimeStepRank( int TimeStep, int Rank );
79   void                          SetTimeStepRankLast();
80   int                           GetTimeStep() const;
81   int                           GetRank() const;
82 // Instants pour un champ a interpoler
83   void                          SetFieldInterpTimeStep( const char* FieldInterp, int TimeStep );
84   void                          SetFieldInterpTimeStepRank( const char* FieldInterp, int TimeStep, int Rank );
85   const std::list<std::string>& GetFieldInterpsTimeStepRank() const;
86   void                          SetFieldInterp( const char* FieldInterp );
87   const std::list<std::string>& GetFieldInterps() const;
88   void                          SupprFieldInterps();
89
90   void                          SetLogFile( const char* LogFile );
91   std::string                   GetLogFile() const;
92
93   void                          SetFileInfo( const char* FileInfo );
94   std::string                   GetFileInfo() const;
95
96 // Liens avec les autres iterations
97   void                          LinkNextIteration( const char* NomIteration );
98   void                          UnLinkNextIteration( const char* NomIteration );
99   void                          UnLinkNextIterations();
100   const std::list<std::string>& GetIterations() const;
101
102   void                          SetIterParentName( const char* iterParent );
103   std::string                   GetIterParentName() const;
104
105 // Liens avec les autres structures
106   void                          SetCaseName( const char* NomCas );
107   std::string                   GetCaseName() const;
108
109   void                          SetHypoName( const char* NomHypo );
110   std::string                   GetHypoName() const;
111
112 // Divers
113   void                          SetInfoCompute( int MessInfo );
114   int                           GetInfoCompute() const;
115
116 private:
117   std::string                   _Name;
118   int                           _Etat;
119   int                           _NumIter;
120   std::string                   _NomMesh;
121   std::string                   _MeshFile;
122   std::string                   _FieldFile;
123   int                           _TimeStep;
124   int                           _Rank;
125   std::string                   _LogFile;
126   std::string                   _IterParent;
127   std::string                   _NomHypo;
128   std::string                   _NomCas;
129   std::string                   _NomDir;
130   std::list<std::string>        _mesIterFilles;
131   std::string                   _FileInfo;
132   int                           _MessInfo;
133   // La liste des champs retenus par l'hypothese
134   std::list<std::string>        _ListFieldInterp;
135   // La liste des triplets (champs, pas de temps, numero d'ordre) retenus par l'iteration
136   std::list<std::string>        _ListFieldInterpTSR;
137 };
138
139 #endif