Next: 4.4 Compiling and linking Up: 4 Generalities Prev: 4.2 The non-portable subroutines Contents
The MODULEF graphical output is performed with the help of the FORTRAN 3D graphics software.
The link between FORTRAN 3D and the input and output terminals is realized by the FORTRAN subroutines itrctg and perfgn. These two subroutines thus serve as the interface between FORTRAN 3D and your basic graphics software.
Subroutines itrctg and perfgn contain the list of graphic peripherals available, i.e. those you may select for your graphical output. The choice of peripherals is left to the installer. In fact, it is strongly linked to the installation site: host machine (Sun, HP/Apollo, VAX-VMS ...), graphics terminals (tektronix, laser printer ...), ...
As some graphic peripherals can use system functions, it is necessary to select the system libraries to be included when linking, as a function of the graphic peripherals chosen. Similarly, a bad choice of graphic peripherals could result in incorrect linking (unsatisfied references).
We will now see how the source files of subroutines itrctg and perfgn are created.
If you dispose of a machine equipped with a C compiler, these two sub-programs can be generated automatically; this process is explained in this section.
On the other hand, if your machine is not equipped with a C compiler, you would have to
create these files manually; in this case you can consult files
itrctg and perfgn contained in directory p_l machine name, as well as
[MODULEF User Guide - 6] (chapter 9 and 10).
In the rest of this section all the file names corresponding to FORTRAN programs will have .for as suffix.
The files used to create itrctg and perfgn are called: periphin.in and periph.c. The first contains the list of all the graphic peripherals available in MODULEF. The second is a C program which is used to generate the FORTRAN subroutines itrctg and perfgn.
The steps to follow to generate these two FORTRAN subroutines are the following:
We need to edit file periphin.in and give the list of peripherals which we wish to use in the appropriate line.
The list and role of all the graphic peripherals available in MODULEF is given at the top of file periphin.in. It suffices to choose between the peripherals cited.
File periphin.in must be input via the standard input device of periph, the options allowing us to choose the subroutines FORTRAN we wish to create. The executable, periph, redirects the output to the standard output device (the screen). It can therefore be interesting to redirect the standard output to a file during execution.
An example of use:
input( periphin.in) periph -itrctg output( itrctg.for)
input( periphin.in) periph -perfgn output( perfgn.for)
Remark: input and output indicate respectively the input and output files.
The FORTRAN subroutines can be stored in directory p_l machine name. It is also necessary to recopy the include file data_f3d.ins into this directory.
It remains to compile this library ( p_l machine name).
For multi-machine tapes, files periphin.in and periph.c are stored in library COMMANDE.
If you received a VAX/VMS tape, these two file are stored in directory C.
If more details regarding the FORTRAN 3D software and interface programs are desired, consult brochure [MODULEF User Guide - 6].
The manner in which PostScript printouts and hard-copies are generated is described below.
This command file is executed using FORTRAN 3D, and is used to generate a plot.
Command prf_f3d needs to be adapted on site once the graphic peripherals, such as the plotter or postscript printers or X11, have been selected and a hard-copy is desired. This command is called with five arguments:
This argument can have the following values:
The values which follow are never used except if the Apollo graphic peripherals are chosen.
The command generating the output on the plotter or printer must be specified following the argument values indicated above.
This command file is given in the shell script form, and depending on the type of tape received (multi-machine or backup VAX/VMS) is found in directory COMMANDE or C, respectively. For further details, please consult Appendix G.