C
C     INCLUDE 'rparc.inc'
C     ------------------------------------------------------------------
      INTEGER LURPAR,IRAY0,JRAY,JTYPE
      REAL G1,G2,X1,X2,X1G1,X2G1,X1G2,X2G2
      COMMON/RPARC/LURPAR,IRAY0,JRAY,JTYPE,
     *             G1,G2,X1,X2,X1G1,X2G1,X1G2,X2G2
      SAVE /RPARC/
C     ..................................................................
      INTEGER MRPARH
      PARAMETER (MRPARH=10000)
      INTEGER JPOINT,KMAH,INDMIN,NRPARH,IRPARH(0:MRPARH)
      COMMON/RPARH/JPOINT,KMAH,INDMIN,NRPARH,IRPARH
      SAVE /RPARH/
C     ------------------------------------------------------------------
C
C     LURPAR..Logical unit number of the external input device
C             containing the input data.
C     IRAY0...Difference IRAY0=IRAY-JRAY between index of a ray within
C             the elementary wave, and the index within one shooting
C             domain.
C     JRAY... Reference index of the ray within one shooting domain
C             (not within one elementary wave).
C     JTYPE...Reserved for future use.
C     G1,G2...Normalized shooting parameters.  Here, normalized means
C             that the shooting domain is (0,1)*(0,1) in the normalized
C             shooting parameters.
C             For one-parametric shooting:
C               G1,G2: multiplied by ANUM and BNUM, respectively.
C               G1: the first, shooting parameter.
C               G2: the second, fixed parameter.
C     X1,X2...Values of the X-functions at the point of intersection
C             with the reference surface (e.g., two selected coordinates
C             of the point of intersection).
C     X1G1,X2G1,X1G2,X2G2... Derivatives of the X-functions with respect
C             to the normalized shooting parameters.
C
C     JPOINT..The number of crosssections of the computed ray with the
C             surface ISRFR.  Because, for the structural interfaces,
C             the positive or negative side of the surface is specified,
C             either zero or two crosssections correspond to the
C             reflection from the surface ISRFR.
C     KMAH... KMAH index (number of caustic points along the ray) at the
C             reference surface.  Zero if the ray does not reach the
C             reference surface.
C     INDMIN..Absolute value of the ray-history index minus the
C             location of the corresponding ray history in the array
C             IRPARH of the common block /RPARH/.
C     NRPARH..Index in the array IRPARH of the last element of the
C             history of the computed ray, see below.
C     IRPARH..Array containing different histories of rays.  Under the
C             ray history we understand here the block-surface code (see
C             the file 'code.for') describing the behaviour of
C             individual rays, complemented by the indication IEND
C             specifying the reason of the termination of the
C             computation of the ray (see the subroutine RAY2 of the
C             file 'ray.for').
C             IRPARH(0)... Number of different ray histories encountered
C               yet.
C             IRPARH(I),I=1,...,IRPARH(0)... Indices in the array IRPARH
C               of the last elements of individual ray histories.
C             IRPARH(I),I=IRPARH(0)+1,...,IRPARH(IRPARH(0))...
C               Individual encountered ray histories.
C             IRPARH(I),I=IRPARH(IRPARH(0)),...,NRPARH... History of the
C               computed ray.  After finishing computation of the ray,
C               it is compared with the recorded histories.  If it
C               appears to be a new history, it is recorded, otherwise
C               it is forgotten.
C             If the array IRPARH is too small to keep all different ray
C             histories corresponding to the computed elementary wave,
C             the oldest histories are forgotten.
C
C     Common block /RPARC/ is included in external procedures RPAR1,
C     RPAR2, RPAR32, and RPAR4 of 'rpar.for', in 'scropc.for'.
C
C     Common block /RPARH/ is included in external procedures RPAR2,
C     RPAR31, RPAR32, IHIST, and SRPARH of 'rpar.for'.
C
C Date: 1997, December 5
C Coded by Ludek Klimes
C
C=======================================================================
C