3. Create a CARTE by « zones »#
3.1. Principle of creation by zones#
A map is an ordered list of pairs (magnitude, affected_zone). For example, when a user writes to his command file:
AFFE_CHAR_MECA (...
PRES_REP :( TOUT: 'OUI' PRES: 0.)
PRES_REP :( GROUP_MA: (GM1, GM3) PRES: 2.)
PRES_REP :( MAILLE: (M7, M8) PRES: 7.)
PRES_REP :( MAILLE: (M9) PRES: 9.)
The map for the size “PRES_R” contains 5 affected_areas and the quantities attached to them.
It will be said that the map was created « by zone. » In « basically » the program does:
3.2. Allocate a CARTE: routine ALCART#
CALL ALCART (base, card, mesh, name)
BASE |
K1 |
IN |
name of the creation base for the map (“G”, “V”) |
CARTE |
K19 |
|
name of the map to be created. |
MAILLA |
K8 |
|
name of the mesh on which the map is based. |
NOMGD |
K8 |
IN |
name of the quantity associated with the map. |
For the example in § 3.1 we will do:
CALL ALCART ('G', 'my_card', 'mailla_1', 'depl_r')
3.3. Writing in a CARTE: NOCART routine#
CALL NOCART (map, code, group, group, mode, mode, nma, limano, limanu, nomlig, ncmp)
Information not transmitted by arguments.
The description of the quantity that we want to note in the map is done through 2 work objects that are allocated by ALCART:
CARTE (1:19) //'. NCMP 'V (K8)
CARTE (1:19) //'. VALV 'V (?) (? = I, R, C, K8,..)
in CARTE (1:19) //”. NCMP “, the programmer writes the names of the components of the quantity he wants to write down.
in CARTE (1:19) //”. VALV “, the programmer writes the component values (in the same order as. NCMP).
3.4. Treatment of the example#
Treatment of the example of § 3.1
CALL ALCART ('G', CARTE, mail, 'PRES_R')
CALL JEVEUO (CARTE (1:19)//'. NCMP ',' E ', IANCMP)
ZK8 (IANCMP) =' PRES '
CALL JEVEUO (CARTE (1:19)//'. VALV ',' E ', IAVALV)
ZR (IAVALV) =0.
CALL NOCART (CARTE, 1, '', ',' ', 0,' ', IBID,' ', 1)
ZR (IAVALV) =2.
CALL NOCART (CARTE, 2, 'GM1', ',', 0, ', 0,', IBID, ',', 1)
ZR (IAVALV) =2.
CALL NOCART (CARTE, 2, 'GM3', ',', 0, ', 0,', IBID, ',', 1)
ZR (IAVALV) =7.
LIMANO (1) ='M7'
LIMANO (2) ='M8'
CALL NOCART (CARTE, 3, '', ',' NOM ', 2, LIMANO, IBID,', ', 1)
ZR (IAVALV) =9.
LIMANO (1) ='M9'
CALL NOCART (CARTE, 3, '', ',' NOM ', 1, LIMANO, IBID,', ', 1)
3.5. Overload principle#
The principle of overload is applied for a CARTE: in the list of affected areas, an element in the list overrides the elements that precede it in the list. This means that if a mesh belongs to several different affected_zone, the quantity associated with it is that associated with the last affected_zone that contains this mesh.
If in the previous example, the M8 mesh belongs to 2 GROUP_MA GM1 and GM3, the pressure associated with it is 7.
Important note:
The overload is global for all CMPS of the size.
If we do for example (card of “DEPL_R”) :
GM1 → DX: 1. OF: 2.
GM3 → DX: 3. DZ: 4.
The meshes of GM3 are affected by the size: (DX: 3. DZ: 4.)
The meshes of GM1 (except those of GM3 ) are affected by the size: (DX: 1. OF: 2.) We may want the principle of overload to be « finer » and for the cells of the intersection of GM1 and GM3 « to benefit » from the 2 assignments and for their associated quantity to be: DX: 3. OF: 2. DZ: 4. This is possible thanks to routine TECART
3.6. « Fine » overload: routine TECART#
CALL TECART (map)
This routine should be called after the last call to NOCART.
This operation changes the content of the card to take into account the « fine » overload rule
defined in the preceding paragraph.
Practically, we « extend » the map over all the cells, we determine on each of them the quantity associated with it by a « fine » overload of the type:
M1: DX=1. DY = 2.0? Order of calls
+ M1: DX=3.0 DZ=4.0? To NOCART
-------------------------------
M1: DX=3.0 DY=2.0 DZ=4.0
In a second step, the map is recompact, by grouping together the cells that are affected by the same size.