Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 1/16

Organization (S): EDF-R & D/AMA
Handbook of Descriptif Informatique
D5.01 booklet: -
D5.01.01 document

To introduce a new command

Summary:

This document describes the method to introduce a new command (operator or procedure) into
Code_Aster. It describes the drafting with the format “python” of the catalog of the command and the routine
FORTRAN associated.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 2/16

Count

matters

1 Introduction ........................................................................................................................................... 3
2 Vision user of a command ....................................................................................................... 3
3 Drafting of the catalog of command ................................................................................................ 4
4 To define the link between the catalog and associated FORTRAN program ................................................ 7
5 To define the attributes of the single-ended spanner words ............................................................................................ 7
6 Cases of the key words factors ................................................................................................................. 10
7 To exclude or gather key words: key word rules ...................................................................... 11
The 8 blocks ............................................................................................................................................. 12
9 To typify the produced concept and to enrich it ................................................................................................... 13
9.1 To typify the concept produced ............................................................................................................... 13
9.2 To enrich the concept produced ............................................................................................................ 14
10
Routine of use ....................................................................................................................... 15
10.1
Name of the routine ................................................................................................................ 15
10.2
The two stages .................................................................................................................. 15
10.3
Recovery of the arguments of the command .................................................................. 15
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 3/16

1 Introduction

To introduce a new command into Code_Aster, it is necessary:

