4. Sub-programs provided and use#

4.1. Foreplay#

In this chapter, we refer to:

os_name a simple object name

co_name a collection name

oc_name a collection object name

num_oc a collector's item number

When describing routine arguments, specify the type of each argument and whether it should be supplied as input (in) or retrieved as output (out). Changed arguments are marked with (var).

4.2. Access functions for collectibles#

Access to JEVEUX objects and collectibles is by name. In the case of a named collection, it is necessary to pass, as an argument, one of the two groups of information:

  • the name of the collection and the name of the collection object,

  • the collection name and the order number of the collection object in the directory.

To limit the number of user routines and to standardize call arguments, Fortran CHARACTER *32 functions have been introduced. These return a character string composed of the collection name and a suffix that can be interpreted by the software package. They affect a common that ensures the transfer to the called routine of the name of the collection object, of the order number in the directory. In order to properly synchronize the call with the collection name and the common assignment, it is mandatory to call these functions in the arguments of the routines concerned.

Note:

These functions should only be used when calling a query routine on an object.

Functions of type CHARACTER *32 (to be declared in any call subroutine):

The following three functions should only be called as arguments to routines that act on collection objects:

CHARACTER *32 FUNCTION JEXNOM (name, oc_name)

in

name

K2

directory or collection name

in

oc_name

K*

collection object name.

CHARACTER *32 FUNCTION JEXNUM (name, num_oc)

in

name

K24

directory or collection name

in

num_ocv

I

collection object number.

Example of use:

CALL JEVEUO (JEXNUM (NOMCO, NUMO), “L”, vx= TABL)

In the case of a contiguous collection, a Fortran CHARACTER *32 function is used to access the cumulative length vector.

This integer vector contains \(n+1\) values for a collection of \(n\) objects: the \({V}_{i}\) component of this vector provides the relative address of the object \(i\) in the value segment of the collection; the length of this object is obtained by the difference \({V}_{i+1}–{V}_{i}\).

CHARACTER *32 FUNCTION JEXATR (co_name, arg)

in

co_name

K24

collection name

in

arg

K8

“LONCUM” “LONUTI”, “LONMAX”

In the same way, the argument LONUTI, respectively LONMAX, allows access to the vector of the lengths used, respectively maximum, by a simple request of the type:

CALL JEVEUO (JEXATR (co_name, “LONUTI”), “L”, vi= LUTI).

Notation: from now on, we will designate an object name JEVEUX, or a call to one of these functions within the arguments of a routine by name_o.

4.3. The creation of descriptors#

The descriptor for a simple object or a collection is usually created by several calls. The first call allows you to create the descriptor by defining the name of the object JEVEUX, and by indicating the values of the mandatory attributes (which cannot be modified later):

  • the class of attachment,

  • gender,

  • the type.

In the case of a collection, we must also define:

  • access,

  • storage,

  • the way in which the length is defined,

  • the maximum number of objects.

4.3.1. Creating the simple object descriptor#

SUBROUTINE JECREO (os_name, lis_at)

in

os_name

K24

simple object name.

in

lis_at

K*

text defining CLAS GENR TYPEet if required LTYP, when provided, the length of the type should be pasted to the type.

For example: “G V K16”. The first character must be non-white, at least one blank space separates each attribute value; uppercase letters are required.

4.3.2. Creating the collection descriptor#

SUBROUTINE JECREC (nom_co, lis_at, access, stock, modlon, maxoc)

in

co_name

K24

collection name

in

lis_at

K*

text defining CLAS GENR TYPEet if required LTYP, when provided, the length of the type should be pasted to the type.

in

access

K*

“NO”: named collection with internal directory (names of 8 characters maximum), collection objects created by name and then accessible by name or number. “NU”: collection numbered sequentially, collectibles are only accessible by number.

in

stock

K*

collection storage mode: “CONTIG” contiguous collectibles in the value segment, “DISPERSE” collectibles that are independent of each other.

in

modlon

K*

mode for defining the length of collection objects “CONSTANT”: all objects in the collection are of the same length; “VARIABLE”: each object in the collection can have a different length.

in

nmaxoc

I

maximum number of objects in the collection.

Notes:

It is no longer allowed to create collections based on a directory of names created elsewhere and that can be shared.

