Salome HOME
Merge branch 'master' into gni/adaptation
[modules/smesh.git] / src / ADAPT / HOMARD_Hypothesis.hxx
1 //  HOMARD HOMARD : implementation of HOMARD idl descriptions
2 //
3 // Copyright (C) 2011-2020  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_Hypothesis.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_HYPOTHESIS_HXX_
35 #define _HOMARD_HYPOTHESIS_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_Hypothesis
47 {
48 public:
49   HOMARD_Hypothesis();
50   ~HOMARD_Hypothesis();
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                          SetAdapType( int TypeAdap );
60   int                           GetAdapType() const;
61   void                          SetRefinTypeDera( int TypeRaff, int TypeDera );
62   int                           GetRefinType() const;
63   int                           GetUnRefType() const;
64
65   void                          SetField( const char* FieldName );
66   std::string                   GetFieldName() const;
67   void                          SetUseField( int UsField );
68   int                           GetUseField()    const;
69
70   void                          SetUseComp( int UsCmpI );
71   int                           GetUseComp()    const;
72   void                          AddComp( const char* NomComp );
73   void                          SupprComp( const char* NomComp );
74   void                          SupprComps();
75   const std::list<std::string>& GetComps() const;
76
77   void                          SetRefinThr( int TypeThR, double ThreshR );
78   int                           GetRefinThrType()   const;
79   double                        GetThreshR()   const;
80   void                          SetUnRefThr( int TypeThC, double ThreshC );
81   int                           GetUnRefThrType()   const;
82   double                        GetThreshC()   const;
83
84   void                          SetNivMax( int NivMax );
85   const int                     GetNivMax() const;
86
87   void                          SetDiamMin( double DiamMin );
88   const double                  GetDiamMin() const;
89
90   void                          SetAdapInit( int AdapInit );
91   const int                     GetAdapInit() const;
92
93   void                          SetExtraOutput( int ExtraOutput );
94   const int                     GetExtraOutput() const;
95
96   void                          AddGroup( const char* Group);
97   void                          SupprGroup( const char* Group );
98   void                          SupprGroups();
99   void                          SetGroups(const std::list<std::string>& ListGroup );
100   const std::list<std::string>& GetGroups() const;
101
102   void                          SetTypeFieldInterp( int TypeFieldInterp );
103   int                           GetTypeFieldInterp() const;
104   void                          AddFieldInterpType( const char* FieldInterp, int TypeInterp );
105   void                          SupprFieldInterp( const char* FieldInterp );
106   void                          SupprFieldInterps();
107   const std::list<std::string>& GetFieldInterps() const;
108
109 // Liens avec les autres structures
110   void                          SetCaseCreation( const char* NomCasCreation );
111   std::string                   GetCaseCreation() const;
112
113   void                          LinkIteration( const char* NomIter );
114   void                          UnLinkIteration( const char* NomIter );
115   void                          UnLinkIterations();
116   const std::list<std::string>& GetIterations() const;
117
118   void                          AddZone( const char* NomZone, int TypeUse );
119   void                          SupprZone( const char* NomZone );
120   void                          SupprZones();
121   const std::list<std::string>& GetZones() const;
122
123 private:
124   std::string                   _Name;
125   std::string                   _NomCasCreation;
126
127   int                           _TypeAdap; // -1 pour une adapation Uniforme,
128                                            //  0 si l adaptation depend des zones,
129                                            //  1 pour des champs
130
131   int                           _TypeRaff;
132   int                           _TypeDera;
133
134   std::string                   _Field;
135   int                           _TypeThR;
136   int                           _TypeThC;
137   double                        _ThreshR;
138   double                        _ThreshC;
139   int                           _UsField;
140   int                           _UsCmpI;
141   int                           _TypeFieldInterp; // 0 pour aucune interpolation,
142                                                   // 1 pour interpolation de tous les champs,
143                                                   // 2 pour une liste
144   int                           _NivMax;
145   double                        _DiamMin;
146   int                           _AdapInit;
147   int                           _ExtraOutput;
148
149   std::list<std::string>        _ListIter;
150   std::list<std::string>        _ListZone;
151   std::list<std::string>        _ListComp;
152   std::list<std::string>        _ListGroupSelected;
153   std::list<std::string>        _ListFieldInterp;
154
155 };
156
157 #endif