The iteration
The variables are described in The iteration.
Methods of the class homard
|
- GetIteration(iter_name)
Returns an instance of the class iteration
known by its name
- iter_name: the name of the iteration
|
- GetAllIterationsName()
- Returns the liste of the name of all the existing
iterations
|
Methods of both classes cas and iteration
************************************”
See also in The case.
|
- NextIteration(iter_name)
Returns an instance of the class iteration after
its creation. It is the next iteration after:
- for a case: the very first one that corresponds to the
first mesh of the case
- for an iteration: the current iteration
Default: the produced mesh has got the same name as the
iteration
- iter_name: the name of this next iteration
|
- LastIteration()
Returns an instance of the class iteration that is
the last iteration into the descendants of:
- for a case: the very first one that corresponds to the
first mesh of the case
- for an iteration: the current iteration
It is the one that has got no child. There is an error if
more than one branch exists into the descendants.
|
Methods of the class iteration
General methods
|
- Compute(option1, option2)
Computes the mesh produced by the iteration
option1: an integer to decide what to do with
existing files, if any
- 0: stop with error
- 1: the old files are removed
option2: an integer to decide what to do with
the results
- 1: no specific action
- 2: publication into the module SMESH
- Returns an integer:
- 0: successful adaptation
- other value: problem
|
- GetName()
- Returns the name of the iteration
|
- GetNumber()
Returns the number of the iteration.
The iteration #0 is the one associated to the initial
mesh. Then, an iteration with number #N comes from the
adaptation of an iteration with number #(N-1).
|
- GetIterParent()
- Returns the iteration parent
|
- AssociateHypo(hypo_name)
Associate an hypothesis with the iteration
- hypo_name: the name of the hypothesis
|
- GetHypoName()
- Returns the name of the associated hypothesis
|
- GetCaseName()
- Returns the name of the associated case
|
- GetState()
Returns the state of the iteration
- 2: computed iteration
- 1: non computed iteration
- <=0: initial iteration not to be computed, with a
number equal to the absolute valure of the state
|
- GetLogFile()
- Returns the name of the file with the messages all along
the running of HOMARD
|
- GetFileInfo()
- Returns the name of the file with the analysis of the mesh
|
- GetDirName()
- Returns the name of the directory that contains the
results of the iteration
|
- Delete(option)
Deletes the iteration and all its children
- Returns an integer:
- 0: the destruction is done
- other value: problem
|
Miscellenaous
|
- SetInfoCompute(MessInfo)
Defines options to track the computation of the iteration
|
- GetInfoCompute()
- Returns the options to track the computation
|
Example
To create the first iteration, the starting point is the iteration associated to the initial mesh. It is the one that defines the case.
iter_name = "Iteration_1"
iter_1 = case_1.NextIteration(iter_name)
iter_1.SetField(field_file)
iter_1.SetTimeStepRank( 0, 0)
iter_1.SetMeshName("maill_01")
iter_1.SetMeshFile("/local00/M.01.med")
iter_1.AssociateHypo("HypoField")
codret = iter_1.Compute(1, 2)
Then, the next iteration is created from the current iteration.
iter_name = "Iteration_2"
iter_2 = iter_1.NextIteration(iter_name)
iter_2.SetField(field_file)
iter_2.SetTimeStepRank( 1, 1)
iter_2.SetMeshName("maill_02")
iter_2.SetMeshFile("/local00/M.02.med")
iter_2.AssociateHypo("HypoField")
codret = iter_2.Compute(1, 2)