1 .. _tui_create_hypothese:
6 .. index:: single: iteration
7 .. index:: single: hypothesis
8 .. index:: single: zone
10 The variables are described in :ref:`gui_create_hypothese`.
12 Methods of the class homard
13 """"""""""""""""""""""""""""
15 +---------------------------------------------------------------+
16 +---------------------------------------------------------------+
17 | .. module:: CreateHypothesis |
19 | **CreateHypothesis(hypo_name)** |
20 | Returns an instance of the class ``hypothese`` |
22 | - ``hypo_name``: the name of the hypothesis |
23 +---------------------------------------------------------------+
24 | .. module:: GetHypothesis |
26 | **GetHypothesis(hypo_name)** |
27 | Returns an instance of the class ``hypothese`` |
30 | - ``hypo_name``: the name of the hypothesis |
31 +---------------------------------------------------------------+
32 | .. module:: GetAllHypothesesName |
34 | **GetAllHypothesesName()** |
35 | Returns the liste of the name of all the existing |
38 +---------------------------------------------------------------+
40 Methods of the class hypothese
41 """""""""""""""""""""""""""""""
46 +---------------------------------------------------------------+
47 +---------------------------------------------------------------+
48 | .. module:: GetName |
51 | Returns the name of the hypothesis |
52 +---------------------------------------------------------------+
53 | .. module:: SetAdapRefinUnRef |
55 | **SetAdapRefinUnRef(Adap, Refin, UnRef)** |
56 | Gives the type of adaptation to the hypothesis |
58 | - ``Adap``: integer that defines the type of adaptation |
64 | - ``Refin``: integer that informs if the refinement is |
70 | - ``UnRef``: integer that informs if the refinement is |
76 +---------------------------------------------------------------+
77 | .. module:: GetAdapType |
80 | Returns the type of the adaptation |
81 +---------------------------------------------------------------+
82 | .. module:: GetRefinType |
84 | **GetRefinType()** |
85 | Returns the type of the refinement |
86 +---------------------------------------------------------------+
87 | .. module:: GetUnRefType |
89 | **GetUnRefType()** |
90 | Returns the type of the unrefinement |
91 +---------------------------------------------------------------+
92 | .. module:: Delete |
95 | Deletes the hypothesis |
97 | Returns an integer: |
98 | * 0: the destruction is done |
99 | * other value: problem |
100 +---------------------------------------------------------------+
102 The field and the thresholds
103 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105 +---------------------------------------------------------------+
106 +---------------------------------------------------------------+
107 | .. module:: SetField |
109 | **SetField(field_name)** |
110 | Gives the name of a field to the hypothesis |
112 | - ``field_name``: the name of the field |
113 +---------------------------------------------------------------+
114 | .. module:: GetFieldName |
116 | **GetFieldName()** |
117 | Returns the name of the field |
118 +---------------------------------------------------------------+
119 | .. module:: SetUseField |
121 | **SetUseField(use_field)** |
122 | Gives the usage of the field for the hypothesis |
124 | - ``use_field``: integer that defines how the field is |
127 | * 0: value by element (default) |
128 | * 1: jump between an element and its neighbours |
129 +---------------------------------------------------------------+
130 | .. module:: SetRefinThr |
132 | **SetRefinThr(type_thres, threshold)** |
133 | Defines the thresholds for the refinement |
135 | - ``type_thres``: integer that defines the type of the |
136 | threshold for the refinement |
138 | * 1: absolute value |
139 | * 2: relative value in % |
140 | * 3: ratio of elements in % |
141 | * 4: mean + n times the standard deviation |
143 | - ``threshold``: numerical value that defines the |
145 +---------------------------------------------------------------+
146 | .. module:: GetRefinThrType |
148 | **GetRefinThrType()** |
149 | Returns the type of the threshold for the refinement |
150 +---------------------------------------------------------------+
151 | .. module:: SetUnRefThr |
153 | **SetUnRefThr(type_thres, threshold)** |
154 | Defines the thresholds for the unrefinement |
156 | - ``type_thres``: integer that defines the type of the |
157 | threshold for the unrefinement |
159 | * 1: absolute value |
160 | * 2: relative value in % |
161 | * 3: ratio of elements in % |
162 | * 4: mean - n times the standard deviation |
164 | - ``threshold``: numerical value that defines the |
166 +---------------------------------------------------------------+
167 | .. module:: GetUnRefThrType |
169 | **GetUnRefThrType()** |
170 | Returns the type of the threshold for the unrefinement |
171 +---------------------------------------------------------------+
174 The components of the field
175 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
177 +---------------------------------------------------------------+
178 +---------------------------------------------------------------+
179 | .. module:: AddComp |
181 | **AddComp(comp_name)** |
182 | Add a component of the field |
184 | - ``comp_name``: name of a component to take into account |
185 +---------------------------------------------------------------+
186 | .. module:: SetUseComp |
188 | **SetUseComp(use_comp)** |
189 | Defines hom to use the components |
191 | - ``use_comp``: integer that defines how to use the |
194 | * 0: L2 norm (default) |
195 | * 1: infinite norm |
196 | * 2: relative value, if only one component |
197 +---------------------------------------------------------------+
198 | .. module:: GetListComp |
200 | **GetListComp()** |
201 | Returns the list of the used components |
202 +---------------------------------------------------------------+
208 +---------------------------------------------------------------+
209 +---------------------------------------------------------------+
210 | .. module:: AddZone |
212 | **AddZone(zone_name, type_use)** |
214 | - ``zone_name``: the name of the zone to add |
215 | - ``type_use``: integer that defines how to use the zone |
218 | * -1: unrefinement |
219 +---------------------------------------------------------------+
222 The filtering by the groups
223 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
225 +---------------------------------------------------------------+
226 +---------------------------------------------------------------+
227 | .. module:: AddGroup |
229 | **AddGroup(group_name)** |
230 | Add a group to the filtering |
232 | - ``group_name``: name of the group to take into account |
233 +---------------------------------------------------------------+
234 | .. module:: GetGroups |
237 | Returns the mist of the groups that are used in the |
239 +---------------------------------------------------------------+
244 +---------------------------------------------------------------+
245 +---------------------------------------------------------------+
246 | .. module:: SetNivMax |
248 | **SetNivMax(nivmax)** |
249 | Defines the maximum level for the refinement |
251 | - ``nivmax``: level of refinement that must not be |
253 +---------------------------------------------------------------+
254 | .. module:: GetNivMax |
257 | Returns the maximum level for the refinement |
258 +---------------------------------------------------------------+
259 | .. module:: SetDiamMin |
261 | **SetDiamMin(diammin)** |
262 | Defines the minimum diameter of the future elements |
264 | - ``diammin``: minimum diameter for an element |
265 +---------------------------------------------------------------+
266 | .. module:: GetDiamMin |
269 | Returns the minimum diameter of the future elements |
270 +---------------------------------------------------------------+
271 | .. module:: SetAdapInit |
273 | **SetAdapInit(option)** |
274 | Defines the treatment of the elements where the field that|
275 | governs the adaptation is not defined |
277 | - ``option``: integer as follows: |
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 |
285 | **GetAdapInit()** |
286 | Returns the treatment of the elements where the field that|
287 | governs the adaptation is not defined |
288 +---------------------------------------------------------------+
289 | .. module:: SetLevelOutput |
291 | **SetLevelOutput(option)** |
292 | Acts if the level of refinement is returned as a field in |
293 | the output MED file |
295 | - ``option``: integer as follows: |
297 | * 0: no effect (default) |
298 | * 1: the field is produced |
299 +---------------------------------------------------------------+
300 | .. module:: GetLevelOutput |
302 | **GetLevelOutput()** |
303 | Returns the choice for the output of the level of |
305 +---------------------------------------------------------------+
310 The creation of the object hypo_1 is done as follows:
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.)
321 Similar graphical input
322 """""""""""""""""""""""
323 Look at :ref:`gui_create_hypothese`
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.