anchor.diff:                       ! First get the wave amplitude -- must be reconstructed from the WaveElevC0 array.  First index is the real (1) or
                        ! imaginary (2) part.  Divide by NStepWave2 to remove the built in normalization in WaveElevC0.  Note that the phase
                        ! shift associated with the (x,y) location is accounted for by the WaveElevxyPrime0 variable.
  -!                  WaveElevC_n = CMPLX( InitInp%WaveElevC0(1,n), InitInp%WaveElevC0(2,n)) / InitInp%NStepWave2
  -!                  WaveElevC_m = CMPLX( InitInp%WaveElevC0(1,m), InitInp%WaveElevC0(2,m)) / InitInp%NStepWave2
                     WaveElevC_n =  WaveElevC0Norm(n)
                     WaveElevC_m =  WaveElevC0Norm(m)
    
  
positive.code:                   D_plus      =  TransFuncD_plus(n,m,k_n,k_m,R_n,R_m)
  
                       !> Calculate the value of 
                       !!    \f$ L^+_{nm} = \frac{1}{4} \left[ 
                       !!             \frac{D^+_{nm} - |\vec{k}_n| |\vec{k}_m| \cos(\theta_n - \theta_m) + R_n R_m}{\sqrt{R_n R_m}}
                       !!          +  (R_n+R_m) \right] \f$
                       !!
                       !!    The value of \f$ D^-_{nm} \f$ is found from by the ::TransFuncD_plus routine.
                    L_plus  =  (( D_plus - k_n * k_m * COS(D2R*InitInp%WaveDirArr(n) - D2R*InitInp%WaveDirArr(m)) + R_n * R_m )/SQRT( R_n * R_m ) + R_n + R_m) / 4.0_ReKi
  
                       !> Calculate the dot product of the wavenumbers with the (x,y) location
                       !! This is given by:
  
negative.code: 
  
                 ! Calculation of B_minus
              TransFuncB_minus  =  InitInp%Gravity*InitInp%Gravity / ( 8.0_ReKi * Omega_n * Omega_m ) &          
                                   * COSHNumOvrCOSHDen(k_nm, InitInp%WtrDpth, z)  * D_minus / ( Omega_n - Omega_m )       ! 4.0_ReKi
  
  
           ENDIF
  