5. JEVEUX and Data Structuring#

In this paragraph, we will try to identify the main functionalities of the memory manager JEVEUX and how they are used in Aster.

5.1. JEVEUX object manager#

JEVEUX is the set of FORTRAN routines described in D6.02.01 Memory Management: JEVEUX.

These routines allow you to:

  • create objects,

  • save them (write to disk),

  • destroy them,

  • release them (from the central memory),

  • recall them (in central memory),

  • copy them, print them,…

5.1.1. What is a JEVEUX object?#

  • A set of homogeneous information (integer, real, complex,…),

  • each object is named (24 characters),

  • each object has attributes that can be read (and sometimes written):

  • length (for 1 vector),

  • type of values: integer, real,…

*

  • each object virtually has a « disk image »,

  • there are simple objects (roughly speaking, they are vectors),

  • there are collections of objects,

  • the objects in a collection are all of the same type (but they can have different lengths),

  • access to a collection object is through the name of the collection plus something that identifies the object:

  • a number (numbered collection),

  • or a name (named collection).

5.1.2. Dynamic allocation#

You can create, release (and destroy) a JEVEUX object at any time. This allows memory to be managed dynamically.

Of course, this possibility is used to allocate work areas. This is the only dynamic allocation mechanism authorized in Aster because it manages all the available memory space: (by available memory we mean the space available in the « Region » requested at run time minus the volume of executable code minus the volume of executable code minus the areas managed by the system UNICOS).

5.1.3. Virtual memory#

When you release an object A, JEVEUX considers it to be « downloadable » (on disk). If new requests are made on other objects and space in central memory is running out, object A will be written to disk and its space will be recovered.

JEVEUX therefore allows access (at different times) to more memory than is actually contained in the « Region » of central memory allocated at execution.

It therefore acts as a « virtual memory » system.

5.1.4. Writing and reading on disk#

  • When you explicitly save an object (routine JESAUV), this one is written to disk,

  • when the execution of Aster finishes, we automatically save all the objects in the global database that have not yet been saved,

  • when an object is recalled to the central memory (routine JEVEUO), this one is read from the disk if it has been unloaded and copied back into the central memory.

JEVEUX therefore makes it possible to avoid all binary reads and writes on disk.

5.2. Data Structuring#

Aster commands exchange user-named objects (8 characters) that are called concepts.

Example:

steel = DEFI_MATERIAU (ELAS: (E: 300,000 NU: 0.3));

chmat = AFFE_MATERIAU (MATER: steel...);

The « steel » concept created by command DEFI_MATERIAU is an input argument to command AFFE_MATERIAU.

A concept is in fact a named Data Structure (SD in programming language).

A data structure is nothing more than a set of JEVEUX objects.

Complex data structures can then be « manipulated » in FORTRAN: the SD is passed as an argument by its name (character string).

This greatly improves the definition of routine interfaces: instead of transmitting multitudes of vectors as arguments, we transmit a few data structures.

The grouping of a set of JEVEUX objects into a data structure is done by simple name conventions known to all programmers.

A Data Structure is typed. When executing (for example) the command:

mesh = LIRE_MAILLAGE ();

This must create a mesh-type SD with the name « mesh ». At the end of the execution of the command, a certain number of JEVEUX objects must exist on the base “GLOBALE”, the set of which forms the SD mailla:

'MAILLA. DIME '

'MAILLA. CONNEX '

'MAILLA. NOMNOE '

'MAILLA. NOMMAI '

...

The first 8 characters of the objects are those coming from the user. The other characters (which are used to distinguish objects from each other) are set by the programmers. The description of the contents of the objects. DIME,. CONNEX,… forms what is called the description of the mesh-type SD (see D4 - Description of Data Structures).

Important note:

The only information necessary for the smooth processing of an order is:

→ the values that the user provided behind the keywords in the order: integers, reals,…

→ the SDs (already created by previous commands) given as arguments.

There is no underground information (COMMONS, files,…) between commands. It is compliance with this rule that ensures the real independence of orders from each other.

The only exceptions to this rule are:

  • the SD catalog [D4.01.01] which is accessible everywhere (but it is never modified),

  • some writes (or reads) to files. In this case, the command name is always of the form: IMPR_XXXX or (LIRE_XXXX). The « format » of the file can then be seen as the description of an SD, for example:

  • Aster mesh (LIRE_MAILLAGE),

  • Aster function (LIRE_FONCTION),

  • results to be visualized by I- DEAS (IMPR_RESU ((FORMAT: IDEAS…)).