It is no longer allowed to create collections based on a length vector created elsewhere and that can be shared.


4.3.3. Assigning an attribute (after creating the descriptor)#

It is often necessary to complete the assignment of the descriptor attributes (definition of the length of a vector, the total length of a collection,…).

SUBROUTINE JEECRA (o_name, at_name, ival=ival, cval=cval)

in

nom_o

K24

object name JEVEUX

in

name_at

K*

attribute name (see appendix 2: list of attributes).

in

ival

I

integer value for an integer attribute.

in

cval

K*

text for an attribute of type CHARACTER.

Note:

Both arguments ival*and* cval*are optional,* cval*must be different from the empty string. Both arguments can be provided when calling the routine with or without the respective identifiers « ival= » and « cval= » .*

CALL JEECRA (name_o, 'DOCU', cval=' JPJP ')

CALL JEECRA (name_o, 'LONMAX', ival=500)

4.4. Inserting a name into a directory or creating a collection object#

It is the same routine that is used to create a name for a collection object and to insert a name into a simple directory object.

SUBROUTINE JECROC (JEXNOM (name_o, name))

in

nom_o

K24

simple directory object name, or name of the collection named

in

name

K*

name of object to be inserted into the directory, or collector’s item name

SUBROUTINE JECROC (JEXNUM (co_name, oc_number))

in

co_name

K24

collection name

in

num_oc

I

collector’s item number

Note:

For a numbered collection, this call updates the attribute NUTIOC .

4.5. The allocation request#

It is through the JEVEUO routine that the user retrieves a pointer to the value segment. Alternatively, the routine JEVEUO also makes it possible to retrieve an address relative to a variable Z * measured in the length of the type of the object JEVEUX.

This then allows it to use the associated value segment. During this call, if the value segment is not present in memory, the software package performs dynamic allocation. If object JEVEUX does not have an image on disk, the value segment is initialized according to the type of the object (zero or white). Otherwise, the previous values are retrieved from disk. The access condition (“E” or “L”) to the value segment is called usage. The value segment remains allocated with the assigned use until the user makes a new request and until the call to JEDEMA at the correct level has been made. A write request on an object that is allocated for reading will change its use. A read request on an object that is writable will not affect usage.

SUBROUTINE JEVEUO (nom_o, cel, jtab, jtab, vi, vr,..., vk80)

in

nom_o

K24

access to the value segment defined by: os_name: simple object, nom_co: contiguous collection, JEXNOM (co_name, oc_name): named collection object, JEXNUM (nom_co, num_oc): numbered collector’s item, JEXATR (co_name, “LONCUM”) vector of the cumulative lengths of a contiguous collection.

in

cel

K*1

access condition or use of the value segment, “E” read/write (allows you to modify the value segment), “Read it (no change in the value segment).

out

jtab

I

address of the first value of the object in the Fortran array associated with the Z* variable corresponding to the type of the object

out

vi

I

Array of integers

out

vr

R

Real array

out

vk80

K80

Character chart*80

The output arguments are all optional arguments and are mutually exclusive.

It is recommended to use the arguments preferentially: vl, vi, vi4, vr, vc, vk8, vk16, vk32 and vk80. Each argument is adapted to the type of the object: LOGICAL, INTEGER,…

The jtab argument returns an « address » in an array set in COMMON: ZI, ZR,… Its use makes programming in general less readable.

Note:

The request JEVEUO is not allowed on directory objects.

4.5.1. Using the arguments vi, vr,…, vk80#

Example:

character (len=24):: obj_coor

real (kind=8), pointer:: coordinate (:) => null ()

call jeveuo (obj_coor, “L”, vr=coordindo)

! kth value of the coordinate vector:

x=coordinate (k)

4.5.2. Using the jtab argument#

Example:

character (len=24):: obj_coor

integer:: jcoor

call jeveo (obj_color, “L”, jcoor)

! kth value of the coordinate vector:

x=zr (jcore-1+k)

COMMON reference

The allocation request JEVEUO with the jtab output argument returns the « address » of the object in an array set to COMMON: ZI, ZR,…

The correspondence between the Fortran type of the object and the reference COMMON that corresponds to it is given by the following table:

type fortran

COMMON

variable name

I

IVARJE

