Salome HOME
Small fix to make it working with -j make option
[modules/homard.git] / doc / tui_create_case_en.rst
1 .. _tui_create_case_en:
2
3 The case
4 ========
5 .. index:: single: cas
6 .. index:: single: type of conformity
7 .. index:: single: mesh;initial
8
9 The variables are described in :ref:`gui_create_case_en`.
10
11 Methods of the class homard
12 """"""""""""""""""""""""""""
13
14 Creation of a case
15 ^^^^^^^^^^^^^^^^^^
16
17 +---------------------------------------------------------------+
18 +---------------------------------------------------------------+
19 | .. module:: CreateCase                                        |
20 |                                                               |
21 | **CreateCase(case_name, mesh_name, mesh_file)**               |
22 |     Returns an instance of the class ``cas`` after its        |
23 |     creation                                                  |
24 |                                                               |
25 |     - ``case_name``: the name of the case                     |
26 |     - ``mesh_name``: the name of the initial mesh             |
27 |     - ``mesh_file``: the name of the MED file of this mesh    |
28 |                                                               |
29 | Default:                                                      |
30 |                                                               |
31 |  * the directory for the results is ``/tmp``                  |
32 |  * the adaptation is conformal                                |
33 +---------------------------------------------------------------+
34 | .. module:: GetCase                                           |
35 |                                                               |
36 | **GetCase(case_name)**                                        |
37 |     Returns an instance of the class ``cas`` known by its name|
38 |                                                               |
39 |     - ``case_name``: the name of the case                     |
40 +---------------------------------------------------------------+
41 | .. module:: GetAllCasesName                                   |
42 |                                                               |
43 | **GetAllCasesName()**                                         |
44 |     Returns the liste of the name of all the existing cases   |
45 |                                                               |
46 +---------------------------------------------------------------+
47
48 Creation of a case by pursuit of a computed iteration
49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
51 +---------------------------------------------------------------+
52 +---------------------------------------------------------------+
53 | .. module:: CreateCaseFromIteration                           |
54 |                                                               |
55 | **CreateCaseFromIteration(case_name, dir_name)**              |
56 |     Returns an instance of the class ``cas`` after its        |
57 |     creation                                                  |
58 |                                                               |
59 |     - ``case_name``: the name of the case                     |
60 |     - ``dir_name``: the name of the directory that contains   |
61 |       the iteration                                           |
62 |                                                               |
63 +---------------------------------------------------------------+
64 | .. module:: CreateCaseFromCaseLastIteration                   |
65 |                                                               |
66 | **CreateCaseFromCaseLastIteration(case_name, dir_name)**      |
67 |     Returns an instance of the class ``cas`` after its        |
68 |     creation                                                  |
69 |                                                               |
70 |     - ``case_name``: the name of the case                     |
71 |     - ``dir_name``: the name of the directory that contains   |
72 |       the case                                                |
73 |                                                               |
74 +---------------------------------------------------------------+
75 | .. module:: CreateCaseFromCaseIteration                       |
76 |                                                               |
77 | **CreateCaseFromCaseIteration(case_name, dir_name, number)**  |
78 |     Returns an instance of the class ``cas`` after its        |
79 |     creation                                                  |
80 |                                                               |
81 |     - ``case_name``: the name of the case                     |
82 |     - ``dir_name``: the name of the directory that contains   |
83 |       the case                                                |
84 |     - ``number``: the number of the iteration of the case     |
85 |                                                               |
86 +---------------------------------------------------------------+
87
88
89
90 Methods of the class cas
91 """"""""""""""""""""""""
92
93 +---------------------------------------------------------------+
94 +---------------------------------------------------------------+
95 | .. module:: GetName                                           |
96 |                                                               |
97 | **GetName()**                                                 |
98 |     Returns the name of the case                              |
99 +---------------------------------------------------------------+
100 | .. module:: SetDirName                                        |
101 |                                                               |
102 | **SetDirName(dirname)**                                       |
103 |     Gives a directory for the results of the case. It can be  |
104 |     done only after the creation of the case and before the   |
105 |     first computation.                                        |
106 |                                                               |
107 |     - ``dirname``: the name of the directory of the results   |
108 +---------------------------------------------------------------+
109 | .. module:: GetDirName                                        |
110 |                                                               |
111 | **GetDirName()**                                              |
112 |     Returns the name of the directory of the results of the   |
113 |     case                                                      |
114 +---------------------------------------------------------------+
115 | .. module:: SetConfType                                       |
116 |                                                               |
117 | **SetConfType(conf_type)**                                    |
118 |     Defines the type of conformity for the case               |
119 |                                                               |
120 |     - ``conf_type``: integer as follows:                      |
121 |                                                               |
122 |         * 1: conformal                                        |
123 |         * 2: non conformal with one hanging node per element  |
124 |         * 3: non conformal with one hanging node per edge of  |
125 |           element                                             |
126 |         * 4: non conformal without any constraint             |
127 +---------------------------------------------------------------+
128 | .. module:: GetConfType                                       |
129 |                                                               |
130 | **GetConfType()**                                             |
131 |     Returns the type of conformity                            |
132 +---------------------------------------------------------------+
133 | .. module:: GetIter0                                          |
134 |                                                               |
135 | **GetIter0()**                                                |
136 |     Returns the iteration linked to the initial mesh.         |
137 |     This iteration is automatically created by the module     |
138 |     HOMARD. It is used to connect the iterations. It is       |
139 |     connected to an initial mesh or to the iteration of a     |
140 |     previous case.                                            |
141 +---------------------------------------------------------------+
142 | .. module:: AddBoundaryGroup                                  |
143 |                                                               |
144 | **AddBoundaryGroup(boundary, group)**                         |
145 |     Add a boundary to the definition of a case                |
146 |                                                               |
147 |     - ``boundary``: name of the curved boundary               |
148 |                                                               |
149 |     Discrete boundary:                                        |
150 |                                                               |
151 |     . if all the curved lines are involved, the second        |
152 |     argument is an empty string.                              |
153 |     . if only some curved lines are involved, ``group`` is    |
154 |     the name of the group of segments                         |
155 |                                                               |
156 |     Analytical boundary:                                      |
157 |                                                               |
158 |     - ``group``: name of the group of faces located on the    |
159 |       boundary                                                |
160 +---------------------------------------------------------------+
161 | .. module:: Delete                                            |
162 |                                                               |
163 | **Delete(option)**                                            |
164 |     Deletes the case and all the connected iterations. The MED|
165 |     file of the first mesh is kept.                           |
166 |                                                               |
167 |     - ``option``: an integer to define what to do with the    |
168 |       MED file of the associated meshes                       |
169 |                                                               |
170 |         * 0: the files are kept                               |
171 |         * 1: the files are removed                            |
172 |                                                               |
173 |     Returns an integer:                                       |
174 |         * 0: the destruction is done                          |
175 |         * other value: problem                                |
176 +---------------------------------------------------------------+
177 | .. module:: GetState                                          |
178 |                                                               |
179 | **GetState()**                                                |
180 |     Returns the state of the case:                            |
181 |         * 0: corresponds to an initial mesh                   |
182 |         * other value: pursuit of an iteration with number n  |
183 +---------------------------------------------------------------+
184
185 Advanced options
186 ^^^^^^^^^^^^^^^^
187
188 +---------------------------------------------------------------+
189 +---------------------------------------------------------------+
190 | .. module:: SetPyram                                          |
191 |                                                               |
192 | **SetPyram(option)**                                          |
193 |     Defines the status of the pyramids in this case           |
194 |                                                               |
195 |     - ``option``: integer that defines the status of the      |
196 |       pyramids that could belongs to the initial mesh         |
197 |                                                               |
198 |         * 0: rejected pyramids (default)                      |
199 |         * 1: authorized pyramids                              |
200 +---------------------------------------------------------------+
201 | .. module:: GetPyram                                          |
202 |                                                               |
203 | **GetPyram()**                                                |
204 |     Returns the status of the pyramids in this case           |
205 +---------------------------------------------------------------+
206
207 Informations for the initial mesh
208 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209
210 +---------------------------------------------------------------+
211 +---------------------------------------------------------------+
212 | .. module:: MeshInfo                                          |
213 |                                                               |
214 | **MeshInfo(Qual, Diam, Conn, Tail, Inte)**                    |
215 |     Gives information about the current mesh. For every       |
216 |     option, the choice #0 corresponds to 'no action', while   |
217 |     the choice #1 launches the option.                        |
218 |                                                               |
219 |     - ``Qual``: quality of the elements                       |
220 |     - ``Diam``: diametre of the elements                      |
221 |     - ``Conn``: connexity of the domain; a single block, how  |
222 |       many holes, etc.                                        |
223 |     - ``Tail``: size of the parts of the domain, group by     |
224 |       group                                                   |
225 |     - ``Inte``: staggered elements, by dimension              |
226 +---------------------------------------------------------------+
227
228
229 Example
230 """""""
231 The creation of the object case_1 is done as follows:
232
233 ::
234
235     case_name = "CAS_1"
236     mesh_name = "MAILL"
237     mesh_file = "/scratch/Salome/Adapt/m0.med"
238     case_1 = homard.CreateCase(case_name, mesh_name, mesh_file)
239     dirname = "/scratch/Salome/Adapt/resu"
240     case_1.SetDirName(dirname)
241     case_1.SetConfType(1)
242     case_1.AddBoundaryGroup( 'intersection', '' )
243     case_1.AddBoundaryGroup( 'cyl_1', 'T1_EXT' )
244     case_1.AddBoundaryGroup( 'cyl_1', 'T2_EXT' )
245     case_1.AddBoundaryGroup( 'cyl_2', 'T_INT' )
246
247
248
249 Similar graphical input
250 """""""""""""""""""""""
251 Look at :ref:`gui_create_case_en`
252
253