anchor.diff:  dens = 1.0d0
   vp = dsqrt((lambda+2.0d0*shear_modulus)/dens)
   vs = dsqrt(shear_modulus/dens)
  -call o92pt(ux,uy,uz,xin,yin,stdp,evdp,dipin,rakin,area,slip,vp,vs,dens)
  -write(0,*) ux,uy,uz
  +! call o92pt(ux,uy,uz,xin,yin,stdp,evdp,dipin,rakin,area,slip,vp,vs,dens)
  +! write(0,*) ux,uy,uz
   call o92ptstn(strain,xin,yin,stdp,evdp,dipin,rakin,area,slip,vp,vs,dens)
   write(0,*) strain(1,:)
   write(0,*) strain(2,:)
  
positive.code: write(0,*) 'okada92_module unit test passed'
  end
  
  
  
  subroutine test_value(value,string)
  implicit none
  double precision :: value
  character(len=*) :: string
  if (dabs(value).gt.1.0d-10) then
      write(0,*) 'tri_disloc unit test failed for '//trim(string)
      stop
  else
      write(0,*) 'tri_disloc unit test passed for '//trim(string)
  
negative.code: double precision :: disp(3), strain(3,3), sta_coord(3), evdp, dip, moment(4), lambda, shear_modulus
  double precision :: ux,uy,uz,xin,yin,stdp,dipin,rakin,area,slip,vp,vs,dens
  double precision :: uxx, uxy, uxz, uyx, uyy, uyz, uzx, uzy, uzz
  
  ! Example from Okada (1985) for surface deformation
  lambda = 40.0d0
  shear_modulus = 40.0d0
  call halfspace_vars(lambda,shear_modulus)
  call test_value(a,0.66666666666666663d0,'halfspace_vars(): a')
  call test_value(CA1,0.16666666666666669d0,'halfspace_vars(): CA1')
  call test_value(CA2,0.33333333333333331d0,'halfspace_vars(): CA2')
  call test_value(CB,0.50000000000000011d0,'halfspace_vars(): CB')
  call test_value(CC,0.33333333333333337d0,'halfspace_vars(): CC')
  write(0,*) 'subroutine halfspace_vars() passed unit test'
  write(0,*)
  
  dip = 70.0d0
  call dip_vars(dip)
  call test_value(sd,0.93969262078590832d0,'dip_vars(): sd')
  call test_value(cd,0.34202014332566882d0,'dip_vars(): cd')
  call test_value(s2d,0.64278760968653947d0,'dip_vars(): s2d')
  call test_value(c2d,-0.76604444311897790d0,'dip_vars(): c2d')
  call test_value(sdsd,0.88302222155948884d0,'dip_vars(): sdsd')
  call test_value(cdcd,0.11697777844051105d0,'dip_vars(): cdcd')
  call test_value(cdsd,0.32139380484326974d0,'dip_vars(): cdsd')
  write(0,*) 'subroutine dip_vars() passed unit test'
  write(0,*)
  
  