2. Routine DISMOI#

Principle

This routine should avoid multiplying the programming sequences necessary to retrieve information (integer or text) in a Data Structure (SD).

Example:

  • the name of the mesh associated with a field,

  • the number of equations in a nume_ddl,

*

It’s sort of a form of « JELIRA » on SDs.

To retrieve the name (MA) of the mesh associated with the field (CH), we will do:

CALL DISMOI ('NOM_MAILLA', 'CH', 'CHAMP', repk=MA)

Notes:

We can extend this routine to « objects » that are not really SDs. You just need to be able to name the object and associate it with a type. This is for example the case of quantities , type_elem and phenomenon*.*

Some SDs are not really named because they are unique. This is for example the case of the finite element catalog (” & CATA “cf [D4.04.01] - Data Structure sd_cata_elem ) in this case the name of the object is unused.

Call syntax

CALL DISMOI (question, name_SD, type_SD, repi, repk, stop, yesterday)

question

K*

keyword specifying the request,

SD_name

K*

name of an SD,

type_SD

K*

keyword specifying the type of data structure: SD_name,

repi

I

answer (when the answer is integer),

repk

K*

response (when the response is a character string),

stop

K1

“F” (default)/”C” “F”: in case of a problem, we stop in a fatal error “C”: in case of a problem, we get out of the routine with ier=1

ier

I

error return code if stop=”C”, Yesterday =0 everything is fine, 1 otherwise

In « standard » use, a question is asked that must be answered. We then do:

CALL DISMOI (question, SD_name, SD_type, repk (or repi) =xxx)

If the request fails, the stop is abrupt (“F”) but this indicates a programming error.

2.1. List of types recognized by DISMOI#

Type name

Length

Routine

“CARA_ELEM”

K8

DISMCR

“CARTE”

K19

DISMCA

“CARTE_CARCRI”

K19

DISMOI_CARCRI

“CARTE_COMPOR”

K19

DISMCO

“CATALOGUE”

K0

DISMCT

“CHAM_ELEM” or “RESUELEM”

K19

DISMCE

“CHAM_ELEM_S”

K19

DISMES

“CHAM_MATER”

K8

DISMCM

“CHAM_NO”

K19

DISMCN

“CHAM_NO_S”

K19

DISMNS

“CHAMP”

K19

DISMCP

“CHARGE”

K8

DISMCH

“FOND_FISS”

K8

DISMFF

“FISS_XFEM”

K8

DISMXF

“GRANDEUR”

K8

DISMGD

“INCONNU”

K19

DISMIC

“INTERF_DYNA”

K14

DISMLI

“LIGREL”

K19

DISMLG

“MACR_ELEM_STAT”

K8

DISMML

“MAILLAGE”

K8

DISMMA

“MATR_ASSE”

K19

DISMMS

“MATR_ELEM” or “VECT_ELEM”

K8

DISMME

“MODELE”

K8

DISMMO

“NUME_DDL”

K14

DISMNU

“PHENOMENE”

K16

DISMPH

“RESULTAT”

K8

DISMRS

“RESU_DYNA”

K8

DISMDY

“TYPE_ELEM”

K16

DISMTE

“TYPE_MAILLE”

K8

DISMTM

Notes:

the length of the names of the typed objects Kn is indicative: the routine DISMOI complements (or truncates) the name provided by the user according to the associated type, the name of the routines DISMXX associated with the different types is given (in the 3rd column) to allow programmers to add new possibilities,

Rule: When using DISMOI , you should always call DISMOI and never specific routines DISMXX .

2.2. List of possible questions#

In the table below, for each question, we give:

  • the title of the question (text in capital letters between quotes: “”),

  • the type of the result of the question: I, K3, K8,…,

  • an explanation of the possible answers.

2.3. Cross table of possibilities#

In the table below, we give for each type of Data Structure:

  • the theoretical length of the names of objects of this type,

  • the list of questions that can be asked about this type.

2.4. Examples#

CALL DISMOI ('NOM_MAILLA', CH, 'CHAMP', repk=MA)


CALL DISMOI ('NB_EQUA', K, 'MATR_ASSE', repi= NEQ)


CALL DISMOI ('NB_NO_MAILLA', NOMA, 'MAILLAGE', repi= NBNOTO)


CALL DISMOI ('NOM_GD', CH19, 'CHAMP', repk= NOMGD)


CALL DISMOI ('TYPE_CHAMP', CHEXTR, 'CHAMP', repk= CTYP)


CALL DISMOI ('TYPE_COOR', NOMRES, 'RESU_DYNA', repk=typco, stop='C', ier=iret)

if (iret.eq.1) typco='?? '