6 .. index:: single: YACS
8 The variables are described in :doc:`gui_create_yacs`.
10 Méthodes de la classe cas
11 *************************
12 See also in :doc:`tui_create_case`.
14 +---------------------------------------------------------------+
15 +---------------------------------------------------------------+
16 | .. module:: CreateYACSSchema |
18 | **CreateYACSSchema(yacs_name, ScriptFile, DirName, MeshFile)**|
19 | Returns an instance of the class ``yacs``, after its |
22 | - ``yacs_name`` : the name of the schema |
23 | - ``ScriptFile`` : the file of the python script that |
24 | drives the computation, coupled with the mesh adaptation|
25 | - ``DirName`` : the directory for the computation |
26 | - ``MeshFile`` : the MED file that contains the very first|
27 | mesh for the computation |
28 +---------------------------------------------------------------+
30 Methodes of the class homard
31 ****************************
33 +---------------------------------------------------------------+
34 +---------------------------------------------------------------+
35 | .. module:: GetYACS |
37 | **GetYACS(yacs_name)** |
38 | Returns the instance of the class classe ``yacs`` |
41 | - ``yacs_name`` : the name of the schema |
42 +---------------------------------------------------------------+
43 | .. module:: GetAllYACSsName |
45 | **GetAllYACSsName()** |
46 | Returns the list of the names of all the existing |
48 +---------------------------------------------------------------+
52 Methodes of the class YACS
53 **************************
58 +---------------------------------------------------------------+
59 +---------------------------------------------------------------+
63 | Writes the schema into the file ``schema.xml``, in the |
64 | directory of the case |
65 | Writes the schema into the file of the schema |
66 | By default, it is the file ``schema.xml``, in the |
67 | directory of the case. If ``WriteOnFile`` was used before |
68 | the writings are into this new file. |
70 | Returns an integer: |
71 | * 0: the writing is done |
72 | * other value: problem |
73 +---------------------------------------------------------------+
74 | .. module:: WriteOnFile |
76 | **WriteOnFile(file_xml)** |
77 | Writes the schema into a specified file. |
79 | - ``file_xml`` : name of the xml file for the schema |
81 | Returns an integer: |
82 | * 0: the writing is done |
83 | * other value: problem |
84 +---------------------------------------------------------------+
85 | .. module:: Delete |
87 | **Delete(option)** |
88 | Deletes the schema |
90 | - ``option``: an integer to define what to do with the |
91 | xml file of the schema |
93 | * 0: the files is kept |
94 | * 1: the files is removed |
96 | Returns an integer: |
97 | * 0: the destruction is done |
98 | * other value: problem |
99 +---------------------------------------------------------------+
102 Informations about the schema
103 =============================
105 +---------------------------------------------------------------+
106 +---------------------------------------------------------------+
107 | .. module:: GetName |
110 | Returns the name of the schema |
111 +---------------------------------------------------------------+
112 | .. module:: SetType |
114 | **SetType(Type)** |
115 | Defines the type of the schema. |
117 | - ``Type`` : the type of the schema |
121 +---------------------------------------------------------------+
122 | .. module:: GetType |
125 | Returns the type of the schema |
126 +---------------------------------------------------------------+
127 | .. module:: SetScriptFile |
129 | **SetScriptFile(script_file)** |
130 | Defines the file of the script python that launches the |
133 | - ``script_file`` : the name of the file that contains |
134 | the script python |
135 +---------------------------------------------------------------+
136 | .. module:: GetScriptFile |
138 | **GetScriptFile()** |
139 | Returns the name of the file that contains the script |
141 +---------------------------------------------------------------+
142 | .. module:: SetDirName |
144 | **SetDirName(dir_name)** |
145 | Defines the name of the directory for the computation |
147 | - ``dir_name`` : the name of the directory for the |
149 +---------------------------------------------------------------+
150 | .. module:: GetDirName |
153 | Returns the name of the directory for the computation |
154 +---------------------------------------------------------------+
155 | .. module:: SetMeshFile |
157 | **SetMeshFile(mesh_file)** |
158 | Defines the MED file of the very first mesh |
160 | - ``mesh_file`` : the name of the MED file that contains |
161 | the very first mesh for the computation |
162 +---------------------------------------------------------------+
163 | .. module:: GetMeshFile |
165 | **GetMeshFile()** |
166 | Returns the name of the MED file of the very first mesh |
167 | for the computation |
168 +---------------------------------------------------------------+
169 | .. module:: SetXMLFile |
171 | **SetXMLFile(xml_file)** |
172 | Defines the xml file |
174 | - ``mesh_file`` : the name of the xml file |
175 +---------------------------------------------------------------+
176 | .. module:: GetXMLFile |
179 | Returns the name of the xml file |
180 +---------------------------------------------------------------+
183 The options of the schema
184 =========================
185 The default values are defined by the preferences of the module HOMARD.
187 +---------------------------------------------------------------+
188 +---------------------------------------------------------------+
189 | .. module:: SetMaxIter |
191 | **SetMaxIter(MaxIter)** |
192 | Defines the maximal number of iterations for the schema. |
194 | - ``MaxIter`` : the maximal number of iterations of the |
196 +---------------------------------------------------------------+
197 | .. module:: GetMaxIter |
200 | Returns the maximal number of iterations of the schema |
201 +---------------------------------------------------------------+
202 | .. module:: SetMaxNode |
204 | **SetMaxNode(MaxNode)** |
205 | Defines the maximal number of nodes for the adaptation. |
207 | - ``MaxNode`` : the maximal number of nodes for the |
208 | adaptation. If MaxNode equals 0, no limit. |
209 +---------------------------------------------------------------+
210 | .. module:: GetMaxNode |
213 | Returns the maximal number of nodes for the adaptation |
214 +---------------------------------------------------------------+
215 | .. module:: SetMaxElem |
217 | **SetMaxElem(MaxElem)** |
218 | Defines the maximal number of meshes for the adaptation. |
220 | - ``MaxElem`` : the maximal number of meshes for the |
221 | adaptation. If MaxElem equals 0, no limit. |
222 +---------------------------------------------------------------+
223 | .. module:: GetMaxElem |
226 | Returns the maximal number of meshes for the adaptation |
227 +---------------------------------------------------------------+
228 | .. module:: SetTestConvergence |
230 | **SetTestConvergence(Type, VRef)** |
231 | Defines a convergence test for the schema. |
233 | - ``Type`` : the type of convergence of the schema. |
236 | * 1 : if the test value is greater than VRef |
237 | * 2 : if the test value is lower than VRef |
239 | - ``VRef`` : the reference value for the test |
240 +---------------------------------------------------------------+
241 | .. module:: GetTestConvergenceType |
243 | **GetTestConvergenceType()** |
244 | Returns the type of convergence of the schema. |
245 +---------------------------------------------------------------+
246 | .. module:: GetTestConvergenceVRef |
248 | **GetTestConvergenceVRef()** |
249 | Returns the reference value for the test. |
250 +---------------------------------------------------------------+
255 The creation of a schema is done as follows:
258 ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py"
259 DirName = "/scratch/D68518/computation"
260 MeshFile = "/scratch/D68518/computation/maill.00.med"
261 YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
264 It can be writen down in a file :
267 YACSFile = "/scratch/D68518/computation/yacs.xml"
268 codret = YACS_0.WriteOnFile(YACSFile)
270 Similar graphical input
271 ***********************
272 Look at :doc:`gui_create_yacs`