C     INCLUDE 'pfatubes.inc'
C     Declaration of the common blocks used through PFATUBES program:
C Version: 7.00
C Date: 2013, May 20
C Coded by Petr Bulant
C     Department of Geophysics, Charles University Prague,
C     Ke Karlovu 3, 121 16 Praha 2, Czech Republic,
C     http://sw3d.cz/staff/bulant.htm
      INCLUDE 'ram.inc'
C     ram.inc.
      PARAMETER (NQ=11)
C     Output format:
     *            IFORM,FORMAT
      SAVE  /PTCB/
C     ------------------------------------------------------------------
C     MRAM ...Dimension of the arrays IRAM, RAM.
C     NRAMP...Number of used records in arrays IRAM, RAM.
C     MRAMP...Maximum number of records for points in arrays IRAM, RAM.
C     IRAM(1 : 6*NT), where NT is a number of triangles ...
C             Indices of the rays forming the homogeneous triangles
C             in the ray-parameter domain, than three "indices of sides"
C             of the triangle.
C     IRAM(6*NT+1 : 7*NT) ... indices of triangles sorted according to
C             the indices of the rays forming the triangles, i.e. the
C             triangle formed by rays with the lowest indices is located
C             in IRAM(IRAM(6*NT+1):IRAM(6*NT+1)+2), the triangle formed
C             by rays with the highest indices is located in
C             IRAM(IRAM(7*NT):IRAM(7*NT)+2)
C     IRAM(7*NT+1 : 7*NT+NR), where NR is a number of rays ...
C             "Deleting array" containing the information about when
C             can be the rays erased from memory. Each record of the
C             array corresponds to one ray. The record
C             describes the last triangle where the ray is used;
C             it displays the highest index of the rays of the
C             last triangle.
C             Zero for the rays, which will not be used.
C     IRAM(7*NT+NR+1 : 7*NT+2*NR+1) ... "Addressing array" containing
C             the addresses of the ends of individual
C             records for rays in the array [I]RAM.
C             If the ray have not yet been read into memory, zero.
C             If the ray was already read but is no longer stored in
C             the memory, the address of previous ray stored in memory.
C             To enable reading of the ray IRAYMI, address of the ray
C             IRAYMI-1 is set to 7*NT+2*NR+1 and stored as the first ray
C     [I]RAM(7*NT+2*NR+2 : 7*NT+2*NR+2+JR, ...) JR parameters of a ray,
C             where JR=address of the ray - address of the previous ray;
C             or JR=number of points on the ray * NQ.
C     NT ...  Number of triangles.
C     NR ...  Number of rays, which may be used in some triangle.
C     NQ ...  Number of quantities recorded for each point on a ray.
C             The quantities represent:
C             1. X1-coordinate.
C             2. X2-coordinate.
C             3. X3-coordinate.
C             4. Index of the surface at which the endpoint of the
C                computed element of the ray is situated, zero for
C                endpoint situated inside complex block.
C             5. Sequential index of a point.
C             6. - 11. Complex-valued polarization vector:
C               6. First component, real part
C               7. First component, imaginary part
C               8. Second component, real part
C               9. Second component, imaginary part
C              10. Third component, real part
C              11. Third component, imaginary part
C     ORAYE . When substracting this number from the index of a ray,
C             we get the position of the ray in "deleting array".
C     ORAYA . When substracting this number from the index of a ray,
C             we get the position of the ray in "addressing array".
C             Address of the ray with index IRAY: IRAM(IRAY-ORAYA)
C             Parameters of the ray with index IRAY:
C                    from   RAM(IRAM(IRAY-ORAYA-1)+1)
C                    to     RAM(IRAM(IRAY-ORAY).
C     IRAYMI,IRAYMA ... Minimum and maximum of indices of rays.
C     L3D ... L3D=.TRUE. indicates a 3-D computation.
C     L2D ... L2D=.TRUE. indicates a 2-D computation.