anchor.diff:  !==============================================================================
   !  Convert a 3x3x3x3 elasticity tensor to a 6x6 tensor
   !  Lifted from cijkl2cij, MATLAB code by J. Wookey.
  -   
  +
        implicit none
        real(rs),intent(in)  :: CC(3,3,3,3)
        real(rs)             :: cijkl2Cij(6,6)
        real(rs)             :: C(6,6)
        integer              :: im,jm,km,lm,iv,jv
  -     
  +
        C = 0.
        do im=1,3
          do jm=1,3
  
positive.code:       real(rs),intent(out) :: Cout(6,6),rhout
        real(rs) :: mu,lam,K,C0(6,6),mui,lami,ki,M,kappa,U1,U3,e,C1(6,6)
        integer :: i,j
        
  !  Weighted average of densities
        rhout = (1._rs-phi)*rho + phi*rhoi
        
  !  Properties of isotropic medium
        mu = rho*vs**2
        lam = rho*(vp**2 - 2*vs**2)
  
negative.code:       C = phi*A
        F = A - 2._rs*L
        C12 = A - 2._rs*N
  
        CIJ_panning_VTI = reshape( &
              (/ A , C12, F, O, O, O, &
                C12,  A , F, O, O, O, &
  