The schema YACS
The variables are described in The schema YACS.
Méthodes de la classe cas
See also in The case.
|
- CreateYACSSchema(yacs_name, ScriptFile, DirName, MeshFile)
Returns an instance of the class yacs, after its
creation
- yacs_name : the name of the schema
- ScriptFile : the file of the python script that
drives the computation, coupled with the mesh adaptation
- DirName : the directory for the computation
- MeshFile : the MED file that contains the very first
mesh for the computation
|
Methodes of the class homard
|
- GetYACS(yacs_name)
Returns the instance of the class classe yacs
known by its name
- yacs_name : the name of the schema
|
- GetAllYACSsName()
- Returns the list of the names of all the existing
schemas
|
Methodes of the class YACS
General methods
|
- Write()
Writes the schema into the file schema.xml, in the
directory of the case
Writes the schema into the file of the schema
By default, it is the file schema.xml, in the
directory of the case. If WriteOnFile was used before
the writings are into this new file.
- Returns an integer:
- 0: the writing is done
- other value: problem
|
- WriteOnFile(file_xml)
Writes the schema into a specified file.
- file_xml : name of the xml file for the schema
- Returns an integer:
- 0: the writing is done
- other value: problem
|
- Delete(option)
Deletes the schema
- Returns an integer:
- 0: the destruction is done
- other value: problem
|
The options of the schema
The default values are defined by the preferences of the module HOMARD.
|
- SetMaxIter(MaxIter)
Defines the maximal number of iterations for the schema.
- MaxIter : the maximal number of iterations of the
schema
|
- GetMaxIter()
- Returns the maximal number of iterations of the schema
|
- SetMaxNode(MaxNode)
Defines the maximal number of nodes for the adaptation.
- MaxNode : the maximal number of nodes for the
adaptation. If MaxNode equals 0, no limit.
|
- GetMaxNode()
- Returns the maximal number of nodes for the adaptation
|
- SetMaxElem(MaxElem)
Defines the maximal number of meshes for the adaptation.
- MaxElem : the maximal number of meshes for the
adaptation. If MaxElem equals 0, no limit.
|
- GetMaxElem()
- Returns the maximal number of meshes for the adaptation
|
- SetTestConvergence(Type, VRef)
Defines a convergence test for the schema.
|
- GetTestConvergenceType()
- Returns the type of convergence of the schema.
|
- GetTestConvergenceVRef()
- Returns the reference value for the test.
|
Example
The creation of a schema is done as follows:
ScriptFile = "/scratch/D68518/Salome/HOMARD_SALOME/HOMARD_SRC/doc/files/ScriptAster.py"
DirName = "/scratch/D68518/computation"
MeshFile = "/scratch/D68518/computation/maill.00.med"
YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
YACS_0.SetMaxIter(4)
It can be writen down in a file :
YACSFile = "/scratch/D68518/computation/yacs.xml"
codret = YACS_0.WriteOnFile(YACSFile)