The hypothesis
The variables are described in The hypothesis.
Methods of the class homard
|
- CreateHypothesis(hypo_name)
Returns an instance of the class hypothese
- hypo_name: the name of the hypothesis
|
- GetHypothesis(hypo_name)
Returns an instance of the class hypothese
known by its name
- hypo_name: the name of the hypothesis
|
- GetAllHypothesesName()
- Returns the liste of the name of all the existing
hypotheses
|
Methods of the class hypothese
General methods
|
- GetName()
- Returns the name of the hypothesis
|
- GetAdapType()
Returns the type of the adaptation
- -1: uniform
- 0: by zones
- 1: by a field
|
- GetRefinType()
Returns the type of the refinement
|
- GetUnRefType()
Returns the type of the unrefinement
|
- Delete()
Deletes the hypothesis
- Returns an integer:
- 0: the destruction is done
- other value: problem
|
Adaptation by a field
The driving field and the thresholds
|
- SetField(FieldName)
Gives the name of a driving field to the hypothesis
- FieldName: the name of the driving field
|
- GetFieldName()
- Returns the name of the driving field
|
- SetUseField(use_field)
Gives the usage of the driving field
|
- SetRefinThr(type_thres, threshold)
Defines the thresholds for the refinement
|
- GetRefinThrType()
- Returns the type of the threshold for the refinement
|
- SetUnRefThr(type_thres, threshold)
Defines the thresholds for the unrefinement
|
- GetUnRefThrType()
- Returns the type of the threshold for the unrefinement
|
The components of the driving field
|
- AddComp(comp_name)
Add a component of the field
- comp_name: name of a component to take into account
Note: if this method is not used, every component
of the field is taken into account.
|
- SetUseComp(use_comp)
Defines hom to use the components
|
- GetComps()
- Returns the list of the used components
|
- SupprComp(comp_name)
Eliminates a component of the field
- comp_name: name of a component to eliminate
|
- SupprComps()
- Eliminates all the components of the field
|
Adaptation by zones
|
AddZone(zone_name, type_use)
|
- GetZones()
Returns the list of the used zones with their uses
Warning: the use is stored as a string in the list and
not as an integer.
Example: [‘Zone_A’, ‘1’, ‘Zone_B’, ‘1’, ‘Zone_C’, ‘1’]
|
- SupprZone(zone_name)
Eliminates a zone from the hypothesis
- zone_name: name of a zone to eliminate
|
- SupprZones()
- Eliminates all the zones from the hypothesis
|
The filtering by the groups
|
- AddGroup(group_name)
Add a group to the filtering
- group_name: name of the group to take into account
|
- GetGroups()
- Returns the mist of the groups that are used in the
filtering
|
Interpolation of fields
|
SetTypeFieldInterp(typefieldinterp)
|
- GetTypeFieldInterp()
- Returns the integer that defines if some fields are
interpolated or not
|
AddFieldInterp(FieldName)
- FieldName: the name of the field to interpolate
The interpolation type is automatically deduced by
HOMARD; it corresponds to the type 0 of AddFieldInterpType
|
AddFieldInterpType(FieldName, type_interp)
- FieldName: the name of the field to interpolate
- type_interp: integer that defines the type of
interpolation
For a field over the nodes:
- 0: the field will be interpolated in degree 1 or 2
depending on its baseframe.
- 1: interpolation en degree 1
- 2: interpolation en degree 2
- 3: interpolation iso-P2
For a field over the elements:
- 0: the field will be interpolated as an intensive
variable
- 1: the field will be interpolated as an extensive
variable
|
- GetFieldInterps()
Returns the list of the interpolated fields with their use
Warning: the use is stored as a string in the list and
not as an integer.
Example: [‘DEPL’, ‘0’, ‘Mass’, ‘1’, ‘Density’, ‘0’]
|
- SupprFieldInterp(FieldName)
Eliminates a field from the hypothesis
- FieldName: name of a field to eliminate
|
- SupprFieldInterps()
- Eliminates all the fields from the hypothesis
|
Note
The file and the time steps for the fiels are defined with the iteration; see The iteration.
Advanced options
|
- SetNivMax(nivmax)
Defines the maximum level for the refinement
- nivmax: level of refinement that must not be
exceeded
|
- GetNivMax()
- Returns the maximum level for the refinement
|
- SetDiamMin(diammin)
Defines the minimum diameter of the future elements
- diammin: minimum diameter for an element
|
- GetDiamMin()
- Returns the minimum diameter of the future elements
|
- SetAdapInit(option)
Defines the treatment of the elements where the field that
governs the adaptation is not defined
|
- GetAdapInit()
- Returns the treatment of the elements where the field that
governs the adaptation is not defined
|
- SetExtraOutput(option)
Acts if some extra information are required into the
output MED file. The option is a product of
2, 3, 5, 7, 11.
|
- GetExtraOutput()
- Returns the choice for the output of extra information
|
Example
The creation of the object hypo_1 is done as follows:
hypo_1 = homard.CreateHypothesis("HypoField")
hypo_1.SetField("INDICATEUR")
hypo_1.AddComp("INDX")
hypo_1.AddComp("INDZ")
hypo_1.SetRefinThr(1, 80.)
hypo_1.AddFieldInterp("DEPL")
hypo_1.AddFieldInterpType("MASS", 1)