# History file 'len-cone.h' to perform initial-value ray tracing
# of the cone of rays in the model with a LENticular inclusion
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Input files required
  chk.pl: "data/len/" "len-mod.dat"
  chk.pl: "data/len/" "lenc-rpa.dat"
  chk.pl: "data/len/" "lenc-src.dat"
  chk.pl: "data/len/" "len-crt.dat"
  chk.pl: "crt/"      "codep.dat"
  chk.pl: "crt/"      "writall.dat"
  chk.pl: "data/len/" "lenc-ftt.dat"
# Output file of 'len-mod.h' used here as an input file
  chk.pl:  ""          "len-srf.wrl"  # VRML
# chk.pl: ""          "len-srf.mx"    # GOCAD

# Model
  MODEL='len-mod.dat'

# Point source, initial direction of the cone of rays
  SRC='lenc-src.dat' INIDIR=1

# Data filenames for crt.for
  DCRT='len-crt.dat'
  RPAR='lenc-rpa.dat'
  CODE='codep.dat'      # just refracted P wave
  WRIT='writall.dat'    # all rays stored in files
  CRTLOG='lenc-log.out'

# Kind of ray parameters (for details see 'init.for')
  INIPAR=3

# Ray tracing of the refracted wave
  crtscro=swrapheg
  crt:

# End points of rays for travel-time derivatives
# File 'lenc-pts.out' should be used to create file 'lenc-ftt.dat',
# which may be system-dependent due to the rounding errors.
  PTS='lenc-pts.out'
  NQ=4
  KALL=1
  crtpts:

# Derivatives of the travel times with respect to the model
# B-spline coefficients
  PTS='lenc-pts.out' PTS1='lenc-src.dat'
  FTT='lenc-ftt.dat'
  DIST=0.01
  ICLASS=0 GM1='gm10.out'  # derivatives with respect to all parameters
  invtt:
  ICLASS=1 GM1='gm11.out'  # derivatives w.r.t. parameters of interfaces
  invtt:
  ICLASS=2 GM1='gm12.out'  # derivatives w.r.t. material parameters
  invtt:

# Rewriting the rays into a formatted file
  RAYS='lenc-ray.out'
  crtray:

# Adding the rays into the VRML or GOCAD file with surfaces
  VRML='VRML2'  WRL='len-srf.wrl'  WRLOUT='lenc-ray.wrl'  # VRML
# VRML='GOCAD'  WRL='len-srf.mx'   WRLOUT='lenc-ray.mx'   # GOCAD
  LIN='lenc-ray.out'
# Setting blue colour for rays
  KOLLIN=0  R=0.00  G=0.00  B=1.00
  NAME='Rays'  PROPERTIES=' '       # just for GOCAD
  linwrl:

# Adding source and ray endpoints into the VRML or GOCAD file
  WRL='lenc-ray.wrl'  # VRML
# WRL='lenc-ray.mx'   # GOCAD
  PTS='lenc-src.dat'
  KOLPTS=0  R=1.00  G=0.00  B=1.00
  NAME='Source'  PROPERTIES=' '     # just for GOCAD
  ptswrl:
  PTS='lenc-pts.out'
  KOLPTS=0  R=1.00  G=1.00  B=1.00  SHIFT3=0.001
  NAME='Endpoints'  PROPERTIES=' '  # just for GOCAD
  ptswrl:

# ======================================================================


# Output VRML or GOCAD file containing 3-D sculptures of rays
# and interfaces
# lenc-ray.wrl or lenc-ray.mx