ZI

S

I4 VAJE

ZI4

R

RVARJE

ZR

C

CVARJE

ZC

L

LVARJE

ZL

K8

KVARJE

ZK8

K16

KVARJE

ZK16

K24

KVARJE

ZK24

K32

KVARJE

ZK32

K80

KVARJE

ZK80

The following block of declarations must therefore be inserted into any routine that wants to read or write to an object I want:

C --------- DEBUT DECLARATIONS NORMALISEES JEVEUX --------

INTEGER ZI

COMMON/IVARJE/ZI (1)

INTEGER *4 ZI4

COMMON/I4 VAJE/ZI4 (1)

REAL *8 ZR

COMMON/RVARJE/ZR (1)

COMPLEX *16 ZC

COMMON/CVARJE/ZC (1)

LOGICAL ZL

COMMON/LVARJE/ZL (1)

CHARACTER *8 ZK8

CHARACTER *16 ZK16

CHARACTER *24 ZK24

CHARACTER *32 ZK32

CHARACTER *80 ZK80

COMMON/KVARJE/ZK8 (1), ZK16 (1), (1), ZK24 (1), ZK32 (1), ZK80 (1)

C --------- FIN DECLARATIONS NORMALISEES JEVEUX --------

4.6. The request for permanent allowance during an order#

JEVEUT allows you to allocate JEVEUX objects by assigning them a brand different from the current mark of -1. Objects will not be affected by calls to JEDEMA but should be explicitly released by calling JELIBZ.

The call syntax is the same as in JEVEUO.

4.7. The request for permanent allowance during execution#

This request is exclusively reserved for the Supervisor. JEVEUS allows you to allocate JEVEUX objects by assigning them a mark different from the current mark of -3. They will not be released until the end of the execution.

The call syntax is the same as in JEVEUO.

4.8. Overlay for creating and allocating a vector genre object#

WKVECT is an JEVEUX overlay allowing a vector to be allocated (creation and presence in memory), it allows the « economy » of calling three sub-programs JEVEUX.

SUBROUTINE WKVECT (os_name, lis_at, long, jtab, vi, vr,..., vk80)

in

os_name

K24

simple object name

in

lis_at

K*

text defining CLAS GENR TYPE LTYP, GENRvaut here obligatorily V.

in

long

I

integer value associated with attribute LONMAX, vector length.

out

jtab

I

address of the first value of the object in the Fortran array associated with the Z* variable corresponding to the type of the vector.

out

vi

I

Array of integers

out

vr

R

Real array

out

vk80

K80

Character chart*80

By default, the object is allocated as the first writer (cel=”E”).

Notes:

Output arguments: jtab, vi, vr,…, vk80 are mutually exclusive.

No object with a name name_os must not exist in the databases (under penalty of stopping the program) .

Example of use:

Allocation based on VOLATILE (V) of a working vector (V) of REAL *8 (R) of length 100; the name of the array is & OP000. TAMPON.

real (kind=8), pointer:: VTRAV => null ()

CALL WKVECT ('& OP000. TAMPON ', 'V V R', 100, vr= VTRAV)


When it is not necessary to have named access, to allocate a work vector used within a routine, it is possible to use the macros as_allocate and as_deallocate.

4.9. Alternative to allocating work objects#

Although it is possible to allocate work objects using JEVEUX within a routine, this use is not always relevant. If the allocated areas are only used temporarily, or if they are of a size that does not require unloading to disk, it is more advantageous to use the as_allocate and as_deallocate functions. These encompass standard functions and allow you to call the mechanisms for unloading JEVEUX objects in order to free up memory. They communicate at any time the volume of memory allocated or freed, all dynamic allocations in Fortran must pass through this mechanism. These utilities (macro command) allow you to allocate and deallocate a vector of the various types managed by JEVEUX. Both of these macros use optional arguments.

AS_ALLOCATE (size=size, vl=vl, vi=vi, vi=vi, vi4=vi4, vi4=vi4, vr=vr, vc=vc, vk8=vk8, vk16=v16, vk16=v16, vk24=vk24, vk24=vk24, vk32=vk24, vk32=vk24, vk32=vk32, vk80=vk80)

in

size

I

length of the vector to be allocated

in/out

vx

L, I, I4, C, Kx

