background image
Code_Aster
®
Version
4
Titrate
:
Impressions directed by the key word
INFORMATION
controls
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page:
1/4
Mechanical department and Digital Models
Index:
With
Dissemination:
Developers
EDF
Direction of the Studies and Search
Electricity of France
Project Codes of Mechanics
Copyright EDF/DER 1997
Data-processing manual of Description
D6.04 booklet:
D6.04.02 document
Impressions directed by the key word
INFORMATION
controls (package
INFXXX
)
Summary:
This document indicates how the developers must carry out the impressions directed by the word
key
INFORMATION
controls.
background image
Code_Aster
®
Version
4
Titrate:
Impressions directed by the key word
INFORMATION
controls
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page:
2/4
Data-processing manual of Description
D6.04 booklet:
Index A
1
Introduction
The information directed by the key word
INFORMATION
controls are messages of information (INFORMATION)
concerning the course of calculation. They contractual (for level 1) and are documented in
documentation of use.
Notice historical:
Until 1995, many controls comprised a key word “
IMPR
“of which the argument
could be worth: 0, 1, 2, 3,…. The effect of this key word was varied: writing of information, results,
data… on the file
“MESSAGE”
or
“RESULT”
. To clarify the situation, we have
decided to reabsorb these key word gradually
IMPR
by the key word
INFORMATION
(for INFORMATION) and
possible key word of impressions for the impression of the results.
The more detailed description of than is (or what is not) INFORMATION is made in [D2.07.01 §6],
in short:
·
INFORMATION is neither a result, nor an alarm…,
·
the key word
INFORMATION
can take 2 values: 1 or 2; the defect is 1,
·
the impressions are made by “
WRITE
“and not of
UTMESS <I>
[D6.04.01 §1.5],
·
INFORMATION are written on the file
“MESSAGE”
Impressions being made by
WRITE
formatted, the only problems to be regulated are:
·
on which logical unit?
·
how to respect the choice of the user:
INFORMATION = 1 or 2
?
This been the subject of paragraph 2.
Another problem occurs when a control does not want a message printed systematically
by a utility routine. This been the subject of paragraph 3.
2
How to transmit a message of information?
·
The routine
INFMAJ
is used to inform the “package”
INFXXX
level of impressions asked by
the user,
·
the routine
INFNIV
is used to recover the level of impression asked by the user like
the logical unit of the file
“MESSAGE”
.
·
the programmer of a control will thus make:
has
to put the key word
INFORMATION
in the catalog of the control,
(2 possible values 1 and 2, default value: 1),
B
in the routine
OP000I
CAL GETVIS ('', “INFORMATION”, 0, 1, 1, NIV, IBID)
CAL INFMAJ (NIV)
C
in a routine wanting to print INFORMATION:
-
CAL INFNIV (IFM, NIV)
,
-
for INFORMATION of level 1 (contractual):
IF (NIV.GE.1) WRITE
(
IFM
,…)
-
for INFORMATION of level 2:
IF
(
NIV.EQ.2
)
WRITE
(
IFM
,…).
Note:
One could think that the INFORMATION of level 1 can be written without protecting itself by
(IF
(NIV.GE.1)…)
because these impressions start by defect. One will see with [§3] why it
is necessary the progéger.
To protect itself from the controls which do not have the key word
INFORMATION
in their catalog, it
supervisor updates it
COMMON
before each control:
background image
Code_Aster
®
Version
4
Titrate:
Impressions directed by the key word
INFORMATION
controls
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page:
3/4
Data-processing manual of Description
D6.04 booklet:
Index A
CAL INFMAJ (1)
.
background image
Code_Aster
®
Version
4
Titrate:
Impressions directed by the key word
INFORMATION
controls
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page:
4/4
Data-processing manual of Description
D6.04 booklet:
Index A
3
To protect itself from an excess of messages
The person in charge for a control is responsible for the impressions of level 1 of this control. He must
to document and arrange themselves so that the file message remains readable.
A problem arises when a control called upon a utility printing of the INFORMATION of level 1 that
the person in charge for the control judges without interest (or too many… for example in a loop). It
is necessary to give to the control the means “of making conceal” the utility. For that, one has the 2 routines:
INFMUE ()
to return the code “
DUMB MAN
“until new command,
INFBAV ()
to give the code in mode “
CHATTERER
“.
These 2 routines are effective only if the level of impression required is 1: one cannot prevent it
code “speech” if
INFORMATION
= 2.
Example:
The control
OPOOOI
known as the routine B does not want to only hear
SUBROUTINE
OPOOOI
CAL
INFMAJ

CAL
With (...)

CAL
INFMUE ()
CAL
B (...)
CAL
INFBAV ()

END
Note:
·
This system is not perfect because it only makes it possible to stop without understanding it
flood of the impressions. It does not allow for example, to prohibit B from speaking all in
leaving C (called by B) speech!
·
so that
INFMUE
/
INFBAV
that is to say effective, it is necessary that the routines that one wants to make conceal
their impressions of level 1 programmed in the following way:
IF
(
NIV.GE.1
)
WRITE
….
background image
Code_Aster
®
Version
4
Titrate:
Impressions directed by the key word
INFORMATION
controls
Date:
02/05/1997
Authors:
J. PELLET
Key:
D6.04.02
Page:
5/4
Data-processing manual of Description
D6.04 booklet:
Index A
4
Operation of the utilities
INFXXX
The purpose of this paragraph is only to help to include/understand (if necessary) the use of these routines:
·
COMMON/INF001/NIVUTI, NIVPGM, UNIT
INTEGER
NIVUTI
:
level requested by the user: 1 or 2
INTEGER
NIVPGM
:
level accessible to the programmer: 0, 1, or 2
INTEGER
UNIT
:
logical unit of the file
“MESSAGE”
·
COMMON INF001
is used only by the routines
INFXXX
·
SUBROUTINE INFMAJ ()
COMMON/INF001/…
GETVIS (nomCMD, “I”, “INFORMATION”,…, NIV)
NIVUTI = NIV
NIVPGM = NIV
UNIT = IUNIFI (“MESSAGE”)
END
·
SUBROUTINE INFNIV (IFM, NIV)
COMMON/INF001/…
INF = UNIT
NIV = NIVPGM
END
·
SUBROUTINE INFMUE ()
COMMON/INF001/…
IF (NIVUTI.EQ.1) NIVPGM = 0
END
·
SUBROUTINE INFBAV ()
COMMON/INF001/…
NIVPGM = NIVUTI
END