anchor.diff:          endif
           ! Maximum (effective) shear stress: estress
           if (estress_file.ne.'') then
  -            call calc_estress(estress,stress)
  +            call max_shear_stress(estress,stress)
               write(121,*) stations(iSta,:),estress
           endif
       endif
  
positive.code: write(stderr,*)
  write(stderr,*) '-flt FLTFILE         Triangular source faults'
  write(stderr,*) '-sta STAFILE         Station/receiver locations'
  write(stderr,*) '-trg TRGFILE         Target/receiver kinematics'
  write(stderr,*) '-haf HAFSPCFILE      Elastic half-space properties'
  write(stderr,*) '-disp DSPFILE        Displacement (E N Z)'
  write(stderr,*) '-strain STNFILE      Strain matrix (EE NN ZZ EN EZ NZ)'
  write(stderr,*) '-stress STSFILE      Stress matrix (EE NN ZZ EN EZ NZ)'
  write(stderr,*) '-estress ESTSFILE    Effective (maximum) shear stress'
  write(stderr,*) '-normal NORFILE      Normal traction on target faults (requires -trg)'
  write(stderr,*) '-shear[max] SHRFILE  Shear traction on target faults (requires -trg)'
  write(stderr,*) '-coul COULFILE       Coulomb stress on target faults (requires -trg)'
  write(stderr,*) '-geo|-xy             Use geographic (default) or cartesian coordinates'
  write(stderr,*)
  
  stop
  end subroutine usage
  
negative.code: module triutil
  
  character(len=512) :: fault_file        ! source fault file
  character(len=512) :: station_file      ! station location file
  character(len=512) :: target_file       ! target/receiver fault geometry file
  character(len=512) :: halfspace_file    ! half-space parameter file
  character(len=512) :: displacement_file ! displacement file
  character(len=512) :: strain_file       ! strain tensor file
  character(len=512) :: stress_file       ! stress tensor file
  character(len=512) :: estress_file      ! effective (maximum) shear stress file
  character(len=512) :: normal_file       ! normal stress file
  character(len=512) :: shear_file        ! shear & maximum shear stress file
  character(len=512) :: coulomb_file      ! Coulomb stress
  logical :: isFaultFileDefined           ! Boolean for fault_file
  logical :: isStationFileDefined         ! Boolean for station_file
  logical :: isTargetFileDefined          ! Boolean for target_file
  logical :: isOutputFileDefined          ! Boolean for deformation output
  logical :: iWantDisp                    ! Boolean for calculating displacement
  logical :: iWantStrain
  logical :: iWantStress
  logical :: iWantTraction
  