6 .. index:: single: YACS
8 The variables are described in :ref:`gui_create_yacs`.
10 Méthodes de la classe cas
11 *************************
12 See also in :ref:`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 |
66 | Returns an integer: |
67 | * 0: the writing is done |
68 | * other value: problem |
69 +---------------------------------------------------------------+
70 | .. module:: WriteOnFile |
72 | **WriteOnFile(file_xml)** |
73 | Writes the schema into a specified file. |
75 | - ``file_xml`` : name of the xml file for the schema |
77 | Returns an integer: |
78 | * 0: the writing is done |
79 | * other value: problem |
80 +---------------------------------------------------------------+
81 | .. module:: Delete |
83 | **Delete(option)** |
84 | Deletes the schema |
86 | - ``option``: an integer to define what to do with the |
87 | xml file of the schema |
89 | * 0: the files is kept |
90 | * 1: the files is removed |
92 | Returns an integer: |
93 | * 0: the destruction is done |
94 | * other value: problem |
95 +---------------------------------------------------------------+
98 Informations about the schema
99 =============================
101 +---------------------------------------------------------------+
102 +---------------------------------------------------------------+
103 | .. module:: GetName |
106 | Returns the name of the schema |
107 +---------------------------------------------------------------+
108 | .. module:: SetType |
110 | **SetType(Type)** |
111 | Defines the type of the schema. |
113 | - ``Type`` : the type of the schema |
117 +---------------------------------------------------------------+
118 | .. module:: GetType |
121 | Returns the type of the schema |
122 +---------------------------------------------------------------+
123 | .. module:: SetScriptFile |
125 | **SetScriptFile(script_file)** |
126 | Defines the file of the script python that launches the |
129 | - ``script_file`` : the name of the file that contains |
130 | the script python |
131 +---------------------------------------------------------------+
132 | .. module:: GetScriptFile |
134 | **GetScriptFile()** |
135 | Returns the name of the file that contains the script |
137 +---------------------------------------------------------------+
138 | .. module:: SetDirName |
140 | **SetDirName(dir_name)** |
141 | Defines the name of the directory for the computation |
143 | - ``dir_name`` : the name of the directory for the |
145 +---------------------------------------------------------------+
146 | .. module:: GetDirName |
149 | Returns the name of the directory for the computation |
150 +---------------------------------------------------------------+
151 | .. module:: SetMeshFile |
153 | **SetMeshFile(mesh_file)** |
154 | Defines the MED file of the very first mesh |
156 | - ``mesh_file`` : the name of the MED file that contains |
157 | the very first mesh for the computation |
158 +---------------------------------------------------------------+
159 | .. module:: GetMeshFile |
161 | **GetMeshFile()** |
162 | Returns the name of the MED file of the very first mesh |
163 | for the computation |
164 +---------------------------------------------------------------+
169 The creation of a schema is done as follows:
172 ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py"
173 DirName = "/scratch/D68518/computation"
174 MeshFile = "/scratch/D68518/computation/maill.00.med"
175 YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
177 It can be writen down in a file :
180 YACSFile = "/scratch/D68518/computation/yacs.xml"
181 codret = YACS_0.WriteOnFile(YACSFile)
183 Similar graphical input
184 ***********************
185 Look at :ref:`gui_create_yacs`