1 .. _tui_create_case_en:
6 .. index:: single: type of conformity
7 .. index:: single: mesh;initial
9 The variables are described in :ref:`gui_create_case_en`.
11 Methods of the class homard
12 """"""""""""""""""""""""""""
17 +---------------------------------------------------------------+
18 +---------------------------------------------------------------+
19 | .. module:: CreateCase |
21 | **CreateCase(case_name, mesh_name, mesh_file)** |
22 | Returns an instance of the class ``cas`` after its |
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 |
31 | * the directory for the results is ``/tmp`` |
32 | * the adaptation is conformal |
33 +---------------------------------------------------------------+
34 | .. module:: GetCase |
36 | **GetCase(case_name)** |
37 | Returns an instance of the class ``cas`` known by its name|
39 | - ``case_name``: the name of the case |
40 +---------------------------------------------------------------+
41 | .. module:: GetAllCasesName |
43 | **GetAllCasesName()** |
44 | Returns the liste of the name of all the existing cases |
46 +---------------------------------------------------------------+
48 Creation of a case by pursuit of a computed iteration
49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 +---------------------------------------------------------------+
52 +---------------------------------------------------------------+
53 | .. module:: CreateCaseFromIteration |
55 | **CreateCaseFromIteration(case_name, dir_name)** |
56 | Returns an instance of the class ``cas`` after its |
59 | - ``case_name``: the name of the case |
60 | - ``dir_name``: the name of the directory that contains |
63 +---------------------------------------------------------------+
64 | .. module:: CreateCaseFromCaseLastIteration |
66 | **CreateCaseFromCaseLastIteration(case_name, dir_name)** |
67 | Returns an instance of the class ``cas`` after its |
70 | - ``case_name``: the name of the case |
71 | - ``dir_name``: the name of the directory that contains |
74 +---------------------------------------------------------------+
75 | .. module:: CreateCaseFromCaseIteration |
77 | **CreateCaseFromCaseIteration(case_name, dir_name, number)** |
78 | Returns an instance of the class ``cas`` after its |
81 | - ``case_name``: the name of the case |
82 | - ``dir_name``: the name of the directory that contains |
84 | - ``number``: the number of the iteration of the case |
86 +---------------------------------------------------------------+
90 Methods of the class cas
91 """"""""""""""""""""""""
93 +---------------------------------------------------------------+
94 +---------------------------------------------------------------+
95 | .. module:: GetName |
98 | Returns the name of the case |
99 +---------------------------------------------------------------+
100 | .. module:: SetDirName |
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. |
107 | - ``dirname``: the name of the directory of the results |
108 +---------------------------------------------------------------+
109 | .. module:: GetDirName |
112 | Returns the name of the directory of the results of the |
114 +---------------------------------------------------------------+
115 | .. module:: SetConfType |
117 | **SetConfType(conf_type)** |
118 | Defines the type of conformity for the case |
120 | - ``conf_type``: integer as follows: |
123 | * 2: non conformal with one hanging node per element |
124 | * 3: non conformal with one hanging node per edge of |
126 | * 4: non conformal without any constraint |
127 +---------------------------------------------------------------+
128 | .. module:: GetConfType |
130 | **GetConfType()** |
131 | Returns the type of conformity |
132 +---------------------------------------------------------------+
133 | .. module:: 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 |
141 +---------------------------------------------------------------+
142 | .. module:: AddBoundaryGroup |
144 | **AddBoundaryGroup(boundary, group)** |
145 | Add a boundary to the definition of a case |
147 | - ``boundary``: name of the curved boundary |
149 | Discrete boundary: |
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 |
156 | Analytical boundary: |
158 | - ``group``: name of the group of faces located on the |
160 +---------------------------------------------------------------+
161 | .. module:: Delete |
163 | **Delete(option)** |
164 | Deletes the case and all the connected iterations. The MED|
165 | file of the first mesh is kept. |
167 | - ``option``: an integer to define what to do with the |
168 | MED file of the associated meshes |
170 | * 0: the files are kept |
171 | * 1: the files are removed |
173 | Returns an integer: |
174 | * 0: the destruction is done |
175 | * other value: problem |
176 +---------------------------------------------------------------+
177 | .. module:: 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 +---------------------------------------------------------------+
188 +---------------------------------------------------------------+
189 +---------------------------------------------------------------+
190 | .. module:: SetPyram |
192 | **SetPyram(option)** |
193 | Defines the status of the pyramids in this case |
195 | - ``option``: integer that defines the status of the |
196 | pyramids that could belongs to the initial mesh |
198 | * 0: rejected pyramids (default) |
199 | * 1: authorized pyramids |
200 +---------------------------------------------------------------+
201 | .. module:: GetPyram |
204 | Returns the status of the pyramids in this case |
205 +---------------------------------------------------------------+
207 Informations for the initial mesh
208 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210 +---------------------------------------------------------------+
211 +---------------------------------------------------------------+
212 | .. module:: MeshInfo |
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. |
219 | - ``Qual``: quality of the elements |
220 | - ``Diam``: diametre of the elements |
221 | - ``Conn``: connexity of the domain; a single block, how |
223 | - ``Tail``: size of the parts of the domain, group by |
225 | - ``Inte``: staggered elements, by dimension |
226 +---------------------------------------------------------------+
231 The creation of the object case_1 is done as follows:
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' )
249 Similar graphical input
250 """""""""""""""""""""""
251 Look at :ref:`gui_create_case_en`