vector in the desired type

This macro allows you to allocate a vector, which must be declared under the model below. The various arguments are all optional, it is of course necessary to provide the length of the vector.

integer, pointer:: tab_para (:) => null ()

AS_ALLOCATE (vi=tab_para, size=1958)

AS_DEALLOCATE (vl=vl, vi=vi, vi4=vi4, vr=vi4, vr=vr, vc=vc, vk8=vk8, vk16=v16, vk24=vk24, vk24=vk24, vk32=vk32, vk80=vk80)

in

vx

L, I, I4, C, Kx

vector in the desired type

This macro allows you to release the vector whose name is passed as an argument and to restore the memory by informing the manager JEVEUX.

4.10. Overlay to enlarge a vector object#

SUBROUTINE JUVECA (os_name, long)

in

os_name

K24

simple object name

in

long

I

new value associated with attribute LONMAX, vector length.

This routine allows you to change the size of a simple vector object. The new vector is assigned to the same class as the old one.

Notes:

The object must be in memory (call to JEVEUO beforehand),

The attribute LONUTI is assigned to the same value as LONMAX ,

The values are copied,

4.11. Recopies of objects JEVEUX#

4.11.1. Copy of an object JEVEUX (simple object, collection or collector object):#

SUBROUTINE JEDUPO (name_in, name_clo, name_or, dup_co)

in

name_in

K24

object name JEVEUXà copy

in

clo_name

K1

name of the class of the receptacle object (378 “”)

in

name_or

K24

in

dup_co

L

used only for collections if the classes are different, If =. TRUE.: we copy the pointers external to a collection, If =. FALSE.: we keep the external pointers

Note:

The receptacle object is destroyed if it previously existed.

4.11.2. Copying a set of objects JEVEUX:#

Instead of working on a single object, it is possible to provide some routines with a character string that can be used to select JEVEUX objects whose names contain this string.

SUBROUTINE JEDUPC (cli name, souchi, ipos, clo name, soucho, dup_co)

in

cli name

K1

name of the class of the objects to be copied

in

souchi

K*

character string to be identified in object names

in

ipos

I

position in the names of the channel to be identified

in

clo_name

K1

name of the receptacle object class

in

soucho

K*

string to be replaced in original names to get the name of the object JEVEUXréceptacle

in

dup_co

L

used only for collections if the classes are different, If =. TRUE.: we copy the pointers external to a collection, If =. FALSE.: we keep the external pointers

4.12. Requests for release#

These requests lead to a write to disk (delayed or not) depending on the access condition chosen during the allocation request and the release rules [§2.3]:

We call release the stopping of the current request on an object JEVEUX:

  • end of a write, with delayed writing to disk,

  • end of reading, which does not involve writing to disk.

The releases are made during the call to JEDEMA. Calls to routine JELIBE are generally prohibited.

Note:

Read access makes it possible to avoid writing to disk at the end of use (saving time) .

Access management:

The access permissions assigned during the first call to JEVEUO for reading or writing are managed using the following routine:

SUBROUTINE JEMARQ ()

JEMARQ increments the current brand value. Calling it is mandatory in any program unit that loads JEVEUX objects into memory.

Implicit release of all objects loaded into a programming unit

SUBROUTINE JEDEMA ()

JEDEMA frees all affected items from the current brand and decrements the current brand value. Calling it is mandatory in any program unit that loads JEVEUX objects into memory.

Release a JEVEUX object or a scattered collector’s item:

SUBROUTINE JELIBE (name_o)

in

nom_o

K24

object name JEVEUX (simple object, collection, or scattered collector object)

His appeal is tolerated under certain conditions.

Releasing item set JEVEUX:

SUBROUTINE JELIBZ ()

The call to this routine causes the release of all JEVEUX objects that were loaded into memory by a call to JEVEUT (they are marked -1).

4.13. The requests for existence#

Existence queries allow you to check the existence of the descriptor of a JEVEUX object or a collection object, but also the presence of a name in a directory. They also make it possible to retrieve the order number of a name in a name directory.

Existence of a JEVEUX object or a collector’s item:

SUBROUTINE JEEXIN (name_o, iret)

in

nom_o

K24

object name JEVEUX

out

iret

I

routine return code

