Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 4.4 Compiling and linking Up: 4 Generalities Prev: 4.2 The non-portable subroutines Contents


4.3 Selecting the graphic peripherals

 

4.3.1 Generalities: Fortran 3D MODULEF interface

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.

4.3.2 Creating FORTRAN subroutines itrctg and perfgn

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 brochure
[4][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:

  1. Select the graphic peripherals:

    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.

  2. Compile and link periph.c (assume hereafter that the name of the corresponding executable program is periph).

  3. Create subroutines itrctg and perfgn:

    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:

    Remark: input and output indicate respectively the input and output files.

  4. Store the resulting 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.

Command file prf_f3d

 

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:

  1. Print or file type.

    This argument can have the following values:

  2. copy option -nc or -c
  3. delete option -d or -nd
  4. file name or identifier of X_window if hardcopyX11
  5. not used

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.


Modulefpreviousupnextcontents[BIG][Normal][small]
Next: 4.4 Compiling and linking Up: 4 Generalities Prev: 4.2 The non-portable subroutines Contents