1 .. _tui_create_iteration_en:
6 .. index:: single: iteration
7 .. index:: single: hypothesis
8 .. index:: single: zone
10 The variables are described in :ref:`gui_create_iteration_en`.
12 Methods of the class homard
13 """"""""""""""""""""""""""""
15 +---------------------------------------------------------------+
16 +---------------------------------------------------------------+
17 | .. module:: GetIteration |
19 | **GetIteration(iter_name)** |
20 | Returns an instance of the class ``iteration`` |
23 | - ``iter_name``: the name of the iteration |
24 +---------------------------------------------------------------+
25 | .. module:: GetAllIterationsName |
27 | **GetAllIterationsName()** |
28 | Returns the liste of the name of all the existing |
31 +---------------------------------------------------------------+
33 Methods of the class cas
34 """""""""""""""""""""""""
36 +---------------------------------------------------------------+
37 +---------------------------------------------------------------+
38 | .. module:: NextIteration |
40 | **NextIteration(iter_name)** |
41 | Returns an instance of the class ``iteration`` after |
42 | its creation: it is the next iteration after the very |
43 | first one that corresponds to the first mesh of the case |
45 | - ``iter_name``: the name of this next iteration |
49 | * the produced mesh has got the same name as the iteration |
50 +---------------------------------------------------------------+
51 | .. module:: LastIteration |
53 | **LastIteration()** |
54 | Returns an instance of the class ``iteration``: the last |
55 | iteration into the descendants of the initial iteration |
56 | of the case. It is the one that has got no child. There is|
57 | an error if more than one branch exists into the |
60 +---------------------------------------------------------------+
62 Methods of the class iteration
63 """"""""""""""""""""""""""""""
68 +---------------------------------------------------------------+
69 +---------------------------------------------------------------+
70 | .. module:: NextIteration |
72 | **NextIteration(iter_name)** |
73 | Returns an instance of the class ``iteration`` after |
74 | its creation: it is the next iteration after the current |
77 | - ``iter_name``: the name of this next iteration |
81 | * the produced mesh has got the same name as the iteration |
82 +---------------------------------------------------------------+
83 | .. module:: Compute |
85 | **Compute(option1, option2)** |
86 | Computes the mesh produced by the iteration |
88 | - ``option1``: an integer to decide what to do with |
89 | existing files, if any |
91 | * 0: stop with error |
92 | * 1: the old files are removed |
94 | - ``option2``: an integer to decide what to do with |
97 | * 1: no specific action |
98 | * 2: publication into the module SMESH |
100 | Returns an integer: |
101 | * 0: successful adaptation |
102 | * other value: problem |
103 +---------------------------------------------------------------+
104 | .. module:: GetName |
107 | Returns the name of the iteration |
108 +---------------------------------------------------------------+
109 | .. module:: GetNumber |
112 | Returns the number of the iteration. |
114 | The iteration #0 is the one associated to the initial |
115 | mesh. Then, an iteration with number #N comes from the |
116 | adaptation of an iteration with number #(N-1). |
117 +---------------------------------------------------------------+
118 | .. module:: GetIterParent |
120 | **GetIterParent()** |
121 | Returns the iteration parent |
122 +---------------------------------------------------------------+
123 | .. module:: LastIteration |
125 | **LastIteration()** |
126 | Returns an instance of the class ``iteration``: the last |
127 | iteration into the descendants of the current iteration. |
128 | It is the one that has got no child. There is |
129 | an error if more than one branch exists into the |
131 +---------------------------------------------------------------+
132 | .. module:: AssociateHypo |
134 | **AssociateHypo(hypo_name)** |
135 | Associate an hypothesis with the iteration |
137 | - ``hypo_name``: the name of the hypothesis |
138 +---------------------------------------------------------------+
139 | .. module:: GetHypoName |
141 | **GetHypoName()** |
142 | Returns the name of the associated hypothesis |
143 +---------------------------------------------------------------+
144 | .. module:: GetCaseName |
146 | **GetCaseName()** |
147 | Returns the name of the associated case |
148 +---------------------------------------------------------------+
149 | .. module:: GetState |
152 | Returns the state of the iteration |
154 | - ``2``: computed iteration |
155 | - ``1``: non computed iteration |
156 | - ``<=0``: initial iteration not to be computed, with a |
157 | number equal to the absolute valure of the state |
158 +---------------------------------------------------------------+
159 | .. module:: GetLogFile |
162 | Returns the name of the file with the messages all along |
163 | the running of HOMARD |
164 +---------------------------------------------------------------+
165 | .. module:: GetFileInfo |
167 | **GetFileInfo()** |
168 | Returns the name of the file with the analysis of the mesh|
169 +---------------------------------------------------------------+
170 | .. module:: GetDirName |
173 | Returns the name of the directory that contains the |
174 | results of the iteration |
175 +---------------------------------------------------------------+
176 | .. module:: Delete |
178 | **Delete(option)** |
179 | Deletes the iteration and all its children |
181 | - ``option``: an integer to define what to do with the |
182 | MED file of the associated meshes |
184 | * 0: the files are kept |
185 | * 1: the files are removed |
187 | Returns an integer: |
188 | * 0: the destruction is done |
189 | * other value: problem |
190 +---------------------------------------------------------------+
192 Information about the meshes
193 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
195 +---------------------------------------------------------------+
196 +---------------------------------------------------------------+
197 | .. module:: SetMeshName |
199 | **SetMeshName(mesh_name)** |
200 | Defines the name of the produced mesh |
202 | - ``mesh_name``: the name of the produced mesh |
203 +---------------------------------------------------------------+
204 | .. module:: GetMeshName |
206 | **GetMeshName()** |
207 | Returns the name of the produced mesh |
208 +---------------------------------------------------------------+
209 | .. module:: SetMeshFile |
211 | **SetMeshFile(mesh_file)** |
212 | Defines the name of the MED file of the produced mesh |
214 | - ``mesh_file``: the name of the MED file of the |
216 +---------------------------------------------------------------+
217 | .. module:: GetMeshFile |
219 | **GetMeshFile()** |
220 | Returns the name of the MED file of the produced mesh |
221 +---------------------------------------------------------------+
222 | .. module:: MeshInfo |
224 | **MeshInfo(Qual, Diam, Conn, Tail, Inte)** |
225 | Gives information about the current mesh. For every |
226 | option, the choice #0 corresponds to 'no action', while |
227 | the choice #1 launches the option. |
229 | - ``Qual``: quality of the elements |
230 | - ``Diam``: diametre of the elements |
231 | - ``Conn``: connexity of the domain; a single block, how |
233 | - ``Tail``: size of the parts of the domain, group by |
235 | - ``Inte``: staggered elements, by dimension |
236 +---------------------------------------------------------------+
238 Information about the field
239 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
241 +---------------------------------------------------------------+
242 +---------------------------------------------------------------+
243 | .. module:: SetFieldFile |
245 | **SetFieldFile(field_file)** |
246 | Defines the MED file of the field |
248 | - ``field_file``: the name of the MED file of the field |
249 +---------------------------------------------------------------+
250 | .. module:: SetTimeStepRank |
252 | **SetTimeStepRank(TimeStep, Rank)** |
253 | Defines the time steps for the fields |
255 | Useless if no time step is defined for the field. |
257 | If a single time step is defined for the filed, it is the |
260 | - ``TimeStep``: the selected time step |
261 | - ``Rank``: the selected rank |
262 +---------------------------------------------------------------+
263 | .. module:: SetTimeStepRankLast |
265 | **SetTimeStepRankLast()** |
266 | The last time step will be used, whatever its value |
267 +---------------------------------------------------------------+
268 | .. module:: GetFieldFileName |
270 | **GetFieldFileName()** |
271 | Returns the name of the MED file of the field |
272 +---------------------------------------------------------------+
273 | .. module:: GetTimeStep |
275 | **GetTimeStep()** |
276 | Returns the selected time step for the field |
277 +---------------------------------------------------------------+
278 | .. module:: GetRank |
281 | Returns the selected rank for the field |
282 +---------------------------------------------------------------+
286 .. index:: single: mesh;initial
288 To create the first iteration, the starting point is the iteration associated to the initial mesh. It is the one that defines the case.
291 iter_name = "Iteration_1"
292 iter_1 = case_1.NextIteration(iter_name)
293 iter_1.SetField(field_file)
294 iter_1.SetTimeStepRank( 0, 0)
295 iter_1.SetMeshName("maill_01")
296 iter_1.SetMeshFile("/local00/M.01.med")
297 iter_1.AssociateHypo("HypoField")
298 codret = iter_1.Compute(1, 2)
300 Then, the next iteration is created from the current iteration.
303 iter_name = "Iteration_2"
304 iter_2 = iter_1.NextIteration(iter_name)
305 iter_2.SetField(field_file)
306 iter_2.SetTimeStepRank( 1, 1)
307 iter_2.SetMeshName("maill_02")
308 iter_2.SetMeshFile("/local00/M.02.med")
309 iter_2.AssociateHypo("HypoField")
310 codret = iter_2.Compute(1, 2)
313 Similar graphical input
314 """""""""""""""""""""""
315 Look at :ref:`gui_create_iteration_en`