\(\mathit{iret}\mathrm{=}0\) object descriptor doesn’t exist

\(\mathit{iret}\mathrm{\ne }0\) the descriptor exists »

4.14. The transition from serial number to name and vice versa#

Obtaining the order number from the name:

SUBROUTINE JENONU (JEXNOM (name_o, name), num)

in

nom_o

K24

name of a collection or simple directory object

in

name

K*

collector’s item name or name

out

num

I

num= number of the object corresponding to the name name

Notes:

If the name you are looking for is not in the directory, the number returned is 0.

This call is not necessary in the case of a numbered collection.

Obtaining the name from the order number:

SUBROUTINE JENUNO (JEXNUM (name_o, num), name)

in

nom_o

K24

name of a collection or simple directory object

in

num

I

insertion order number

out

name

K

name

name = name of the object corresponding to number num

Notes:

If the number you are looking for is not in the directory, the name returned is blank.

This call is not possible in the case of a numbered collection.

If the number searched is greater than the number of numbered objects stored, the routine stops in error.

4.15. Destroying descriptors#

It is possible to destroy the descriptor of a JEVEUX object and by extension the name and attributes of a collection object. This destruction is accompanied by the destruction of the associated value segment (s) present in memory and makes those present on disk inaccessible.

SUBROUTINE JEDETR (name_o)

in

nom_o

K24

object name JEVEUX (simple object, collection, or named collection object)

The space freed up in the catalog or name directory becomes immediately reusable for another descriptor. The space, possibly used on disk, can only be recovered by an operation to « repack » the file.

Notes:

It is not possible to destroy a numbered collector’s item,

for a named collection, destroying an object updates the attribute NUTIOC .

In the case of a simple object such as a name directory, it is not possible to destroy a

point entry in the directory, calling this function completely destroys the object JEVEUX .

You can also use the following routine to destroy a set of descriptors.

SUBROUTINE JEDETC (cl_name, strain, ipos)

We search for all the descriptors whose name contains the sub-string such at the position ipos in the classes defined by the name_cl parameter and we destroy the descriptors thus identified.

It is preferable to use routine JEDETR when you explicitly know the names of the objects to be destroyed; calling it in a loop or in a low-level routine can be very expensive.

4.16. Retrieving the size of the available memory areas#

SUBROUTINE JEDISP (bpm, place)

in

nbp

I

number of positions searched.

in

place

V_I

size in addressing units of the various available areas.

JEDISP returns, in descending order in the integer vector \(\mathit{lplace}\), the size of the \(\mathit{nbp}\) largest value segments available for an allocation (JEVEUO), at the time of the call. The values obtained remain valid under the condition of the sole use of allocation requests concerning segments of values of less or equal lengths.

So \(\mathit{lplace}(1)\) returns the size of the largest object that could be allocated, \(\mathit{lplace}(2)\) the size of the largest object that could be allocated after using the zone corresponding to \(\mathit{lplace}(1)\).

Note:

Allocating a collection may cause attribute objects to be loaded into memory and thus make the values obtained by JEDISP obsolete .

4.17. The consultations#

Reading an attribute of an object JEVEUXou from a collection object

SUBROUTINE JELIRA (o_name, at_name, ival=ival, cval=cval)

in

nom_o

K24

object name JEVEUX

in

name_at

K*

attribute name (see appendix 2: list of accessible attributes)

out

ival

I

integer value for an integer attribute.

out

cval

K*

text for a character attribute.

Notes:

In addition to the attributes described in [§2], it is possible to retrieve with the value XOUS the object type JEVEUX associated with the descriptor, « S » simple object, « X » collection.

Both arguments ival*and* cval*are optional. Both arguments can be provided when calling the routine with or without the respective identifiers « ival= » and « cval= » .*


Reading current brand value

SUBROUTINE JEVEMA (brand)

out

brand

I

current brand value

Search for the list of descriptor names found in a class

SUBROUTINE JELSTC (cl_name, source, ipos, ipos, nbmax, l_name, nbval)

4.18. The impressions#

Several routines allow you to print the content of a JEVEUX object or a collection object, to print the attributes, to print the state of the memory managed by JEVEUX (objects present, position, size, etc.), to print the catalog of a class, or to consult the status of a database.

