3. How DEFI_FICHIER works#

The inputs/outputs on files ASCII from the Code_Aster are mostly carried out using FORTRAN instructions using the concept of logical unit, it is an integer varying from 1 to 99 associated with a file using an « open » instruction using an « open » instruction. By default this number xx is associated with the name fort.xx, but it is possible to associate it with any file name. The logical unit number is used in the astk code access interface to copy input and output files.

In the Aster command file, the various operators that perform reads or writes take the UNITE keyword as an argument.

The logic unit 6 is reserved by the code during the initialization phase. It is not allowed to modify this logical unit number 6, which makes it possible to trace the progress of an execution.

logical unit

file name

modification allowed

6

MESSAGE

no

The user may want to add or edit associations using the DEFI_FICHIER procedure to use new file names, for example, to print certain results, or to otherwise group them into files. The procedure DEFI_FICHIER also makes it possible to directly designate the file of type ASCII that will be associated with the specified logical unit. It can be specified either by an absolute name (limited to 255 characters) if the file is located on the machine, or by a relative name in an agreed directory (. /REPE_IN or. /REPE_OUT) when the interface is responsible for the remote and global transfer of all files located under the directory (type repe in astk). A named Fortran OPEN is then created on ASCII files. The command also allows you to position yourself either at the head of the file or at the end of the file.

The code internally manages a data structure grouping together all the associations: logical unit - file name - file type - access type.