]> SALOME platform Git repositories - modules/homard.git/blob - doc/en/tui_create_hypothese.rst
Salome HOME
complements
[modules/homard.git] / doc / en / tui_create_hypothese.rst
1 .. _tui_create_hypothese:
2
3 The hypothesis
4 ##############
5
6 .. index:: single: iteration
7 .. index:: single: hypothesis
8 .. index:: single: zone
9
10 The variables are described in :ref:`gui_create_hypothese`.
11
12 Methods of the class homard
13 ***************************
14
15 +---------------------------------------------------------------+
16 +---------------------------------------------------------------+
17 | .. module:: CreateHypothesis                                  |
18 |                                                               |
19 | **CreateHypothesis(hypo_name)**                               |
20 |     Returns an instance of the class ``hypothese``            |
21 |                                                               |
22 |     - ``hypo_name``: the name of the hypothesis               |
23 +---------------------------------------------------------------+
24 | .. module:: GetHypothesis                                     |
25 |                                                               |
26 | **GetHypothesis(hypo_name)**                                  |
27 |     Returns an instance of the class ``hypothese``            |
28 |     known by its name                                         |
29 |                                                               |
30 |     - ``hypo_name``: the name of the hypothesis               |
31 +---------------------------------------------------------------+
32 | .. module:: GetAllHypothesesName                              |
33 |                                                               |
34 | **GetAllHypothesesName()**                                    |
35 |     Returns the liste of the name of all the existing         |
36 |     hypotheses                                                |
37 |                                                               |
38 +---------------------------------------------------------------+
39
40 Methods of the class hypothese
41 ******************************
42
43 General methods
44 ===============
45
46 +---------------------------------------------------------------+
47 +---------------------------------------------------------------+
48 | .. module:: GetName                                           |
49 |                                                               |
50 | **GetName()**                                                 |
51 |     Returns the name of the hypothesis                        |
52 +---------------------------------------------------------------+
53 | .. module:: SetAdapRefinUnRef                                 |
54 |                                                               |
55 | **SetAdapRefinUnRef(Adap, Refin, UnRef)**                     |
56 |     Gives the type of adaptation to the hypothesis            |
57 |                                                               |
58 |     - ``Adap``: integer that defines the type of adaptation   |
59 |                                                               |
60 |         * -1: uniform                                         |
61 |         * 0: by zones                                         |
62 |         * 1: by a field                                       |
63 |                                                               |
64 |     - ``Refin``: integer that informs if the refinement is    |
65 |       active or not                                           |
66 |                                                               |
67 |         * 0: unactive                                         |
68 |         * 1: active                                           |
69 |                                                               |
70 |     - ``UnRef``: integer that informs if the refinement is    |
71 |       active or not                                           |
72 |                                                               |
73 |         * 0: unactive                                         |
74 |         * 1: active                                           |
75 |                                                               |
76 +---------------------------------------------------------------+
77 | .. module:: GetAdapType                                       |
78 |                                                               |
79 | **GetAdapType()**                                             |
80 |     Returns the type of the adaptation                        |
81 +---------------------------------------------------------------+
82 | .. module:: GetRefinType                                      |
83 |                                                               |
84 | **GetRefinType()**                                            |
85 |     Returns the type of the refinement                        |
86 +---------------------------------------------------------------+
87 | .. module:: GetUnRefType                                      |
88 |                                                               |
89 | **GetUnRefType()**                                            |
90 |     Returns the type of the unrefinement                      |
91 +---------------------------------------------------------------+
92 | .. module:: Delete                                            |
93 |                                                               |
94 | **Delete()**                                                  |
95 |     Deletes the hypothesis                                    |
96 |                                                               |
97 |     Returns an integer:                                       |
98 |         * 0: the destruction is done                          |
99 |         * other value: problem                                |
100 +---------------------------------------------------------------+
101
102 The field and the thresholds
103 ============================
104
105 +---------------------------------------------------------------+
106 +---------------------------------------------------------------+
107 | .. module:: SetField                                          |
108 |                                                               |
109 | **SetField(field_name)**                                      |
110 |     Gives the name of a field to the hypothesis               |
111 |                                                               |
112 |     - ``field_name``: the name of the field                   |
113 +---------------------------------------------------------------+
114 | .. module:: GetFieldName                                      |
115 |                                                               |
116 | **GetFieldName()**                                            |
117 |     Returns the name of the field                             |
118 +---------------------------------------------------------------+
119 | .. module:: SetUseField                                       |
120 |                                                               |
121 | **SetUseField(use_field)**                                    |
122 |     Gives the usage of the field for the hypothesis           |
123 |                                                               |
124 |     - ``use_field``: integer that defines how the field is    |
125 |       used                                                    |
126 |                                                               |
127 |        * 0: value by element (default)                        |
128 |        * 1: jump between an element and its neighbours        |
129 +---------------------------------------------------------------+
130 | .. module:: SetRefinThr                                       |
131 |                                                               |
132 | **SetRefinThr(type_thres, threshold)**                        |
133 |     Defines the thresholds for the refinement                 |
134 |                                                               |
135 |     - ``type_thres``: integer that defines the type of the    |
136 |       threshold for the refinement                            |
137 |                                                               |
138 |        * 1: absolute value                                    |
139 |        * 2: relative value in %                               |
140 |        * 3: ratio of elements in %                            |
141 |        * 4: mean + n times the standard deviation             |
142 |                                                               |
143 |     - ``threshold``: numerical value that defines the         |
144 |       threshold                                               |
145 +---------------------------------------------------------------+
146 | .. module:: GetRefinThrType                                   |
147 |                                                               |
148 | **GetRefinThrType()**                                         |
149 |     Returns the type of the threshold for the refinement      |
150 +---------------------------------------------------------------+
151 | .. module:: SetUnRefThr                                       |
152 |                                                               |
153 | **SetUnRefThr(type_thres, threshold)**                        |
154 |     Defines the thresholds for the unrefinement               |
155 |                                                               |
156 |     - ``type_thres``: integer that defines the type of the    |
157 |       threshold for the unrefinement                          |
158 |                                                               |
159 |        * 1: absolute value                                    |
160 |        * 2: relative value in %                               |
161 |        * 3: ratio of elements in %                            |
162 |        * 4: mean - n times the standard deviation             |
163 |                                                               |
164 |     - ``threshold``: numerical value that defines the         |
165 |       threshold                                               |
166 +---------------------------------------------------------------+
167 | .. module:: GetUnRefThrType                                   |
168 |                                                               |
169 | **GetUnRefThrType()**                                         |
170 |     Returns the type of the threshold for the unrefinement    |
171 +---------------------------------------------------------------+
172
173
174 The components of the field
175 ===========================
176
177 +---------------------------------------------------------------+
178 +---------------------------------------------------------------+
179 | .. module:: AddComp                                           |
180 |                                                               |
181 | **AddComp(comp_name)**                                        |
182 |     Add a component of the field                              |
183 |                                                               |
184 |     - ``comp_name``: name of a component to take into account |
185 +---------------------------------------------------------------+
186 | .. module:: SetUseComp                                        |
187 |                                                               |
188 | **SetUseComp(use_comp)**                                      |
189 |     Defines hom to use the components                         |
190 |                                                               |
191 |     - ``use_comp``: integer that defines how to use the       |
192 |       components                                              |
193 |                                                               |
194 |        * 0: L2 norm (default)                                 |
195 |        * 1: infinite norm                                     |
196 |        * 2: relative value, if only one component             |
197 +---------------------------------------------------------------+
198 | .. module:: GetListComp                                       |
199 |                                                               |
200 | **GetListComp()**                                             |
201 |     Returns the list of the used components                   |
202 +---------------------------------------------------------------+
203
204
205 The zones
206 =========
207
208 +---------------------------------------------------------------+
209 +---------------------------------------------------------------+
210 | .. module:: AddZone                                           |
211 |                                                               |
212 | **AddZone(zone_name, type_use)**                              |
213 |                                                               |
214 |     - ``zone_name``: the name of the zone to add              |
215 |     - ``type_use``: integer that defines how to use the zone  |
216 |                                                               |
217 |         * 1: refinement                                       |
218 |         * -1: unrefinement                                    |
219 +---------------------------------------------------------------+
220
221
222 The filtering by the groups
223 ===========================
224
225 +---------------------------------------------------------------+
226 +---------------------------------------------------------------+
227 | .. module:: AddGroup                                          |
228 |                                                               |
229 | **AddGroup(group_name)**                                      |
230 |     Add a group to the filtering                              |
231 |                                                               |
232 |     - ``group_name``: name of the group to take into account  |
233 +---------------------------------------------------------------+
234 | .. module:: GetGroups                                         |
235 |                                                               |
236 | **GetGroups()**                                               |
237 |     Returns the mist of the groups that are used in the       |
238 |     filtering                                                 |
239 +---------------------------------------------------------------+
240
241 Advanced options
242 ================
243
244 +---------------------------------------------------------------+
245 +---------------------------------------------------------------+
246 | .. module:: SetNivMax                                         |
247 |                                                               |
248 | **SetNivMax(nivmax)**                                         |
249 |     Defines the maximum level for the refinement              |
250 |                                                               |
251 |     - ``nivmax``: level of refinement that must not be        |
252 |       exceeded                                                |
253 +---------------------------------------------------------------+
254 | .. module:: GetNivMax                                         |
255 |                                                               |
256 | **GetNivMax()**                                               |
257 |     Returns the maximum level for the refinement              |
258 +---------------------------------------------------------------+
259 | .. module:: SetDiamMin                                        |
260 |                                                               |
261 | **SetDiamMin(diammin)**                                       |
262 |     Defines the minimum diameter of the future elements       |
263 |                                                               |
264 |     - ``diammin``: minimum diameter for an element            |
265 +---------------------------------------------------------------+
266 | .. module:: GetDiamMin                                        |
267 |                                                               |
268 | **GetDiamMin()**                                              |
269 |     Returns the minimum diameter of the future elements       |
270 +---------------------------------------------------------------+
271 | .. module:: SetAdapInit                                       |
272 |                                                               |
273 | **SetAdapInit(option)**                                       |
274 |     Defines the treatment of the elements where the field that|
275 |     governs the adaptation is not defined                     |
276 |                                                               |
277 |     - ``option``: integer as follows:                         |
278 |                                                               |
279 |         *  0: no effect (default)                             |
280 |         *  1: the elements without field are refined          |
281 |         * -1: the elements without field are unrefined        |
282 +---------------------------------------------------------------+
283 | .. module:: GetAdapInit                                       |
284 |                                                               |
285 | **GetAdapInit()**                                             |
286 |     Returns the treatment of the elements where the field that|
287 |     governs the adaptation is not defined                     |
288 +---------------------------------------------------------------+
289 | .. module:: SetLevelOutput                                    |
290 |                                                               |
291 | **SetLevelOutput(option)**                                    |
292 |     Acts if the level of refinement is returned as a field in |
293 |     the output MED file                                       |
294 |                                                               |
295 |     - ``option``: integer as follows:                         |
296 |                                                               |
297 |         *  0: no effect (default)                             |
298 |         *  1: the field is produced                           |
299 +---------------------------------------------------------------+
300 | .. module:: GetLevelOutput                                    |
301 |                                                               |
302 | **GetLevelOutput()**                                          |
303 |     Returns the choice for the output of the level of         |
304 |     refinement                                                |
305 +---------------------------------------------------------------+
306
307
308 Example
309 *******
310 The creation of the object hypo_1 is done as follows:
311 ::
312
313     hypo_1 = homard.CreateHypothesis("HypoField")
314     hypo_1.SetAdapRefinUnRef(1, 1, 0)
315     hypo_1.SetField("INDICATEUR")
316     hypo_1.AddComp("INDX")
317     hypo_1.AddComp("INDZ")
318     hypo_1.SetRefinThr(1, 80.)
319
320
321 Similar graphical input
322 ***********************
323 Look at :ref:`gui_create_hypothese`
324
325 .. warning::
326   With the graphical input mode, if an hypothesis is edited and if one of the characteristic is modified, the value of the threshold for the refinement for example, all the iterations that were computed with this hypothesis are unvalidated. In python mode, that is not true: the iterations stay as they are.