SUBROUTINE JEIMPO (unit, nom_o, param, cmess)

Printing the contents of a JEVEUX object or a collector’s item

in

unit

I

Logical unit number associated with the print file, within Code_Aster we will use 6 (“MESSAGE”) or 8 (“RESULTAT”)

in

nom_o

K24

object name JEVEUX

in

param

K*

not currently used (blank “” mandatory)

in

cmess

K*

text appearing as a comment when printed

SUBROUTINE JEIMPA (unit, nom_o, cmess)

Print all attributes of a JEVEUX object or a collector’s item

in

unit

I

Logical unit number associated with the print file, within Code_Aster we will use 6 (“MESSAGE”) or 8 (“RESULTAT”)

in

nom_o

K24

object name JEVEUX

in

cmess

K*

text appearing as a comment when printed

SUBROUTINE JEIMPR (unit, cl_name, cmess)

Print the catalog

SUBROUTINE JEIMPM (unit)

Print the status of the memory area managed by JEVEUX

in

unit

I

Logical unit number associated with the print file, within Code_Aster we will use 6 (“MESSAGE”) or 8 (“RESULTAT”)

The JEIMPM routine allows you to edit the content of the memory area managed at the time of the call. Here are the meanings of the values that appear when printed in order:

  • short name of the class associated with the object,

  • Gbase GLOBALE,

  • Vbase VOLATILE,

  • collection identifier, if the latter is 0, it is a simple object,

  • simple object identifier or collector’s item number,

  • call level in the JEMARQ/JEDEMA stack

  • memory address of the value segment,

  • use of the value segment, equal U or X,

  • length in addressing units (integer 8 bytes in 64 bits) of the value segment,

  • status of the value segment, equal D or A,

  • name of the object, possibly followed by the collection object number.

The possible combinations of status and usage of a value segment, as well as their meaning, are as follows:

  • U D: value segment used, for write access and possibly for reading. It will have to be unloaded onto disk.

  • U A: value segment used, in read access. It will not be unloaded to disk.

  • X D: unused value segment, downloadable: it will have to be unloaded onto disk. A write or read request on the associated object directly returns its position without memory movement and without disk access. Its position can be retrieved at any time to place a new value segment at the price of disk access (origin: U D).

  • X A: unused, removable value segment. A write or read request on the associated object directly returns its position without memory movement and without disk access. Its position can be retrieved at any time to place a new value segment without disk access (origin: U A).

Example of the impression obtained:

CL- -- NUM -- -MA- --------- --------- IADY --------- --------- --------- --------- --------- -U- - LON UA - -S- --------- NOM --------- -------------- --------------


|G| 0| 1| -1| -2| 118073808|U| 11| D| ________GLOBAL ________$$CARA

|G| 0| 2| -2| 120752752|U| 4000| D| ________GLOBAL ________$$IADD

|G| 0| 3| -2| 118553440|U| 251| D| ________GLOBAL ________$$GENR

|G| 0| 4| -2| 118533472|U| 251| D| ________GLOBAL ________$$TYPE

|G| 0| 5| -2| 118559216|U| 1001| D| ________GLOBAL ________$$DOCU

|G| 0| 6| -2| 120784832|U| 2000| D| ________GLOBAL ________$$ORIG

|G| 0| 7| -| -2| 120800912|U| 8004| D| ________GLOBAL ________$RNAME

|G| 0| 8| -2| 120865024|U| 2000| D| ________GLOBAL ________$$LTYP

|G| 0| 9| -2| 120881104|U| 2000| D| ________GLOBAL ________$$LONG

|G| 0| 10| -2| 120897184|U| 2000| D| ________GLOBAL ________$$LONO

|G| 0| 11| -2| 120913264|U| 2000| D| ________GLOBAL ________$$DATE

|G| 0| 12| -2| 120929344|U| 2000| D| ________GLOBAL ________$$LUTI

|G| 0| 13| -2| 120945424|U| 3203| D| ________GLOBAL ________$$HCOD

|G| 0| 14| -2| 46912496128016|U| 188742| D| ________GLOBAL ________$$USADI

|G| 0| 15| -2| 118578720|U| 62914| D| ________GLOBAL ________$$ACCE

|G| 0| 16| -2| 118002208|U| 4000| D| ________GLOBAL ________$$MARQ

