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 |
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 +---------------------------------------------------------------+
185 The creation of a schema is done as follows:
188 ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py"
189 DirName = "/scratch/D68518/computation"
190 MeshFile = "/scratch/D68518/computation/maill.00.med"
191 YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
193 It can be writen down in a file :
196 YACSFile = "/scratch/D68518/computation/yacs.xml"
197 codret = YACS_0.WriteOnFile(YACSFile)
199 Similar graphical input
200 ***********************
201 Look at :ref:`gui_create_yacs`