





![[BIG]](../icons/zoom18.gif)
![[Normal]](../icons/zoom14.gif)
![[small]](../icons/zoom10.gif)
Next: 1.7 Modules - Algorithms - Utilities
Up: 1 General
Prev: 1.5 Dynamic arrays
Index
Contents
The modules communicate with each other via standardized Data Structures (DS).
They are processed in blocks by utility subroutines to ensure simple manipulation.
A DS may reside:
- in main memory,
-
in the form of a set of dynamic arrays,
- in secondary memory,
-
in the form of a file
(an unformatted Fortran file consisting of several records).
Amongst the numerous advantages of Data Structures, let us note the following:
- The interfaces between modules are standardized, simple and reliable.
- The number of parameters per module is reduced.
In fact, a DS reorganizes a large amount of information, as for example the
complete mesh definition.
- The programming of modules is facilitated by predefined reading, writing and printing tools.
All Data Structures have a type, for example
NOPO, MAIL, COOR, or B.
The different arrays belonging to a DS of a given type are described in part
iii of this user guide.
If a DS is of a generic type, tysd,
it can be manipulated in a module via the following variables:
- CHARACTER*80 NOMFIC
- :
The file name
(see [Fortran 77],
command: OPEN, specifier: FILE).
- INTEGER NFtysd
- :
The file unit number
(see [Fortran 77],
command: OPEN, specifier: UNIT).
NFtysd = 0 signifies that the DS is in main memory.
- INTEGER NItysd
- :
An integer, called the level, which enables us to
distinguish between two Data Structures of the same type, residing
in main memory at the same time.
Remarks:
- Experience has shown that the Fortran command, OPEN, is not totally portable.
Consequently, this instruction is not allowed in MODULEF
and utility OUVRIR
(p.
)
or OUVRIS (p.
) is called instead.
- Programs manipulating files often require a free unit number, i.e. not assigned to any other file.
Utility, TRUNIT
(p.
)
is used to obtain such a number.
To conclude, the calling of a module which requires, for example, a NOPO type DS
typically has the following form:
...
CALL TRUNIT(NFNOPO)
NINOPO = 0
CALL LIBCAR(NOMFIC)
CALL OUVRIS(NFNOPO, NOMFIC, 'OLD,UNFORMATTED', 0)
CALL MODULE(M, NFNOPO, NINOPO, ...)
...






![[BIG]](../icons/zoom18.gif)
![[Normal]](../icons/zoom14.gif)
![[small]](../icons/zoom10.gif)
Next: 1.7 Modules - Algorithms - Utilities
Up: 1 General
Prev: 1.5 Dynamic arrays
Index
Contents