|G| 0| 17| -2| 118034288|U| 2000| D| ________GLOBAL ________$$INDI

|G| 0| 18| -2| 119082112|U| 102400| D| ________GLOBAL ________$$TLEC

|G| 0| 19| -2| 119901392|U| 102400| D| ________GLOBAL ________$$TECR

|G| 0| 20| -2| 120720672|U| 4000| D| ________GLOBAL ________$$IADM

|G| 0| 21| 0| 93362960|X| 21| D| &FOZERO.PROL

|G| 0| 22| 0| 98181600|X| 2| D| &FOZERO.VALE

|G| 0| 23| 0| 108074656|0| 0| 0| 0| 0| 0| 0| 0| 0| 0| 108074656|X| 1| D| D| &&_NUM_CONCEPT_UNIQUE

|G| 0| 24| 0| 123411680|X| 5010| D| &&SYS.KRESU

|G| 0| 25| 0| 88929024|X| 11| D| &CATA.ACOUSTIC

...


SUBROUTINE JEIMPD (unit, cl_name, cmess)

Print the list of JEVEUX objects in a database:

SUBROUTINE JEPRAT (unit, name, at_name, param, cmess)

This routine edits the catalog of JEVEUX objects on disk.

in

unit

I

Logical unit number associated with the print file, within Code_Aster we will use 6 (“MESSAGE”) or 8 (“RESULTAT”)

in

name

K24

object name JEVEUX or class name preceded by the $ character

in

at_name

K8

name of the attribute or suffix of the system object to be printed. nom_at takes its values from the following list: for a collection $$ DESO, $$ IADD, $$, $$ IADM, $$, $$ PEPL, $$, $$, $$, $$, $$ NOM, $$, $$, $$ REEL, $$ LONG, $$ LONO, $$, $$ LUTI, $$, $$. NUM For an entire class $ CARA, $$ IADD, $$ GENR, $$ TYPE, $$, $$, $$, $$, $$, $$, $, $, $, $, $$, $$ DOCU, $$, $$, $$, ORIG RNOM LTYP LONG LONO DATE LUTI HCOD $$ USADI, $$ ACCE, $$ MARQ, $$, $$ TLEC, $$, $$ TECR, $$ IADM

in

param

K*

not currently used (blank “” mandatory)

in

cmess

K*

text appearing as a comment when printed

Note:

This routine is a support utility only.

4.19. The utilities#

The following utilities were written to copy or reset parts of simple objects or collectibles.

Reset or blank depending on the type of object JEVEUX.

SUBROUTINE JERAZO (name_o, n, i1)

in

nom_o

K24

object name JEVEUX

in

n

I

number of values to reset

in

I1

I

index in the vector of the first value to be reset

4.20. A debugging utility#

Misuse of the address returned by the JEVEUO routine can lead to memory overwriting, and in particular to the destruction of the chaining of value segments. In this case, the programmer can try to locate the routine causing the crash by instrumentating his source code with calls to JXVERI. This routine checks the integers present on either side of each value segment: during an overflow these values are generally overwritten. Upstream overwriting corresponds to the integer located just in front of the first value in the value segment. Downstream overwriting corresponds to the integer located just behind the last value in the value segment.

SUBROUTINE JXVERI (Cfic, CMESS)

in

cfic

K*

text defining the local name of the print file, within Code_Aster we will use “MESSAGE” or “RESULTAT”

in

cmess

K*

text appearing as a comment when printed

This routine sends a message indicating the integrity or not of the chaining when it exists, or when the identifiers located on either side of the values are overwritten.

4.21. The initialization routines used by the supervisor#

The use of JEVEUX objects is only possible after initialization which requires defining:

  • the maximum number of databases that can be managed simultaneously,

  • the size of the memory area managed by JEVEUX, which will be allocated dynamically.

This initialization is necessarily carried out by the supervisor within the DEBUT or POURSUITE commands using the JEDEBU routine, which automatically creates all the necessary system objects:

SUBROUTINE JEDEBU (bases, lzone, cmess, cvig, idebug)

in

nbases

I

maximum number of simultaneous databases (≤5)

in

lzone

I

size of memory allocated in addressing units

in

cmess

K*

