]> SALOME platform Git repositories - modules/homard.git/blob - doc/en/tui_create_case.rst
Salome HOME
Instants du champ de pilotage de l'adaptation
[modules/homard.git] / doc / en / tui_create_case.rst
1 .. _tui_create_case:
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`.
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 .. index:: single: YACS
93
94 +---------------------------------------------------------------+
95 +---------------------------------------------------------------+
96 | .. module:: GetName                                           |
97 |                                                               |
98 | **GetName()**                                                 |
99 |     Returns the name of the case                              |
100 +---------------------------------------------------------------+
101 | .. module:: SetDirName                                        |
102 |                                                               |
103 | **SetDirName(dirname)**                                       |
104 |     Gives a directory for the results of the case. It can be  |
105 |     done only after the creation of the case and before the   |
106 |     first computation.                                        |
107 |                                                               |
108 |     - ``dirname``: the name of the directory of the results   |
109 +---------------------------------------------------------------+
110 | .. module:: GetDirName                                        |
111 |                                                               |
112 | **GetDirName()**                                              |
113 |     Returns the name of the directory of the results of the   |
114 |     case                                                      |
115 +---------------------------------------------------------------+
116 | .. module:: SetConfType                                       |
117 |                                                               |
118 | **SetConfType(conf_type)**                                    |
119 |     Defines the type of conformity for the case               |
120 |                                                               |
121 |     - ``conf_type``: integer as follows:                      |
122 |                                                               |
123 |         * 1: conformal                                        |
124 |         * -1: conformal with boxes                            |
125 |         * 2: non conformal with one hanging node per element  |
126 |         * 3: non conformal with one hanging node per edge of  |
127 |           element                                             |
128 |         * 4: non conformal without any constraint             |
129 +---------------------------------------------------------------+
130 | .. module:: GetConfType                                       |
131 |                                                               |
132 | **GetConfType()**                                             |
133 |     Returns the type of conformity                            |
134 +---------------------------------------------------------------+
135 | .. module:: GetIter0                                          |
136 |                                                               |
137 | **GetIter0()**                                                |
138 |     Returns the iteration linked to the initial mesh.         |
139 |     This iteration is automatically created by the module     |
140 |     HOMARD. It is used to connect the iterations. It is       |
141 |     connected to an initial mesh or to the iteration of a     |
142 |     previous case.                                            |
143 +---------------------------------------------------------------+
144 | .. module:: AddBoundaryGroup                                  |
145 |                                                               |
146 | **AddBoundaryGroup(boundary, group)**                         |
147 |     Add a boundary to the definition of a case                |
148 |                                                               |
149 |     - ``boundary``: name of the curved boundary               |
150 |                                                               |
151 |     Discrete boundary:                                        |
152 |                                                               |
153 |     . if all the curved lines are involved, the second        |
154 |     argument is an empty string.                              |
155 |     . if only some curved lines are involved, ``group`` is    |
156 |     the name of the group of segments                         |
157 |                                                               |
158 |     Analytical boundary:                                      |
159 |                                                               |
160 |     - ``group``: name of the group of faces located on the    |
161 |       boundary                                                |
162 +---------------------------------------------------------------+
163 | .. module:: Delete                                            |
164 |                                                               |
165 | **Delete(option)**                                            |
166 |     Deletes the case and all the connected iterations. The MED|
167 |     file of the first mesh is kept.                           |
168 |                                                               |
169 |     - ``option``: an integer to define what to do with the    |
170 |       MED file of the associated meshes                       |
171 |                                                               |
172 |         * 0: the files are kept                               |
173 |         * 1: the files are removed                            |
174 |                                                               |
175 |     Returns an integer:                                       |
176 |         * 0: the destruction is done                          |
177 |         * other value: problem                                |
178 +---------------------------------------------------------------+
179 | .. module:: GetState                                          |
180 |                                                               |
181 | **GetState()**                                                |
182 |     Returns the state of the case:                            |
183 |         * 0: corresponds to an initial mesh                   |
184 |         * other value: pursuit of an iteration with number n  |
185 +---------------------------------------------------------------+
186 | .. module:: WriteYACSSchema                                   |
187 |                                                               |
188 | **WriteYACSSchema(ScriptFile, DirName, MeshFile)**            |
189 |     Writes a schema YACS relative to the case.                |
190 |                                                               |
191 |     - ``ScriptFile`` : name of the file that contains the     |
192 |       script to launch the computation                        |
193 |     - ``DirName`` : the directory for the computation         |
194 |     - ``MeshFile`` : name of the file that contains the mesh  |
195 |       for the very first computation                          |
196 +---------------------------------------------------------------+
197
198 Advanced options
199 ****************
200
201 +---------------------------------------------------------------+
202 +---------------------------------------------------------------+
203 | .. module:: SetPyram                                          |
204 |                                                               |
205 | **SetPyram(option)**                                          |
206 |     Defines the status of the pyramids in this case           |
207 |                                                               |
208 |     - ``option``: integer that defines the status of the      |
209 |       pyramids that could belongs to the initial mesh         |
210 |                                                               |
211 |         * 0: rejected pyramids (default)                      |
212 |         * 1: authorized pyramids                              |
213 +---------------------------------------------------------------+
214 | .. module:: GetPyram                                          |
215 |                                                               |
216 | **GetPyram()**                                                |
217 |     Returns the status of the pyramids in this case           |
218 +---------------------------------------------------------------+
219
220 Informations for the initial mesh
221 *********************************
222
223 +---------------------------------------------------------------+
224 +---------------------------------------------------------------+
225 | .. module:: MeshInfo                                          |
226 |                                                               |
227 | **MeshInfo(Qual, Diam, Conn, Tail, Inte)**                    |
228 |     Gives information about the current mesh. For every       |
229 |     option, the choice #0 corresponds to 'no action', while   |
230 |     the choice #1 launches the option.                        |
231 |                                                               |
232 |     - ``Qual``: quality of the elements                       |
233 |     - ``Diam``: diametre of the elements                      |
234 |     - ``Conn``: connexity of the domain; a single block, how  |
235 |       many holes, etc.                                        |
236 |     - ``Tail``: size of the parts of the domain, group by     |
237 |       group                                                   |
238 |     - ``Inte``: staggered elements, by dimension              |
239 +---------------------------------------------------------------+
240
241
242 Example
243 *******
244 The creation of the object case_1 is done as follows:
245
246 ::
247
248     case_name = "CAS_1"
249     mesh_name = "MAILL"
250     mesh_file = "/scratch/Salome/Adapt/m0.med"
251     case_1 = homard.CreateCase(case_name, mesh_name, mesh_file)
252     dirname = "/scratch/Salome/Adapt/resu"
253     case_1.SetDirName(dirname)
254     case_1.SetConfType(1)
255     case_1.AddBoundaryGroup( 'intersection', '' )
256     case_1.AddBoundaryGroup( 'cyl_1', 'T1_EXT' )
257     case_1.AddBoundaryGroup( 'cyl_1', 'T2_EXT' )
258     case_1.AddBoundaryGroup( 'cyl_2', 'T_INT' )
259
260
261
262 Similar graphical input
263 ***********************
264 Look at :ref:`gui_create_case`
265
266