next up previous contents
Next: 2. Data flow Up: sgv_refman Previous: Contents   Contents


1. PATCHY structure of SGV.

The structure of the file SGV.CAR might be a bit bewildering at first sight. In fact, it consists of a first section which automatically extracts the various parts of the program, both on VMS and on UNIX. Hence, from the point of view of the operating system, SGV.CAR looks like a command-file (VMS) or a korn shell-script (UNIX). 1.1

When executing SGV.CAR (as a command-file), it will extract (using patchy) from itself (but as a card-format pam file) the various pam-files, command- files, and input-files, and the manual You are reading right now. It will also use the extracted pam-files, and one of the command-files, to create the object-libraries. Hence, SGV.CAR is a pam-file containing pam-files. Here, the trick to be able to do this is to use the feature to change characters in position 1 when running YTOBIN. Hence, there are first level patchy control-cards starting with '+', and second-level ones starting with '&'. These second level cards will become the steering cards in the extracted pam-files SGVALL.CAR and SGVUSER.CAR.

SGV.CAR contains the patches

  TEXTTAGS
  INFO
  SGVPIL
  INSTALL
  STEER
  EVSIM
  DETSIM
  TRKER
  ANA
  UTIL
  EXAMP
and is sub-divided by conditional parts :
   USER
   EVSIM
   LIB
   PINFO
   DINFO
   DINFOTAG
   STRUCLIS
   UGTAG
   RMTAG

SGVALL.CAR is created by activating all the patches, and selecting the conditional material flagged by USER, LIB, DINFO and PINFO. This selects all code, and all documentation, but without TeX markup.

SGVUSER.CAR is creted by activting TEXTTAGS, SGVPIL, ANA, and DETSIM and selecting USER, DINFO and PINFO.

SGVEVSIM.CAR is creted by activting TEXTTAGS, SGVPIL, EVSIM and selecting USER, DINFO and PINFO.

The user's guide is creted by activating TEXTTAGS and the deck UG in the patch INFO, and by selecting UGTAG, which ativates TeX mark-up. In addition, the deck ZACDE of the patch SGVANA in SGVALL.CAR is acivated.

Finally, the reference manual (this document) is creted in four steps:

First the initial chapters ar selected the same way as the users-guide, except that instead the deck REFMAN is activated, and RMTAG, rather than UGTAG, is selected. The deck ZXCDE of the patch SGVSTEER in SGVALL.CAR is acivated.

Then the call-structure is extracted from the routine header-comments, by activating INFO, TEXTTAGS, and SGV, and selecting STRUCLIS.

The third part is extracted the same way as the first, but instead activating the deck ROUTS of the patch INFO.

Finally, the routine descriptions are extracted the same way as the call-structure, by selecting DINFO, PINFO, and DINFOTAG rather than STRUCLIS.

The four parts are then joined at the OS level.

SGVALL.CAR contains the patches

   *SGVDUM
   *SGVDEF
   *SGVLIB
   INFO
   INSTALL
   SGVCDE
   SGVSTEER
   SGVEVSIM
   SGVDETSIM
   SGVTRKER
   SGVANA
   SGVANAUTL
   GENUTL
   EXAMPLES

and SGVUSER.CAR contains the patches

   *SGVDUM
   *SGVDEF
   SGVSTEER
   SGVEVSIM
   SGVDETSIM
   SGVANA

The main code-patches are SGVSTEER, SGVEVSIM, SGVDETSIM, SGVTRKER, and SGVANA (with utilities in SGVANAUTL and GENUTL). They are more or less separate objects, with no, or minimal communication via common-blocks, and with only a few well-defined algorithmic connections. See bellow in chapter 2 and chapter 4 .

Note that the patches with the same names in SGVUSER and SGVALL do not contain the same decks : there are decks in SGVALL that do not appear in SGVUSER. This is the effect of the conditional material in SGV.CAR. This way, the user pamfile has the same logical patch structure as the full pam-file, but containing ONLY the routines that user might want to change. This greatly facilitates the work of the user, (the important routines are not 'needles in a hay-stack'), and also reduces the needed disk-space on user areas.

There are three libraries created by the install procedure by selecting different pilot-patches in SGVALL.CAR or SGVUSER.CAR :

  *SGVLIB    extracts the standard library from SGVALL.CAR
  *SGVDEF       "      "      "    defaults library from SGVUSER.CAR
  *SGVDUM       "      "      "    dummy library from SGVUSER.CAR

SGVLIB contains the code that the user normally would not touch, SGVDEF the code that the user might want to modify, but that by default performs non-trivial calculations, and SGVDUM contains dummy routines that the user might want to fill with meaning. The code of the latter two is what is in the PAM file SGVUSER.CAR.

All routines contains lengthy header-comments. These are never patchy selected, so they will not waste space on the fortran-files. Hence, the PAM-file listings (where the full comments are included), rather than the fortran-files, should be used for closer study of the code.

The various command files are created by selecting the appropriate decks in the patch INSTALL of SGVALL.CAR, the sample title-file by selecting the deck TITLE in the patch EXAMPLES, and the sample geometry file by selecting the deck GEOMETRY in the same patch.

Note that once SGV is installed, SGV.CAR can be removed; the pam-files used are SGVALL.CAR and the user-pamfile.


next up previous contents
Next: 2. Data flow Up: sgv_refman Previous: Contents   Contents
Mikael Berggren 2003-03-27