local name of the error message print file

in

cvig

K*

not used

in

idebug

I

used for operation in debug mode \(\mathit{idebug}\mathrm{=}0\) normal operating mode \(\mathit{idebug}\mathrm{=}1\) debug JEVEUXenclenché

When the JEVEUX application is initialized, it is important to open the object classes you want to work on. To open a class, it is necessary to specify its characteristics: presence or absence of an associated file, name of the class, name of the associated database, characteristics of the file, etc… In mode DEBUG, the operation of the memory manager is modified, the downloads on disk are no longer deferred and the memory space occupied by a value segment is set to an indefinite value. This mode of operation is used to determine code: the use of an address corresponding to a freed value segment causes an abrupt stop.

SUBROUTINE JEINIF (stin, stout, low_name, cl_name, nmax, nblock, lblock)

in

stin

K*

text defining the status at the start of work: “DUMMY” no associated file “DEBUT” initializing or resetting an existing class “POURSUIT” retrieving the contents of an existing class

in

stout

K*

text defining the status at the end of work: “SAUVE” save to file at the end of application “DETRUIT” destruction of the class at the end of application

in

bas_name

K*

local database name (example: “GLOBALE”, “VOLATILE”)

in

cl_name

K1

name of the associated class (example: “G”, “V”)

in

nmax

I

maximum number of object names JEVEUXdans the class

in

nblock

I

maximum number of records in the associated direct access file

in

lblock

I

length of the records in the associated direct access file

Note:

A class can be opened or closed at any time, up to the maximum number of classes that can be managed simultaneously.

To close a class, during application:

SUBROUTINE JELIBF (cond, cl_name)

in

cond

K*

text to override the stout value defined in JEINIF “SAUVE” with immediate file backup “DETRUIT” with immediate destruction

in

cl_name

K*

name of the class to close (example: “G”, “V”)

Finally, it is mandatory to use the application closure routine, which closes all classes that are still open after saving the JEVEUX objects and catalogs present in memory and stopping the application by the Fortran STOP instruction. This routine is called within the FIN command by the supervisor.

SUBROUTINE JEFINI (cond)

in

cond

K8

closing condition: “NORMAL” save according to the stout value defined in JEINIF “ERREUR” save open classes, for possible later analysis

Notes:

It is the only STOP usable throughout the application to be able to reuse databases.

a user must call this routine to stop their application after detecting an error with cond = “ERREUR” ,

Within Code_Aster a stop with the condition cond = “ERREUR “does not allow the database to be updated GLOBALE in the user directory, the concepts created having not been validated.

SUBROUTINE JETASS (cl_name)

in

cl_name

K1

name of the associated class (example: “G”, “V”)

This routine is intended to recover records that have become unused as a result of the destruction of associated JEVEUX objects. This only applies to large objects, i.e. those that require at least one record of the direct access file. The only effect is to reorder the recordings sequentially, the effective recovery of the space must then be carried out by copying the beginning of the direct access file, only the Aster supervisor can perform this action.

4.22. The backup and replay routines used by the supervisor#

The GLOBALE database allows you to save and reread on the same platform the Jeveux objects obtained during an execution. This binary file, composed of one or more sub-files, is adherent to the execution platform (32 or 64 bit operating system). Using the following two routines, it is possible to save the complete content in HDF format and to review it regardless of the platform type.

SUBROUTINE JEIMHD (fiddf, cl_name)

in

ficdf

K*

local name of file HDF to be created

in

cl_name

K1

name of the associated class (example: “G”, “V”)

SUBROUTINE JELIHD (bas_name, fiddf, cl_name)

in

bas_name

K*

local database name (example: “GLOBALE”, “VOLATILE”)

in

fichdf

K*

local name of file HDF to be read again

in

cl_name

K1

name of the associated class (example: “G”, “V”)

4.23. Survey routines for the supervisor#

SUBROUTINE JELIAD (cl_name, numr, nboct)

in

cl_name

K1

name of the associated class (example: “G”, “V”)

out

numr

I

record number

out

nboct

I

number of bytes before recording

This routine returns the number of the record containing the system object $$ RNOMdans the base in question. Since this directory of names is a characteristic of the database, the supervisor uses this property to « identify » the database and carry out ongoing consistency checks.