Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
1/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
Organization (S):
EDF-R & D/AMA
Data-processing manual of Description
D5.01 booklet: -
D5.01.01 document
To introduce a new control
Summary:
This document describes the method to introduce a new control (operator or procedure) into
Code_Aster. It describes the drafting with the format “python” of the catalog of the control and the routine
FORTRAN associated.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
2/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
Count
matters
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
3/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
1 Introduction
To introduce a new control into Code_Aster, it is necessary:
·
to write the catalog associated with this control [§3],
·
to write routine FORTRAN
OPxxxx
associated [§9],
·
to follow the plan of development [A2.01.00].
We will speak here only about the first two points.
2
Vision user of a control
Let us take as example the control
AFFE_MATERIAU
who allows to affect on a mesh of
material characteristics. Here a possible use of this control in the file of
controls provided by the user of Code_Aster:
cham = AFFE_MATERIAU (MAILLAGE=mail,
AFFE=_F (
ALL
=
“YES”,
MATER
=
steel
))
During the use of a control, it appears:
·
the name “user” of the concept produced by the control:
cham
·
the name of the control:
AFFE_MATERIAU
·
key words factors:
AFFE
·
single-ended spanner words:
ALL
,
MATER
,
MESH
·
names “users” of concepts arguments:
steel, mall
·
values of the simple type (whole, real, text,…) only or in list:
“YES”
From the user point of view, by writing a name on the left sign “=” of the control, one affects it
name with the result of the control.
This “name user” is affected a produced concept (or structure of data) calculated by
the operator and whose type is given by the supervisor. The type of the produced concept is defined in
catalog control [§3] in coherence with the catalog
accas.capy
, stored with same
place that catalogs of controls, which inventories all the types of concepts created and used
by the code.
For example
cham
is the name user of the result of the control and with this name is associated it
concept of the type
cham_mater
(see new page).
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
4/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
3
Drafting of the catalog of control
To introduce a new control, it is necessary to create an associated catalog in which
will be indicated:
·
the name of the control,
·
its description in a few words,
·
the category of classification by families of the controls for display in EFICAS,
·
the nature of the control: operator (production of concept), procedure (not of concept
product), macro-control,
·
the number
xxxx
routine FORTRAN associated with this control [§4].
·
for the produced concept:
-
rules of determination of the type of the concept [§9],
-
the possibility of re-use (réentrant character).
·
for the key words [§5], [§7]:
-
if their presence is optional or obligatory, if they are excluded between them,…
-
the type of the argument,
-
the number of awaited arguments of this type,
-
the default value (if there is one of them),
-
the list of the acceptable values (possibly),
-
the range of the acceptable values (possibly), if one awaits an entirety or a reality,
·
for the key words factors [§6]:
-
if their presence is optional or obligatory,
-
the minimum and maximum number of possible occurrences,
·
blocks: logical regrouping of key words when conditions on other key words
are satisfied [§8].
Note:
One will not speak in this document about the introduction about a new macro-control
[D5.01.02].
The language used to write this catalog is the language interpreted Python: the comments are
written behind character “#”, one sees key words (identifying follow-ups of the character “=”),
brackets, of the commas to separate the key words…
Let us take again the example of the control
AFFE_MATERIAU
, the catalog - i.e. the description of
the control provided by its developer - associated is:
AFFE_MATERIAU=
OPER (nom= " AFFE_MATERIAU ", op=6, sd_prod=cham_mater,
fr= " Assignment of material characteristics to a mesh ",
reentrant=', UIinfo= {“groups”:(“Modeling”,)},
MESH =
SIMP (statut=' o', typ=maillage),
MODEL =
SIMP (statut=' f', typ=modele),
AFFE =
FACT (statut=' o', min=1, max=' ** ',
regles= (UN_PARMI (“ALL”, “GROUP_MA”, “MESH”, “GROUP_NO”, “NODE”),),
ALL =
SIMP (statut=' f', typ=' TXM', into= (“YES”,)),
GROUP_MA =
SIMP (statut=' f', typ=grma, max=' ** '),
NET =
SIMP (statut=' f', typ=ma, max=' ** '),
GROUP_NO =
SIMP (statut=' f', typ=grno, max=' ** '),
NODE =
SIMP (statut=' f', typ=no, max=' ** '),
MATER =
SIMP (statut=' o', typ=mater),
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
5/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
TEMP_REF =
SIMP (statut=' f', typ=' R', defaut= 0.E+0),
),
);
Some remarks on this catalog of control:
·
it appears reserved key words of the catalog, written in fat in the example, that us
will try not to confuse with the key words of the control,
·
the type of the produced concept is specified behind the reserved key word
sd_prod
,
In the description of the control, the reader of catalog recognizes the reserved key words
following, their significance specifies will be given throughout the document.
MACRO OPER/PROC/
To specify the type of control (production of one, zero even
several concepts in the case of macros)
name
To indicate the name seen by the user to indicate the control
COp
To specify the number of high level routine FORTRAN associated
order
sd_prod
To define the type of produced concept
rules
To define the logical rules of pairing or exclusion of key words
UN_PARMI/….
To define a list of key words among which the data must
to find exactly once.
Fr
To describe in a sentence (in French) the role of the control, it is it
contents of the bubble of aid displayed by EFICAS
UIinfo
Useful only for the displays in EFICAS, to specify the family of
classification of the control: Postprocessings, Modeling…
reentrant
To specify if the control creates a new concept (value
“
),
modify an existing concept (value
“O”
), or potentially both
(value
“F”
)
SIMP
To specify a simple key word of the control
FACT
To specify a key word ratio control.
BLOCK
To define a block of key words of which the appearance is subjected to one
“condition”.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
6/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
One can break up the writing of the catalog of control according to following stages'
[D1.02.01 §1.2]:
·
To specify the type of the concept produced (when there exists, i.e. for a control of
type
OPER
):
To specify the type of the produced concept of an operator, should be used the reserved key word
sd_prod
(structure of produced data). For example, the assignment
sd_prod=cham_mater
indicate that
cham_mater
is the type of the produced concept of the operator
AFFE_MATERIAU
.
In the case of a procedure, it does not have there a produced concept (and thus not of key word sd_prod
in the catalog). For example
CALC_G_THETA_T
is a control of which the type of
produced concept is
TABL_CALC_G_TH,
whereas
IMPR_RESU
is a procedure without
produced concept:
CALC_G_THETA_T
=
OPER (
nom= " CALC_G_THETA_T ", op=53,
sd_prod=tabl_calc_g_th,
reentrant=',
…
IMPR_RESU = PROC (nom= " IMPR_RESU ", op=39,…
If the type of the produced concept depends on the arguments of the operator, it will be consulted [§9.1].
If the produced concept can be a re-used concept and nouveau riche, one will indicate it by informing it
reserved key word
reentrant
[§9.2].
·
To define the name of the control:
It is written on the left sign “=” in the catalog, on the right in the command file of
the user. The rule of use is to constitute monograms using components of
four characters separated by underlined white (if possible). The final choice of the name
is given by the Project Leader [A2.01.02].
Generally the prefix indicates the action, the suffix the treated concept (for example
AFFE_MATERIAU
). Let us note some prefixes frequently employed:
AFFE
:
assignments on the mesh or the model,
CHALLENGE
:
definitions of objects which are not fields,
CALC
:
controls calling the routine
CALCULATION
and producing fields of
sizes.
The name of a control should not exceed 16 characters.
This name is that used by the user in a command file Aster.
·
To define the number of routine FORTRAN carrying out the control: [§4]
·
To describe the various key words: [§5], [§6], [§7]. It is the core of the catalog.
·
To close the open bracket after key OPER/PROC/MACRO word.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
7/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
4
To define the link between the catalog and FORTRAN program
associated
The reserved key word of the reader of catalog
COp
the call to routine FORTRAN allows
OPxxxx
who
carry out the task of the control [§9]. The argument of
COp
is a strictly positive entirety included/understood enters
1 and 199. The number is allotted by the team codes (cf [A2.01.02]).
On the example considered the routine
OP0006
will be called during the execution of the control
AFFE_MATERIAU
.
5
To define the attributes of the single-ended spanner words
General syntax to declare a word single-ended spanner is:
MOT_CLE = SIMP (statut=…, typ=…, into= (…,), defaut=…
min=…, max=…, val_min=…, val_max=…, validators=
…
),
Among the attributes attached to a key word, only
statute
and
typ
are obligatory for any key word
simple:
·
The statute:
The definition of the statute by the reserved word
statute
is obligatory.
The recognized statutes are only:
'
O
'
Obligatory: in this case the key word will have to appear obligatorily in
body of call of the ordering of the user (except if this key word is under one
key word optional factor in which case the single-ended spanner word is obligatory as soon as it
key word factor appears).
'
F
'
Optional: in the contrary case.
·
The type:
The statement of the type by the reserved word
typ
is obligatory.
The recognized types are:
typ = '
I
'
for the entireties
typ = '
R
'
for realities
typ = '
C
'
for the complexes
typ =
Type_de_concept
(without dimensions!)
for the concepts
typ = '
TX
'
for the texts
typ = '
L
'
for logics
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
8/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
Notice on the concepts:
The type of awaited concept is a type of concept created by another control that
pending order. It appears among the list of the concepts defined in the catalog of
statement of the concepts
: accas.capy
.
The type of the awaited concept is not necessarily single, it can be a list. This list
declares itself as follows:
MATR_ASSE = SIMP (
…
typ= (matr_asse_depl_r, matr_asse_depl_c,
…
)
,
…
)
The documentary syntax of this example is:
MATR_ASSE: m
/[matr_asse_depl_r]
/
[matr_asse_depl_c]
·
Default value for a key word:
It is possible to assign a default value to a key word not receiving an argument of
type “concept”. The statement is done by the reserved word of the reader of catalog:
defect
Examples:
PRECISION
=SIMP (
statut=' f', typ=' R',
defaut=1.E-3),
FILE =SIMP (
statut=' f', typ=' TXM',
defaut= " RESULT "),
·
List acceptable values:
So that the supervisor controls the validity of the contents of certain arguments, it is possible
to declare the values of the awaited arguments. This statement is done by the reserved word
into
Examples:
INFORMATION
=SIMP (statut=' f', typ=' I', defaut= 1, into= (1,2)),
The key word INFORMATION is optional, its default value is
1
and the only accepted values are
1
and
2
. Documentary syntax is:
INFORMATION:
/
1
[DEFECT]
/2
ALL =SIMP (
statut=' f',
typ=' TXM',
into= (“YES”, “NOT”)),
·
A number of awaited values:
Reserved words
min
and
max
allow to control the length of the list of the arguments
waited behind the single-ended spanner word. By defect, if nothing is specified in the catalog, one
awaits one and only one value behind a single-ended spanner word (
max = 1
). Attention, to declare
min = 1
do not bring anything and does not amount especially making the word key obligatory. If a number
potentially unlimited of elements is waited, syntax is
max = “**”
.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
9/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
Examples:
NET
=SIMP (
statut=' f',
typ=ma,
max=' ** '),
The user can enter as many here names of meshs it wishes.
CENTER
=SIMP (
statut=' f', typ=' R', defaut= (0., 0., 0.),
min=3, max=3),
A vector here is awaited (list of exactly three realities).
·
Range of acceptable values:
For the entireties and realities, one can specify the values minimum and/or allowed maximum:
NAKED
=SIMP (
statut=' o', typ=' R',
val_min=-1E+0,
val_max=0.5E+0),
On this example, NAKED must belong to the interval [- 1, 0.5]. Values given by both
reserved words are included in the interval.
·
More intricate criteria:
In addition to the ranges of values and the cardinal of the list, one can impose criteria more
complicated on the value provided by the user, they are the validators, defined in
Core/N_VALIDATOR.py.
One can program the new ones, according to the needs. Those currently present are:
·
RangeVal (low, high): identical to the behavior of val_min, val_max
·
CardVal (min, max)
: identical to the behavior of min, max
·
PairVal
: the provided entireties must be even
·
EnumVal (list)
: identical to the behavior of into
·
NoRepeat
: checking of the absence of doubled blooms in a list
·
LongStr (low, high)
: checking length of a character string
·
OrdList (command)
: checking which a list is increasing or decreasing
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
10/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
6
Case of the key words factors
The key words factors are obligatory or optional. It is possible to control the numbers
minimum and maximum of occurrences of a key word factor.
The statements are done thanks to the reserved key word
FACT
·
The statute:
statute
It is related to the key word factor.
The recognized statutes are only:
“O”:
Obligatory
“F”:
Optional
“of:
Optional but used by optional defect, i.e for the user with the capture
but obligatory for the operation of the code. Default values of
single-ended spanner words must define the syntax of all the key word factor seen of
code when the user does not inform anything. The user does not need
to inform the key word factor and its single-ended spanner words so that there exists and is
visible of the supervisor with the execution.
·
The number of occurrences:
As for the single-ended spanner words, the reserved words
min
and
max
allow to specify
awaited occurrences of the key words factors. If one puts nothing, the situation by
defect is max=1, the key word factor is then not répétable.
Examples:
MCFACT =
FACT (statut=' f', min=3, max=3,…)
the key word factor is obligatory and must appear three times exactly.
MCFACT =
FACT (statut=' f', max=
'
** ',…)
the key word factor is optional but can appear time as many as one wants.
MCFACT =
FACT (statut=' of, max=1,…)
the key word factor is optional but if the user does not specify it, it nevertheless is taken in
count and the values of the single-ended spanner words (under the key word factor) are affected by
defect.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
11/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
7
To exclude or gather key words: key word
rules
The use in the catalogs of controls of the reserved key word
rules
described below and of
blocks (following paragraph) makes it possible to entirely reproduce the logic of sequence of the words
keys described in the paragraph syntax of the documentation of use. There should not thus be
no checking of syntax (tests on the presence or the contents of key words) on the level of
routines FORTRAN
op0nnn.f
.
Reserved words, present under the key word
rules
, which follows make it possible to ensure a coherence
on the simultaneous presence of the key words of the control. Behind these reserved words (
EXCLUDED
,
UN_PARMI
,
TOGETHER
,…), a list of key words is found (control). These key words are
either of the single-ended spanner words (under the same key word factor), or of the key words factors. In the continuation
this paragraph one will use nothing any more but the term “key word”.
EXCLUDE mc1,
mc2,…, mcn
The key words are excluded mutually.
UN_PARMI mc1,
mc2,…, mcn
One of the key words of the list must be obligatorily present. Its presence
excludes the others.
TOGETHER mc1,
mc2,…, mcn
The key words must appear together.
AU_MOINS_UN mc1,
mc2,…, mcn
It is necessary that at least a key word among the list is present. It is licit of in
to have several present.
PRESENT_PRESENT mc1,
mc2,…, mcn
If the key word
mc1
is present then the key words
mc2,…, mcn
must
to be present.
PRESENT_ABSENT mc1,
mc2,… mcn
If the key word
mc1
is present then the key words
mc2,…, mcn
must
to miss.
Note:
PRESENT_PRESENT
is different from
TOGETHER
since for
PRESENT_PRESENT mc2
can
to be present, without
mc1
is.
PRESENT_ABSENT
is different from
EXCLUDED
since for
PRESENT_ABSENT mc2,…, mcn
can be present assemblies if
mc1
misses.
Example:
rules = (
UN_PARMI (“NODE”, “GROUP_NO”, “MESH”),
PRESENT_PRESENT (“MESH”, “NOT”),),
NODE
=SIMP (…),
NET
=SIMP (…),
NOT
=SIMP (…),
GROUP_NO =SIMP (…),
The supervisor checks that the user gave one and only one of the key words well among
NODE
,
GROUP_NO
and
NET
and, if it gave
NET
, that
NOT
that is to say also present.
Caution:
Key words handled in the key word
rules
must be on the same level of parenthesizing
that the aforementioned in the tree structure defined by the key words factors and the blocks. Several words
keys
rules
can be present in the same catalog, with the main root of
order or under key words factors, the logical conditions applying whereas to
single-ended spanner words of the key words factor.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
12/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
8 Them
blocks
The blocks are appeared as key words factors. They allow two things:
·
to translate in the catalog of the control of the logical rules relating to the value or it
type of the contents of the single-ended spanner words; whereas conditions under the key word
rules
relate that to the presence or the absence of the key words. With the help of the satisfaction of
conditions, one can thus gather key words unit or affect attributes to them
(defects…) private individuals,
·
to gather the key words by families for more clearness in EFICAS. When the presence of
key words is subjected to condition, will be visible with the user since EFICAS only them
optional key words induced by this condition, with their attributes (defect,…) private individuals with
the condition.
Examples:
SOLVEUR =FACT (statut=' of, min=1, max=1,
METHODE=SIMP (statut=' f', typ=' TXM', defaut= " MULT_FRONT ",
into= (“MULT_FRONT”, “LDLT”)
),
will b_mult_front =BLOC (condition = “METHOD == “MULT_FRONT””,
fr= " Parameters of the frontal method multi ",
RENUM=SIMP (
statut=' f', typ=' TXM', defaut= " MDA ",
into= (“MANDELEVIUM”, “MDA”, “MONGREL”)
),
),
b_ldlt
=
BLOCK (condition = “METHOD == “LDLT””,
fr= " Parameters
of
method
LDLT ",
RENUM=SIMP (
statut=' f', typ=' TXM', defaut= " RCMK ",
into= (“RCMK”, “WITHOUT”)
),
TAILLE=SIMP (statut=' f', typ=' R', defaut=
400.
),
),
),
The blocks are named by the developer. Their name must start with
“b_”
. In the example,
if
METHOD
is worth
MULT_FRONT
, then the optional single-ended spanner word
RENUM
will appear with three values
possible declared under
into
. So on the other hand
METHOD
is worth
LDLT
, the same key word will be present
but with different possible values; moreover it will be then possible to inform the key word
simple
CUT
. These key words and their respective attributes will not appear of course in EFICAS
that after the user will have affected a value with the single-ended spanner word
METHOD
.
b_nomdubloc=BLOC (condition= " (MOTCLE1!= Nun) gold (Astype (MOTCLE2) ==grma) “,
One shows on this example that the condition can multiple (be articulated by
however/and
) and can carry
also on the presence of the key word
(MOTCLE1!= Nun)
or the type of what it contains
(Astype (MOTCLE2) == grma).
Caution:
·
key words handled in
condition
BLOCK
must be on the same level as it
block itself in the tree structure defined by the key words factors and the blocks. Several
key words
BLOCK
can be present in the same catalog, with the main root of
order, under key words factors or in other blocks. In the example above,
single-ended spanner words
RENUM
and
TAILLE_BLOC
are on the same level, lower than that of
METHOD
,
will b_mult_front
and
b_ldlt
, him even lower than that of the key word factor
SOLVEUR
. The conditions tested in the two blocks relate thus only to the key word
simple
METHOD
of level immediately higher than the blocks themselves,
·
it is however possible to be freed from this rule while informing for a single-ended spanner word with
the root of the control, the attribute position=' global'. It will be then visible in all them
conditions of blocks.
·
it is necessary to pay attention to the possible conflicts when the same key word is present under two
different blocks. The conditions of activation of the two blocks must then be excluded. It is it
case of the example above with single-ended spanner word RENUM: there cannot be conflict since
2 conditions METHODE=' MULT_FRONT' and METHODE=' LDLT' cannot be
at the same time satisfied.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
13/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
9
To typify the produced concept and to enrich it
9.1
To typify the produced concept
The reserved key word
sd_prod
allows to carry out the statement of the type of produced concept. If
order always produces the same structure of data some is the context,
sd_prod
is followed
name of corresponding concept, already declared in the catalog of statement of the concepts:
accas.capy
. All concepts being able to be produced by controls and/or to be used in
key words are declared in this file which is managed as a catalog of control.
Example:
In the catalog of the control:
CALC_THETA=OPER (nom= " CALC_THETA ", op=54,
sd_prod=theta_geom,…
In the file
accas.capy
, statement of the concept
theta_geom
, drifting of
result
:
class
result (ASSD): not
class
theta_geom (result): not
In certain cases the developer wants that the operator produces a concept whose type is given
dynamically (i.e with the execution) by the presence of a key word or by its type or by its
value. Then, one names the structure of data produced of a name particular to the control and one
add catalog of the control at the head a “function” python which defines the rules of typing
concept. The most current situations are as follows, but it is possible to write
more complex “functions” for, for example, to test a single-ended spanner word under a key word factor.
Heading of the catalog:
def operateur_prod (MCLE1, MCLE2, MCLE3, ** args):
yew MCLE1 == “VALEUR1”
: return
SD1
yew (MCLE2!= Nun)
: return SD2
yew (AsType (MCLE3) == SD3)
: return SD4
…….
raise AsException (“standard of concept result not envisaged”)
Body of the control:
NOM_COMMANDE=OPER (
nom= "
NOM_COMMANDE
“,
op=54,
sd_prod= operateur_prod,…
All the single-ended spanner words of the order intervening in the tests must have placed in
argument of
operateur_prod
. In the first case, one standard the structure of produced data (i.e one
assign a value to operateur_prod) according to the contents of the single-ended spanner word
MCLE1
. In the second
case, one standard according to the presence of
MCLE2
;
(
MCLE2!= Nun)
mean
MCLE2
is present. In
third case, one standard according to the type of the concept which is behind
MCLE3
. Names of structures of
finally produced data,
SD1
,
SD2
,
SD4
, are taken in the catalog of statement
accas.capy
.
operateur_prod
will have been an intermediate function whose value is given
according to the context.
Example:
def
mode_iter_inv_prod (MATR_A, MATR_C, TYPE_RESU, ** args):
yew
TYPE_RESU == “MODE_FLAMB”: return mode_flamb
yew AsType (
MATR_C) == matr_asse_depl_r: return mode_meca_c
yew AsType (
MATR_A) == matr_asse_depl_r: return mode_meca
yew AsType (
MATR_A) == matr_asse_pres_r: return mode_acou
yew AsType (
MATR_A) == matr_asse_gene_r: return mode_gene
raise AsException (“standard of concept result not envisaged”)
MODE_ITER_INV=OPER (nom= " MODE_ITER_INV ", op=44, sd_prod=
mode_iter_inv_prod
,….
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
14/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
In this case, if the key word
TYPE_RESU
as an argument the text has
“MODE_FLAMB”
then the concept
product,
mode_iter_inv_prod
, is of the type
mode_flamb,
if not one looks at the other yew which must
to be seen like elseif. If the type of the concept present behind the single-ended spanner word
MATR_C
is
matr_asse_depl_r
, then the produced concept,
mode_iter_inv_prod
, is of the type
mode_meca_c
.
and will caetera.
Caution:
Not to have nasty surprises nor to harm the legibility of the catalog, it is necessary to take care of it
that only one condition only is satisfied in the function with typing of the concept. In
the example above, rules of the body of the catalog of the control
MODE_ITER_INV
should not simultaneously authorize to have
TYPE_RESU == “MODE_FLAMB”
and
AsType (
MATR_A) == matr_asse_gene_r
If it is not the case, it is the first satisfied condition met which precedes. The command of
statement of the tests yew of the function of typing has an importance then: to handle with precaution.
9.2
To enrich the produced concept
The reserved key word
reentrant
allows to specify if the concept produced by an operator is created or
employed again then enriched. In this last case, to announce in the command file which one re-uses
a concept, the reserved key word
reuse
followed name of the concept will be present.
Three situations are possible:
reentrant=',
the produced concept does not preexist to the call of the control in
run, it is created. Example:
LIRE_MAILLAGE=OPER (sd_prod=maillage, reentrant=',
reentrant=' o',
the concept produces was necessarily generated by this operator or
another. It will be enriched. Example:
CALC_META=OPER (sd_prod=evol_ther, reentrant=' o',
In this case, the structure of data evol_ther must obligatorily
to be created as a preliminary by the operator of thermics to be enriched
here by the metallurgical ordering of postprocessing.
reentrant=' f',
The two situations are possible. It is the case of the controls
calculating evolutions (structures of data
evol_ ***
). One can
to want to connect the second transitory calculation behind a first and
to supplement the structure of data of the new moments of calculation
obtained. Example:
In the catalog:
STAT_NON_LINE=OPER (sd_prod=evol_noli, reentrant=' f',
In the command file:
U=STAT_NON_LINE (…)
U=STAT_NON_LINE (
reuse=U,…)
This possibility that one offers to the user must maturely be reflected and must remain an exception to
the general rule which wants that one does not modify a concept provided in input. Indeed, when one
concept is modified, the concepts which had been created by using it (before the change) risk
to lose the coherence which they had with him. That can thus lead to a base of data
incoherent.
Today the only amendments of concepts authorized are enrichments: one adds
information without modifying existing it, or complete destruction of the concept. Only exception to this
rule is factorization in place of
MATR_ASSE
(operator
FACT_LDLT
), this exception is
justified by problems of overall dimension of the data bases.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
15/16
Data-processing manual of Description
D5.01 booklet: - HT-66/05/003/A
10 Routine
of use
10.1 Name of the routine
OPxxxx
is the routine which carries out the associated control. Numbers of the routines
Opxxxx.f
are
allotted by the person in charge for documentation. xxxx is a number coded on four digits.
10.2 Two stages
The supervisor proceeds in 2 stages:
one 1
era
stage
:
construction of the shaft of the python objects
: command set,
key controls, words, syntactic checking python, checking of
coherence with the catalog,
one 2
ème
stage:
call to
OPxxxx
ask execution of calculations
The call to the operators, since the supervisor, is done automatically according to the attribute
op=xxxx well informed in the catalog, by:
CAL
OPxxxx
(IER)
10.3 Recovery of the arguments of the control
Real arguments (those which the user wrote behind the key words in his file of
controls) are recovered in the routine
OPxxxx
by requests made to the supervisor.
·
Requests of access to the values:
A whole of subroutines specific to each known type of the supervisor is
available:
GETVIS
recovery of whole values,
GETVR8
recovery of actual values,
GETVC8
recovery of complex values,
GETVLS
recovery of logical values,
GETVID
recovery of values identifiers (name of concepts),
GETVTX
recovery of values texts,
GETLTX
recovery lengths of the values texts,
GETTCO
recovery of the types of a concept.
·
Request of access to the result:
The subroutine
GETRES
allows to obtain the name user of the produced concept, the type of
concept associated with the result and the name of the operator or the control.
These routines are described in [D6.03.01] Communication with the supervisor of execution.
Code_Aster
®
Version
8.1
Titrate:
To introduce a new control
Date:
01/12/05
Author (S):
C. DURAND
Key
:
D5.01.01-C
Page
:
16/16
Manual of data-processing Description
D5.01 booklet: - HT-66/05/003/A
Intentionally white left page.