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:: GetType |
111 | Returns the type of the schema |
115 +---------------------------------------------------------------+
116 | .. module:: SetScriptFile |
118 | **SetScriptFile(script_file)** |
119 | Defines the file of the script python that launches the |
122 | - ``script_file`` : the name of the file that contains |
123 | the script python |
124 +---------------------------------------------------------------+
125 | .. module:: GetScriptFile |
127 | **GetScriptFile()** |
128 | Returns the name of the file that contains the script |
130 +---------------------------------------------------------------+
131 | .. module:: SetDirName |
133 | **SetDirName(dir_name)** |
134 | Defines the name of the directory for the computation |
136 | - ``dir_name`` : the name of the directory for the |
138 +---------------------------------------------------------------+
139 | .. module:: GetDirName |
142 | Returns the name of the directory for the computation |
143 +---------------------------------------------------------------+
144 | .. module:: SetMeshFile |
146 | **SetMeshFile(mesh_file)** |
147 | Defines the MED file of the very first mesh |
149 | - ``mesh_file`` : the name of the MED file that contains |
150 | the very first mesh for the computation |
151 +---------------------------------------------------------------+
152 | .. module:: GetMeshFile |
154 | **GetMeshFile()** |
155 | Returns the name of the MED file of the very first mesh |
156 | for the computation |
157 +---------------------------------------------------------------+
162 The creation of a schema is done as follows:
165 ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py"
166 DirName = "/scratch/D68518/computation"
167 MeshFile = "/scratch/D68518/computation/maill.00.med"
168 YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
170 It can be writen down in a file :
173 YACSFile = "/scratch/D68518/computation/yacs.xml"
174 codret = YACS_0.WriteOnFile(YACSFile)
176 Similar graphical input
177 ***********************
178 Look at :ref:`gui_create_yacs`