·
to write the catalog associated with this command [§3],
·
to write associated routine FORTRAN OPxxxx [§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 command

Let us take as example the command AFFE_MATERIAU which makes it possible to affect on a grid of
material characteristics. Here a possible use of this command in the file of
commands provided by the user of Code_Aster:





cham = AFFE_MATERIAU (MAILLAGE=mail,
AFFE=_F (
TOUT
=
“OUI”,
MATER
=
steel












))

During the use of a command, it appears:

·
the name “user” of the concept produced by the command: cham
·
the name of the command: AFFE_MATERIAU
·
key words factors: AFFE
·
single-ended spanner words: ALL, MATER, GRID
·
names “users” of concepts arguments: steel, mall
·
values of the simple type (whole, real, text,…) only or in list: “OUI”

From the user point of view, by writing a name on the left sign “=” of the command, one affects it
name with the result of the command.

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 command [§3] in coherence with the catalog accas.capy, stored with same
place that catalogs of commands, 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 command and with this name is associated it
concept of the cham_mater type (see new page).
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 4/16

3
Drafting of the catalog of command

To introduce a new command, it is necessary to create an associated catalog in which
will be indicated:

·
the name of the command,
·
its description in a few words,
·
the category of classification by families of the commands for display in EFICAS,
·
the nature of the command: operator (production of concept), procedure (not of concept
product), macro-command,
·
number xxxx of routine FORTRAN associated with this command [§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-command
[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 command AFFE_MATERIAU, the catalog - i.e. the description of
the command provided by its developer - associated is:

AFFE_MATERIAU=OPER (nom= " AFFE_MATERIAU ", op=6, sd_prod=cham_mater,
fr= " Affectation of material characteristics to a grid ",
reentrant=', UIinfo= {“groups”:(“Modeling”,)},

MAILLAGE =SIMP (statut=' o', typ=maillage),
MODELE =SIMP (statut=' f', typ=modele),

AFFE =FACT (statut=' o', min=1, max=' ** ',
regles= (UN_PARMI (“TOUT”, “GROUP_MA”, “MAILLE”, “GROUP_NO”, “NOEUD”),),
TOUT =SIMP (statut=' f', typ=' TXM', into= (“OUI”,)),
GROUP_MA =SIMP (statut=' f', typ=grma, max=' ** '),
MAILLE =SIMP (statut=' f', typ=ma, max=' ** '),
GROUP_NO =SIMP (statut=' f', typ=grno, max=' ** '),
NOEUD =SIMP (statut=' f', typ=no, max=' ** '),
MATER =SIMP (statut=' o', typ=mater),
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 5/16

TEMP_REF =SIMP (statut=' f', typ=' R', defaut= 0.E+0),
),
);

Some remarks on this catalog of command:

·
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 command,
·
the type of the produced concept is specified behind the key word reserved sd_prod,

In the description of the command, 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 command (production of one, zero even
several concepts in the case of macros)
name
To indicate the name seen by the user to indicate the command
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 command, it is it
contents of the bubble of assistance displayed by EFICAS
UIinfo
Useful only for the displays in EFICAS, to specify the family of
classification of the command: Postprocessings, Modeling…
reentrant
To specify if the command 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 command
FACT
To specify a key word ratio control.
BLOC
To define a block of key words of which the appearance is subjected to one
“condition”.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 6/16

One can break up the writing of the catalog of command according to following stages'
[D1.02.01 §1.2]:

·
To specify the type of the concept produced (when there exists, i.e. for a command 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 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 command 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 command:

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 Chef de Projet [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 grid or the model,
DEFI:
definitions of objects which are not fields,
CALC:
commands calling routine CALCUL and producing fields of
sizes.

The name of a command 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 command: [§4]

·
To describe the various key words: [§5], [§6], [§7]. It is the core of the catalog.

·
To close the open bracket after key word OPER/PROC/MACRO.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 7/16

4
To define the link between the catalog and FORTRAN program
associated

The reserved key word of the reader of catalog COp allows the call to the routine FORTRAN OPxxxx which
carry out the task of the command [§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 routine OP0006 will be called during the execution of the command
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, alone statute and typ are obligatory for any key word
simple:

·
The statute:

The definition of the statute by the word reserved 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 declaration of the type by the word reserved typ is obligatory.
The recognized types are:

typ = “I”
for the entireties
typ = “R”
for realities
typ = “It
for the complexes
typ = Type_de_concept for the concepts
(without dimensions!)
typ = “TX”
for the texts
typ = “It
for logics
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 8/16

Notice on the concepts:

The type of awaited concept is a type of concept created by another command that
pending order. It appears among the list of the concepts defined in the catalog of
declaration 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 declaration is done by the reserved word of the reader of catalog: defect

Examples:

PRECISION
=SIMP (
statut=' f', typ=' R',
defaut=1.E-3),

FICHIER =SIMP (
statut=' f', typ=' TXM',
defaut= " RESULTAT "),

·
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 declaration is done by the reserved word
into

Examples:




INFO

=SIMP (statut=' f', typ=' I', defaut= 1, into= (1,2)),

Key word INFO is optional, its default value is 1 and the only accepted values are
1 and 2. Documentary syntax is:




INFO:
/
1
[DEFAUT]






/2

TOUT =SIMP (
statut=' f',
typ=' TXM',
into= (“OUI”, “NON”)),

·
A number of awaited values:

The reserved words min and max make it possible 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 does 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 = “**”.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 9/16

Examples:

MAILLE
=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 complicated 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

Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 10/16

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 declarations are done thanks to the key word reserved 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 data entry
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 make it possible 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.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 11/16

7
To exclude or gather key words: key word rules

The use in the catalogs of commands of the key word reserved rules describes 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 follow make it possible to ensure a coherence
on the simultaneous presence of the key words of the command. Behind these reserved words (EXCLUS,
UN_PARMI, TOGETHER,…), a list of key words is found (command). 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”.

EXCLUS 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.

ENSEMBLE 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 ENSEMBLE since for PRESENT_PRESENT mc2 can
to be present, without mc1 being it.
PRESENT_ABSENT is different from EXCLUS since for PRESENT_ABSENT mc2,…, mcn
can be present sets if mc1 misses.

Example:


rules = (
UN_PARMI (“NODE”, “GROUP_NO”, “MESH”),





PRESENT_PRESENT (“MESH”, “NOT”),),

NOEUD
=SIMP (…),

MAILLE
=SIMP (…),

POINT
=SIMP (…),

GROUP_NO =SIMP (…),

The supervisor checks that the user gave one and only one of the key words well among NOEUD,
GROUP_NO and MAILLE and, if it gave MAILLE, that POINT is also present.

Caution:

The key words handled in the key word rules must be on the same level of parenthesizing
that this one 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 principal root of
order or under key words factors, the logical conditions applying whereas to
single-ended spanner words of the key words factor.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 12/16

8 Them
blocks

The blocks are appeared as key words factors. They allow two things:

·
to translate in the catalog of the command 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”)
),


=BLOC (condition = “METHODE == “MULT_FRONT will b_mult_front””,





fr= " Paramčtres of the frontal method multi ",

RENUM=SIMP (
statut=' f', typ=' TXM', defaut= " MDA ",
into= (“MANDELEVIUM”, “MDA”, “METIS”)
),





),

b_ldlt

=BLOC (condition = “METHODE == “LDLT””,

fr= " Paramčtres
of

method
LDLT ",

RENUM=SIMP (
statut=' f', typ=' TXM', defaut= " RCMK ",
into= (“RCMK”, “SANS”)
),

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 METHODE is worth MULT_FRONT, then single-ended spanner word optional RENUM will appear with three values
possible declared under into. So on the other hand METHODE 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 TAILLE. These key words and their respective attributes will not appear of course in EFICAS
that after the user will have affected a value with single-ended spanner word METHODE.


b_nomdubloc=BLOC (condition= " (MOTCLE1!= Nun) gold (Astype (MOTCLE2) ==grma) “,

One shows on this example that the condition can be multiple (articulated by gold/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:

·
the key words handled under the condition of the BLOC 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 BLOC can be present in the same catalog, with the principal 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
METHODE, 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 METHODE 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 command, 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.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 13/16

9
To typify the produced concept and to enrich it

9.1
To typify the produced concept

The key word reserved sd_prod makes it possible to carry out the declaration 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 declaration of the concepts:
accas.capy. All concepts being able to be produced by commands and/or to be used in
key words are declared in this file which is managed as a catalog of command.

Example:

In the catalog of the command:

CALC_THETA=OPER (nom= " CALC_THETA ", op=54, sd_prod=theta_geom,…

In the file accas.capy, declaration 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 command and one
add catalog of the command 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 command:

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 single-ended spanner word MCLE1. In the second
case, one standard according to the presence of MCLE2;(MCLE2!= None) means 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 declaration
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,….
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 14/16

In this case, if key word TYPE_RESU has as an argument text “MODE_FLAMB then” the concept
product, mode_iter_inv_prod, are of the mode_flamb type, if not one looks at the other yew which must
to be seen like elseif. If the type of the concept present behind single-ended spanner word MATR_C is
matr_asse_depl_r, then the produced concept, mode_iter_inv_prod, is of the mode_meca_c type.
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 command 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
declaration 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 makes it possible 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 key word reserved reuse follow-up of the name of the concept will be present.

Three situations are possible:

reentrant=',
the produced concept does not preexist to the call of the command 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 commands
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 modifications 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 the MATR_ASSE (operator FACT_LDLT), this exception is
justified by problems of obstruction of the data bases.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 15/16

10 Routine
of use

10.1 Name of the routine

OPxxxx is the routine which carries out the associated command. The numbers of the Opxxxx.f routines 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:

a 1čre
stage
:
construction of the tree of the python objects
: command set,
key commands, words, syntactic checking python, checking of
coherence with the catalog,
one 2nd stage:
call to OPxxxx requires 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:

CALL
OPxxxx
(IER)

10.3 Recovery of the arguments of the command

Real arguments (those which the user wrote behind the key words in his file of
commands) are recovered in the OPxxxx routine 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:

Subroutine GETRES makes it possible to obtain the name user of the produced concept, the standard of
concept associated with the result and the name of the operator or the command.

These routines are described in [D6.03.01] Communication with the supervisor of execution.
Handbook of data-processing Descriptif
D5.01 booklet: - HT-66/05/003/A

Code_Aster ®
Version
8.1
Titrate:
To introduce a new command


Date:
01/12/05
Author (S):
C. Key DURAND
:
D5.01.01-C Page
: 16/16

Intentionally white left page.
Data-processing handbook of Descriptif
D5.01 booklet: - HT-66/05/003/A

Outline document