## 3.3.6 Examples of use

Some examples of calling module MA2D3E in batch and calls via preprocessor MA23XX are given below.

First, an example with TTYPE = -1, and the same with TTYPE = - 2 , i.e., a step-by-step definition of the section starting from the basis via the general matrix, MAT, or via function XYZ23.

The calling programs, the output obtained during execution of case 1, and a plot of the resulting mesh (figure 3.14) is shown below.

Definition via MAT (TTYPE = -1):

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST WITH A MATRIX
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 4 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S. NOPO AND THE O.D.S. NOPO
NFNOPO = 10
NINOPO =  1
CALL OUVRIR(NFNOPO,'nopo2d.ma23.2',
+            'OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
NINOPS =  2
CALL OUVRIR(NFNOPS,'nopo3d.ma23.1','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------   GEOMETRIC TRANSFORMATIONS       ------
C     -----------------------------------------------
C     ---   THE BASIS:
BFONC   = .FALSE.
ZINT(0) = -1.
NBCOU   = 4
C     ---   MATRICES  BETWEEN
C           THE BASIS AND THE ONE ABOVE DEFINED BY MAT
C           TO CONSTRUCT SECTIONS 1 TO 4
NBFONC = 4
DO ISEC=1,4
NUCOU(1,ISEC) = ISEC - 1
NUCOU(2,ISEC) = ISEC
NUCOU(3,ISEC) = -1
ENDDO
C
DO ISEC=1,4
MAT(1,1,ISEC) =  0.8
MAT(1,2,ISEC) =  0.
MAT(1,3,ISEC) =  0.
MAT(1,4,ISEC) =  0.
MAT(2,1,ISEC) =  0.
MAT(2,2,ISEC) =  0.8
MAT(2,3,ISEC) =  0.
MAT(2,4,ISEC) =  0.
MAT(3,1,ISEC) =  0.
MAT(3,2,ISEC) =  0.
MAT(3,3,ISEC) =  1.
MAT(3,4,ISEC) =  1. + ISEC
MAT(4,1,ISEC) =  0.
MAT(4,2,ISEC) =  0.
MAT(4,3,ISEC) =  0.
MAT(4,4,ISEC) =  1.
ENDDO
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES    ------
C     -----------------------------------------------
NBDES = 2
C     ---   BASIS: FACES EDGE AND POINTS SET TO REFERENCE 1 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 1
C     ---
C     ---   ABOVE: FACES EDGES AND POINTS SET TO  REFERENCE 2 :
IDES = 2
DESREF(1,IDES) = 9
DESREF(2,IDES) = 9
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 2
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END
```

Figure 3.14: Example MA2D3E (step-by-step definition via MAT or XYZ23)

```

M   M    OOO    DDDD    U   U   L       EEEEE   FFFFF
MM MM   O   O   D   D   U   U   L       E       F
M M M   O   O   D   D   U   U   L       EEEE    FFFF
M   M   O   O   D   D   U   U   L       E       F
M   M    OOO    DDDD     UUU    LLLLL   EEEEE   F      VERSION 91

DATE   : 16/10/91
AUTHOR : dutoit
++ OPEN(10,FILE='nopo2d.ma23.2',SPEC='OLD,UNFORMATTED',RECL=0)
++ OPEN(11,FILE='nopo3d.ma23.1',SPEC='UNFORMATTED',RECL=0)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE MA2D3E :
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

HEIGHT OF THE BOTTOM BASIS :  -0.1000000E+01

NUMBER OF GEOMETRIC TRANSFORMATIONS :      4
LIST OF TRANSFORMATIONS :
SECTION      0 A      1 TYPE OF TRANSFORMATION     -1
SECTION      1 A      2 TYPE OF TRANSFORMATION     -1
SECTION      2 A      3 TYPE OF TRANSFORMATION     -1
SECTION      3 A      4 TYPE OF TRANSFORMATION     -1

NUMBER OF TRANSFERS OF NUMBERS       :      2
LIST OF TRANSFERS      :
SECTION      0 A      0 TYPE OF TRANSFER           0 :   -100 GIVES      1
SECTION      9 A      9 TYPE OF TRANSFER           0 :   -100 GIVES      2

MESH OBTAINED : SAVE D.S.

TABLE  N O P 2
--------------
MESH CHARACTERISTICS :

SPACE DIMENSION                        (NDIM ) :      3
MAXIMUM NUMBER OF REFERENCES           (NDSR ) :      1
MAXIMUM NUMBER OF SUB-DOMAINS          (NDSD ) :      1
NODES AND POINTS COINCIDE             (NCOPNP) :      1
NUMBER OF ELEMENTS                     (NE   ) :    880
NUMBER OF PENTAHEDRA                   (NPENT) :    880
NUMBER OF BOUNDARY ELEMENTS            (NEF  ) :     72
NUMBER OF NODES                        (NOE  ) :    710
NUMBER OF NODES PER SEGMENT (NO EXTREMITIES)   :      0
TYPE OF COORDINATE VALUES             (NTYCOO) : REEL1MOT
MAX DIFFERENCE +1 BETWEEN 2 NODES OF AN ELEMENT :   271
NUMBER OF COARSE ELEMENTS             (NBEGM ) :      0
NUMBER OF WORDS IN ARRAY NOP5         (LNOP5 ) :  13420
REFERENCE AXIS    X,Y,Z               (NTACOO) :      1

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
END OF MODULE MA2D3E
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
```

A definition via XYZ23 (TTYPE = -2):

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST WITH XYZ23 THROUGHOUT
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 4 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S. NOPO AND THE O.D.S. NOPO    ------
NFNOPO = 10
NINOPO =  1
CALL OUVRIR(NFNOPO,'nopo2d.ma23.2',
+            'OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
NINOPS =  2
CALL OUVRIR(NFNOPS,'nopo3d.ma23.2','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------   GEOMETRIC TRANSFORMATIONS       ------
C     -----------------------------------------------
C     ---   THE BASIS :
BFONC   = .FALSE.
ZINT(0) = -1.
NBCOU   = 4
C     ---   FUNCTIONS XYZ23
C           BETWEEN THE BASE THE ONE ABOVE DEFINED BY XYZ23
C           TO CONSTRUCT SECTIONS 1 TO 4
NBFONC = 4
DO ISEC=1,4
NUCOU(1,ISEC) = ISEC - 1
NUCOU(2,ISEC) = ISEC
NUCOU(3,ISEC) = -2
ENDDO
C
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES    ------
C     -----------------------------------------------
NBDES = 2
C     ---   BASIS : FACES EDGES AND POINTS SET TO REFERENCE 1 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 1
C     ---
C     ---   ABOVE : FACES EDGES AND POINTS SET TO REFERENCE 2 :
IDES = 2
DESREF(1,IDES) = 9
DESREF(2,IDES) = 9
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 2
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END
C
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C    SUBROUTINE XYZ23
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE XYZ23(I,NUM,NREF,X,Y,Z,X3,Y3,Z3)
REAL*4 DZ(4)
DATA DZ/ 2., 5. , 9., 14./
C
X3 = 0.8 **I * X
Y3 = 0.8 **I * Y
Z3 = Z + DZ(I)
END
```

An example with TTYPE = -3 for sections 5 to 9 and TTYPE = -6 for the first sections. Consequently, we have:

• an interpolation, of sides given in array ZINT between the basis (z= ZINT(0)) and a virtual section of side 10 described by XYZ23, for sections 1 to 5
• the construction, section by section, of sections 6 to 9 via XYZ33.
The references of the 3D mesh are attributed via array DESREF(.,.) (see the calling program for the specification of the transfers and figure 3.15 for the result obtained).

The calling program, the output obtained during execution and a plot of the resulting mesh is shown below.

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST NUMBER 3
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 2 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S NOPO AND THE O.D.S NOPO   ------
NFNOPO = 10
NINOPO =  1
CALL OUVRIR(NFNOPO,'nopo2d.ma23.2',
+            'OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
NINOPS =  2
CALL OUVRIR(NFNOPS,'nopo3d.ma23.36','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------  GEOMETRICAL TRANSFORMATIONS      ------
C     -----------------------------------------------
C     ---   LA BASE :
BFONC   = .FALSE.
ZINT(0) = -1.
C     ---   THE INTERMEDIARY SIDES :
NBCOU   = 9
ZINT(1) = 0.
ZINT(2) = 2.
ZINT(3) = 4.
ZINT(4) = 6.
ZINT(5) = 7.
C     ---   A FUNCTION : A MANUAL INTERPOLATION
C           BETWEEN THE BASIS AND THE ONE ABOVE DEFINED BY XYZ23
C           FOR SIDE 10. ( SEE XYZ23 )
C           TO CONSTRUCT SECTIONS 1 TO 5
NBFONC = 2
C
IFONC  = 1
NUCOU(1,IFONC) = 0
NUCOU(2,IFONC) = 5
NUCOU(3,IFONC) = -6
C     ---   A FUNCTION : LOCAL DEFINITION BY XYZ33
C           TO CONSTRUCT SECTIONS 6 TO 9
IFONC = 2
NUCOU(1,IFONC) = 5
NUCOU(2,IFONC) = 9
NUCOU(3,IFONC) = -3
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES       ------
C     -----------------------------------------------
NBDES = 2
C     ---   BASIS : FACES EDGES AND POINTS SET TO REFERENCE 1 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 1
C     ---
C     ---   ABOVE : FACES EDGES AND POINTS SET TO REFERENCE 2 :
IDES = 2
DESREF(1,IDES) = 9
DESREF(2,IDES) = 9
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 2
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END

C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C    SUBROUTINE XYZ33
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE XYZ33(I,NUM,NREF,X,Y,Z,X3,Y3,Z3)
C
X3 = 0.10 * I * X
Y3 = 0.10 * I * Y
Z3 = Z + 0.450
END
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C    SUBROUTINE XYZ23
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE XYZ23(I,NUM,NREF,X,Y,Z,X3,Y3,Z3)
C
X3 = X / 2.5
Y3 = Y / 2.5
Z3 = 10.
END
```

Figure 3.15: Example MA2D3E (an interpolation followed by step-by-step definitions)

```

M   M    OOO    DDDD    U   U   L       EEEEE   FFFFF
MM MM   O   O   D   D   U   U   L       E       F
M M M   O   O   D   D   U   U   L       EEEE    FFFF
M   M   O   O   D   D   U   U   L       E       F
M   M    OOO    DDDD     UUU    LLLLL   EEEEE   F      VERSION 91

DATE   : 16/10/91
AUTHOR : dutoit
++ OPEN(10,FILE='nopo2d.ma23.2',SPEC='OLD,UNFORMATTED',RECL=0)
++ OPEN(11,FILE='nopo3d.ma23.1',SPEC='UNFORMATTED',RECL=0)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE MA2D3E :
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

HEIGHT OF THE BOTTOM BASIS :  -0.1000000E+01

NUMBER OF GEOMETRIC TRANSFORMATIONS :      4
LIST OF TRANSFORMATIONS :
SECTION      0 TO     5 TYPE OF TRANSFORMATION     -6
SECTION      5 TO     9 TYPE OF TRANSFORMATION     -3

NUMBER OF TRANSFERS OF NUMBERS       :      2
LIST OF TRANSFERS      :
SECTION      0 TO     0 TYPE OF TRANSFER           0 :   -100 GIVES      1
SECTION      9 TO     9 TYPE OF TRANSFER           0 :   -100 GIVES      2

MESH OBTAINED : SAVE D.S.

TABLE  N O P 2
--------------
MESH CHARACTERISTICS :

SPACE DIMENSION                        (NDIM ) :      3
MAXIMUM NUMBER OF REFERENCES           (NDSR ) :      1
MAXIMUM NUMBER OF SUB-DOMAINS          (NDSD ) :      1
NODES AND POINTS COINCIDE             (NCOPNP) :      1
NUMBER OF ELEMENTS                     (NE   ) :   1980
NUMBER OF PENTAHEDRA                   (NPENT) :   1980
NUMBER OF BOUNDARY ELEMENTS            (NEF  ) :     72
NUMBER OF NODES                        (NOE  ) :   1420
NUMBER OF NODES PER SEGMENT (NO EXTREMITIES)   :      0
TYPE OF COORDINATE VALUES             (NTYCOO) : REEL1MOT
MAX DIFFERENCE +1 BETWEEN 2 NODES OF AN ELEMENT :   271
NUMBER OF COARSE ELEMENTS             (NBEGM ) :      0
NUMBER OF WORDS IN ARRAY NOP5         (LNOP5 ) :  29040
REFERENCE AXIS    X,Y,Z               (NTACOO) :      1

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
END OF MODULE MA2D3E
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
```

An example with TTYPE = -4, i.e., starting from the 2D mesh data (a ring with reference 1 for the items of the internal circle and reference 2 for the external circle), we define the basis via ZINT(0) = 10. and construct sections 1 to 4 of the sides given in array ZINT(1:4) by translation.

The references of the 3D mesh are attributed via array DESREF(.,.) (see the calling program for the specification of the transfers and figure 3.16 for the result obtained.

The calling program, the output obtained during execution and a plot of the resulting mesh is shown below.

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST NUMBER 4
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 1 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S NOPO AND THE O.D.S NOPO   ------
NFNOPO = 10
CALL TRUNIT (NFNOPO)
NINOPO =  1
CALL OUVRIR(NFNOPO,'NOPO2D.MA23.1','OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
CALL TRUNIT (NFNOPS)
NINOPS =  2
CALL OUVRIR(NFNOPS,'NOPO3D.MA23.4','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------  GEOMETRICAL TRANSFORMATIONS      ------
C     -----------------------------------------------
C     ---   The BASIS :
BFONC   = .FALSE.
ZINT(0) = 10.
C     ---   THE INTERMEDIARY SIDES :
NBCOU   = 4
ZINT(1) = 11.
ZINT(2) = 12.
ZINT(3) = 13.
ZINT(4) = 14.5
C     ---   A FUNCTION : A MANUAL TRANSLATION
NBFONC = 1
C
IFONC  = 1
NUCOU(1,IFONC) = 0
NUCOU(2,IFONC) = 4
NUCOU(3,IFONC) = -4
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES       ------
C     -----------------------------------------------
NBDES = 6
C     ---   BASIS : FACES EDGES AND POINTS SET TO REFERENCE 3 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 3
C     ---
C     ---   ABOVE : FACES EDGES AND POINTS SET TO REFERENCE 4 :
C           ABOVE : THEN EDGE 1 (2D) ==> EDGE 7 (3D)
C           ABOVE : THEN EDGE 2 (2D) ==> EDGE 8 (3D)
IDES = 2
DESREF(1,IDES) = 4
DESREF(2,IDES) = 4
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 4
IDES = 3
DESREF(1,IDES) = 4
DESREF(2,IDES) = 4
DESREF(3,IDES) = 4
DESREF(4,IDES) = 1
DESREF(5,IDES) = 7
IDES = 4
DESREF(1,IDES) = 4
DESREF(2,IDES) = 4
DESREF(3,IDES) = 4
DESREF(4,IDES) = 2
DESREF(5,IDES) = 8
C     ---   VERTICAL FACES : EDGE 1 (2D) ==> FACE 5 (3D)
C                            EDGE 2 (2D) ==> FACE 6 (3D)
IDES = 5
DESREF(1,IDES) = 0
DESREF(2,IDES) = 4
DESREF(3,IDES) = 3
DESREF(4,IDES) = 1
DESREF(5,IDES) = 5
IDES = 6
DESREF(1,IDES) = 0
DESREF(2,IDES) = 4
DESREF(3,IDES) = 3
DESREF(4,IDES) = 2
DESREF(5,IDES) = 6
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END
```

Figure 3.16: Example MA2D3E (translation)

``` M   M    OOO    DDDD    U   U   L       EEEEE   FFFFF
MM MM   O   O   D   D   U   U   L       E       F
M M M   O   O   D   D   U   U   L       EEEE    FFFF
M   M   O   O   D   D   U   U   L       E       F
M   M    OOO    DDDD     UUU    LLLLL   EEEEE   F      VERSION 91

DATE   : 16/10/91
AUTHOR : dutoit
++ OPEN(10,FILE='nopo2d.ma23.1',SPEC='OLD,UNFORMATTED',RECL=0)
++ OPEN(11,FILE='nopo3d.ma23.4',SPEC='UNFORMATTED',RECL=0)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE MA2D3E :
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

HEIGHT OF THE BOTTOM BASIS :   0.1000000E+02

NUMBER OF GEOMETRIC TRANSFORMATIONS :      1
LIST OF TRANSFORMATIONS :
SECTION      0 TO      4 TYPE OF TRANSFORMATION     -4

NUMBER OF NUMBER TRANSFERS           :      6
LIST OF TRANSFERS      :
SECTION      0 TO      0 TYPE OF TRANSFER           0 :   -100 GIVES      3
SECTION      4 TO      4 TYPE OF TRANSFER           0 :   -100 GIVES      4
SECTION      4 TO      4 TYPE OF TRANSFER           4 :      1 GIVES      7
SECTION      4 TO      4 TYPE OF TRANSFER           4 :      2 GIVES      8
SECTION      0 TO      4 TYPE OF TRANSFER           3 :      1 GIVES      5
SECTION      0 TO      4 TYPE OF TRANSFER           3 :      2 GIVES      6

MESH OBTAINED : SAVE D.S.

TABLE  N O P 2
--------------
MESH CHARACTERISTICS :

SPACE DIMENSION                        (NDIM ) :      3
MAXIMUM NUMBER OF REFERENCES           (NDSR ) :      8
MAXIMUM NUMBER OF SUB-DOMAINS          (NDSD ) :      1
NODES AND POINTS COINCIDE             (NCOPNP) :      1
NUMBER OF ELEMENTS IN THE MESH         (NE   ) :    144
NUMBER OF HEXAHEDRA                    (NHEX ) :    144
NUMBER OF BOUNDARY ELEMENTS            (NEF  ) :     28
NUMBER OF NODES                        (NOE  ) :    240
NUMBER OF NODES PER SEGMENT (NO EXTREMITIES)   :      0
TYPE OF COORDINATE VALUES             (NTYCOO) : REEL1MOT
MAX DIFFERENCE +1 BETWEEN 2 NODES OF AN ELEMENT :    78
NUMBER OF COARSE ELEMENTS             (NBEGM ) :      0
NUMBER OF WORDS IN ARRAY NOP5         (LNOP5 ) :   4968
REFERENCE AXIS    X,Y,Z               (NTACOO) :      1

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
END OF MODULE MA2D3E
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
```

An example with TTYPE = -5, i.e., definition of the upper basis (via XYZ23 at side Z=10.) and interpolation between the basis (ZINT(0) = -1.) and this section to construct 5 sections with equidistant sides between that of the basis and that of the upper section.

The references of the 3D mesh are attributed via via array DESREF(.,.) (see the calling program for the specification of the transfers and figure 3.18 for the result obtained).

Extracts of the calling program and a plot of the resulting mesh is shown below.

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST NUMBER 5
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 1 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S NOPO AND THE O.D.S NOPO   ------
NFNOPO = 10
NINOPO =  1
CALL OUVRIR(NFNOPO,'nopo2d.ma23.2',
+            'OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
NINOPS =  2
CALL OUVRIR(NFNOPS,'nopo3d.ma23.5','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------  GEOMETRICAL TRANSFORMATIONS      ------
C     -----------------------------------------------
C     ---   LA BASE :
BFONC   = .FALSE.
ZINT(0) = -1.
C     ---   THE INTERMEDIARY SIDES :
NBCOU   = 5
C     ---   A FUNCTION : A MANUAL INTERPOLATION
C           BETWEEN THE BASIS AND THE ONE ABOVE DEFINED BY XYZ23
C           FOR SIDE 10. ( SEE XYZ23 )
NBFONC = 1
C
IFONC  = 1
NUCOU(1,IFONC) = 0
NUCOU(2,IFONC) = 5
NUCOU(3,IFONC) = -5
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES    ------
C     -----------------------------------------------
NBDES = 5
C     ---   BASIS : FACES EDGES AND POINTS SET TO REFERENCE 1 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 1
C     ---
....
....   (SEE EXAMPLE BELOW)
....
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END

C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C    SUBROUTINE XYZ23
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE XYZ23(I,NUM,NREF,X,Y,Z,X3,Y3,Z3)
C
X3 = X / 2.5
Y3 = Y / 2.5
Z3 = 10.
END
```

Figure 3.17: Example MA2D3E (interpolation equidistant in z)

An example with TTYPE = -6, i.e., definition of a virtual upper basis (via XYZ23 at side Z=10.) and interpolation between the basis (ZINT(0) = -1.) and this section to construct 5 sections of sides contained in array ZINT(1:5).

The references of the 3D mesh are attributed via array DESREF(.,.) (see the calling program for the specification of the transfers and figure 3.18 for the result obtained).

The calling program, the output obtained during execution and a plot of the mesh obtained is shown below.

```C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C   EXAMPLE OF CALLING MODULE MA2D3E : TEST NUMBER 6
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PARAMETER (LM = 100000 , MAXFON = 1 , MAXSEC = 9 , MAXDES = 10 )
COMMON M(LM)
INTEGER NUCOU(3,MAXFON),DESREF(5,MAXDES)
REAL    MAT(4,4,MAXFON)
REAL    ZINT(0:MAXSEC)
LOGICAL BFONC,COLLER,RAPIDE
EXTERNAL XYZ23,XYZ33
C
IMPRE = 5
CALL INITIS(M,LM,IMPRE,0)
C     ------   THE I.D.S NOPO AND THE O.D.S NOPO   ------
NFNOPO = 10
NINOPO =  1
CALL OUVRIR(NFNOPO,'nopo2d.ma23.2',
+            'OLD,UNFORMATTED',0,IOSTAT)
NFNOPS = 11
NINOPS =  2
CALL OUVRIR(NFNOPS,'nopo3d.ma23.6','UNFORMATTED',0,IOSTAT)
C     -----------------------------------------------
C     ------  GEOMETRICAL TRANSFORMATIONS      ------
C     -----------------------------------------------
C     ---   LA BASE :
BFONC   = .FALSE.
ZINT(0) = -1.
C     ---   THE INTERMEDIARY SIDES :
NBCOU   = 5
ZINT(1) = 0.
ZINT(2) = 2.
ZINT(3) = 4.
ZINT(4) = 6.
ZINT(5) = 7.
C     ---   A FUNCTION : A MANUAL INTERPOLATION
C           BETWEEN THE BASIS AND THE ONE ABOVE DEFINED BY XYZ23
C           FOR SIDE 10. ( SEE XYZ23 )
NBFONC = 1
C
IFONC  = 1
NUCOU(1,IFONC) = 0
NUCOU(2,IFONC) = 5
NUCOU(3,IFONC) = -6
C     -----------------------------------------------
C     ------   DEFINITION OF THE REFERENCES       ------
C     -----------------------------------------------
NBDES = 5
C     ---   BASIS : FACES EDGES AND POINTS SET TO REFERENCE 1 :
IDES = 1
DESREF(1,IDES) = 0
DESREF(2,IDES) = 0
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 1
C     ---
C     ---   ABOVE : FACES EDGES AND SET TO REFERENCE 2 :
C           ABOVE : THEN EDGE 1 (2D) ==> EDGE 4 (3D)
IDES = 2
DESREF(1,IDES) = 5
DESREF(2,IDES) = 5
DESREF(3,IDES) = 0
DESREF(4,IDES) = -100
DESREF(5,IDES) = 2
IDES = 3
DESREF(1,IDES) = 5
DESREF(2,IDES) = 5
DESREF(3,IDES) = 4
DESREF(4,IDES) = 1
DESREF(5,IDES) = 4
C     ---   VERTICAL FACES : EDGE 1 (2D) ==> FACE 2 (3D)
C                            EDGE 2 (2D) ==> FACE 3 (3D)
IDES = 4
DESREF(1,IDES) = 0
DESREF(2,IDES) = 5
DESREF(3,IDES) = 3
DESREF(4,IDES) = 1
DESREF(5,IDES) = 2
IDES = 5
DESREF(1,IDES) = 0
DESREF(2,IDES) = 5
DESREF(3,IDES) = 3
DESREF(4,IDES) = 2
DESREF(5,IDES) = 3
C     -----------------------------------------------
C     ------   CALL THE MODULE                 ------
C     -----------------------------------------------
EPS    = 0.001
COLLER = .FALSE.
RAPIDE = .TRUE.
C
CALL MA2D3E(M,M,NFNOPO,NINOPO,NFNOPS,NINOPS,NBCOU,EPS,NBFONC,
+            NUCOU,MAT,COLLER,RAPIDE,DESREF,NBDES,ZINT,BFONC,
+            XYZ23,XYZ33)
END

C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C    SUBROUTINE XYZ23
C   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SUBROUTINE XYZ23(I,NUM,NREF,X,Y,Z,X3,Y3,Z3)
C
X3 = X / 2.5
Y3 = Y / 2.5
Z3 = 10.
END
```

Figure 3.18: Example MA2D3E (interpolation)

``` M   M    OOO    DDDD    U   U   L       EEEEE   FFFFF
MM MM   O   O   D   D   U   U   L       E       F
M M M   O   O   D   D   U   U   L       EEEE    FFFF
M   M   O   O   D   D   U   U   L       E       F
M   M    OOO    DDDD     UUU    LLLLL   EEEEE   F      VERSION 91

DATE   : 17/10/91
AUTHOR : dutoit
++ OPEN(10,FILE='nopo2d.ma23.2',SPEC='OLD,UNFORMATTED',RECL=0)
++ OPEN(11,FILE='nopo3d.ma23.6',SPEC='UNFORMATTED',RECL=0)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE MA2D3E :
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

HEIGHT OF THE BOTTOM BASIS :  -0.1000000E+01

NUMBER OF GEOMETRIC TRANSFORMATIONS :      1
LIST OF TRANSFORMATIONS :
SECTION      0 TO      5 TYPE OF TRANSFORMATION     -6

NUMBER OF NUMBER TRANSFERS           :      5
LIST OF TRANSFERS      :
SECTION      0 TO      0 TYPE OF TRANSFER           0 :   -100 GIVES      1
SECTION      5 TO      5 TYPE OF TRANSFER           0 :   -100 GIVES      2
SECTION      5 TO      5 TYPE OF TRANSFER           4 :      1 GIVES      4
SECTION      0 TO      5 TYPE OF TRANSFER           3 :      1 GIVES      2
SECTION      0 TO      5 TYPE OF TRANSFER           3 :      2 GIVES      3

MESH OBTAINED : SAVE D.S.

TABLE  N O P 2
--------------
MESH CHARACTERISTICS :

SPACE DIMENSION                        (NDIM ) :      3
MAXIMUM NUMBER OF REFERENCES           (NDSR ) :      4
MAXIMUM NUMBER OF SUB-DOMAINS          (NDSD ) :      1
NODES AND POINTS COINCIDE             (NCOPNP) :      1
NUMBER OF ELEMENTS IN THE MESH         (NE   ) :   1100
NUMBER OF PENTAHEDRA                   (NPENT) :   1100
NUMBER OF BOUNDARY ELEMENTS            (NEF  ) :     72
NUMBER OF NODES                        (NOE  ) :    852
NUMBER OF NODES PER SEGMENT (NO EXTREMITIES)   :      0
TYPE OF COORDINATE VALUES             (NTYCOO) : REEL1MOT
MAX DIFFERENCE +1 BETWEEN 2 NODES OF AN ELEMENT :   271
NUMBER OF COARSE ELEMENTS             (NBEGM ) :      0
NUMBER OF WORDS IN ARRAY NOP5         (LNOP5 ) :  21500
REFERENCE AXIS    X,Y,Z               (NTACOO) :      1

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
END OF MODULE MA2D3E
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
```

As an example of a call by MA23XX, or keyword MA23, of APNOP3, we return partly to chapter 2 (translation case) and then to chapter 5 (a complete example is given with explanations), after which we give the 4 following examples (a listing of the data file, a plot of the 2D starting mesh and a plot of the resulting mesh in each case).

An example (figure 3.19) of translation coupled with a rotation:

```     2                                  \$ IMPRE
engr2d.nopo\$ NOMF2D
engr3d.nopo\$ NOMF3D
\$ ===  DEFINITION OF THE FUNCTION  ===
BASE      0.1000000E+02                          \$ THE BASIS
TRAN
3                                            \$ TOP SECTION
0.0000000E+00  0.0000000E+00  0.4000000E+00     \$ TRANSLATION VECTOR
COMBINE
ROTA
0.2500000E+01                                   \$ ANGLE OF ROTATION
0.0000000E+00  0.0000000E+00  0.0000000E+00     \$ A POINT ON THE AXIS
0.0000000E+00  0.0000000E+00  0.1000000E+01     \$ ROTATIONAL AXIS
FIN
\$ END OF THE FUNCTION DEFINITION
\$ ===========  THE OPTIONS  =========
\$ ===  DESCRIPTION OF THE REFERENCES ===
REF
ARFA     0     3     3     3           \$ TYPE : FROM .. TO .. , .. 2D GIVES .. 3D
ARFA     0     3     2     1           \$ TYPE : FROM .. TO .. , .. 2D GIVES .. 3D
ARFA     0     3     4     2           \$ TYPE : FROM .. TO .. , .. 2D GIVES .. 3D
F
\$ END OF THE REFERENCE DESCRIPTION
\$ =======  CALLING THE MESH GENERATOR  =======
GO
```

engr2d.psfig:maxx1Starting meshengr3d.psfig:maxx11Result

An example (figure 3.21) of complete rotation coupled with gluing the 2 end sections together.

```     2                                  \$ IMPRE
piston2d.nopo\$ NOMF2D
piston3d.nopo\$ NOMF3D
\$ ===  DEFINITION OF THE FUNCTION  ===
BASE      0.0000000E+00                          \$ THE BASIS
ROTA
36                                            \$ TOP SECTION
0.1000000E+02                                   \$ ANGLE OF ROTATION
0.0000000E+00  0.0000000E+00  0.0000000E+00     \$ A POINT ON THE AXIS
0.0000000E+00  0.1000000E+01  0.0000000E+00     \$ ROTATIONAL AXIS
FIN
\$ END OF THE FUNCTION DEFINITION
\$ ===========  THE OPTIONS  =========
COLLER
\$ ===  DESCRIPTION OF THE REFERENCES ===
REF
GLOB     0    36     0     0           \$ TYPE : FROM .. TO .. , BIDON , BIDON
F
\$ END OF THE REFERENCE DESCRIPTION
\$ =======  CALLING THE MESH GENERATOR  =======
GO
```

piston2d.psfig:maxx2Starting meshpiston3d.psfig:maxx21Result

An example of translation and rotation with degeneration.

We will note the creation of pentahedra (and not hexahedra) in the degeneration zone (figure 3.23).

```     2                                  \$ IMPRE
dege2d.nopo\$ NOMF2D
dege3d.nopo\$ NOMF3D
\$ ===  DEFINITION OF THE FUNCTION  ===
XYZ23
0                                  \$ TOP SECTION
1                                  \$ VIA FUNCTION PARSER
X01(N,X,Y)=
X;
Y01(N,X,Y)=
Y;
Z01(N,X,Y)=
0.;
FIN
TRAN
5                                            \$ TOP SECTION
0.0000000E+00  0.0000000E+00  0.5000000E+00     \$ TRANSLATION VECTOR
ROTA
10                                            \$ TOP SECTION
-0.6000000E+01                                   \$ ANGLE OF ROTATION
0.0000000E+00  0.0000000E+00  0.2500000E+01     \$ A POINT ON THE AXIS
0.1000000E+01  0.0000000E+00  0.0000000E+00     \$ ROTATIONAL AXIS
TRAN
15                                            \$ TOP SECTION
0.0000000E+00  0.0000000E+00  0.2500000E+00     \$ TRANSLATION VECTOR
FIN
\$ END OF THE FUNCTION DEFINITION
\$ ===========  THE OPTIONS  =========
VERVOL
\$ ===  DESCRIPTION OF THE REFERENCES ===
REF
FASU     1                             \$ TYPE : NUMBER ASSIGNED
F
\$ END OF THE REFERENCE DESCRIPTION
\$ =======  CALLING THE MESH GENERATOR  =======
GO
```

dege2d.psfig:maxx3Starting meshdege3d.psfig:maxx31Result

An example (figure 3.25 and3.26) of rotation of a section consisting of a line, and thereby the construction of a surface mesh  .

```     2                                  \$ IMPRE
verre2d.nopo\$ NOMF2D
verre3d.nopo\$ NOMF3D
\$ ===  DEFINITION OF THE FUNCTION  ===
BASE      0.0000000E+00                          \$ THE BASIS
ROTA
36                                            \$ TOP SECTION
-0.1000000E+02                                   \$ ANGLE OF ROTATION
0.0000000E+00  0.0000000E+00  0.0000000E+00     \$ A POINT ON THE AXIS
0.1000000E+01  0.0000000E+00  0.0000000E+00     \$ ROTATIONAL AXIS
FIN
\$END OF THE FUNCTION DEFINITION
\$ ===========  THE OPTIONS  =========
COLLER
\$ =======  CALLING THE MESH GENERATOR  =======
GO
```

verre2d.psfig:maxx4-1Starting meshverre3d.psfig:maxx4-2Result

Next: 3.4 Method for a hexahedral topology Up: 3.3 Extrusion method (cylindrical topology) Prev: 3.3.5 The preprocessor MA23XX Index Contents