anchor.diff:  
      HD_Start = y_FAST%Lin%Modules(Module_HD)%Instance(1)%LinStartIndx(LIN_INPUT_COL) 
   
  -END FUNCTION Indx_u_HD_Distrib_Start
  -!----------------------------------------------------------------------------------------------------------------------------------
  -!> This routine returns the starting index for the u_HD%Morison%LumpedMesh mesh in the FAST linearization inputs.
  -FUNCTION Indx_u_HD_Lumped_Start(u_HD, y_FAST) RESULT(HD_Start)
  -   TYPE(FAST_OutputFileType),      INTENT(IN )  :: y_FAST           !< FAST output file data (for linearization)
  -   TYPE(HydroDyn_InputType),       INTENT(IN )  :: u_HD             !< HD Inputs at t
  -
  -   INTEGER                                      :: HD_Start         !< starting index of this mesh in HydroDyn inputs
  -
  -   HD_Start = Indx_u_HD_Distrib_Start(u_HD, y_FAST) 
  -   if (u_HD%Morison%DistribMesh%committed) HD_Start =  HD_Start + u_HD%Morison%DistribMesh%NNodes * 18  ! 6 fields (MASKID_TRANSLATIONDISP,MASKID_Orientation,MASKID_TRANSLATIONVel,MASKID_ROTATIONVel,MASKID_TRANSLATIONAcc,MASKID_ROTATIONAcc) with 3 components
  -
  -END FUNCTION Indx_u_HD_Lumped_Start
  -!----------------------------------------------------------------------------------------------------------------------------------
  -!> This routine returns the starting index for the u_HD%Mesh mesh in the FAST linearization inputs.
  +END FUNCTION Indx_u_HD_Morison_Start
  +!----------------------------------------------------------------------------------------------------------------------------------
  +!> This routine returns the starting index for the u_HD%WAMITMesh mesh in the FAST linearization inputs.
   FUNCTION Indx_u_HD_PlatformRef_Start(u_HD, y_FAST) RESULT(HD_Start)
      TYPE(FAST_OutputFileType),      INTENT(IN )  :: y_FAST           !< FAST output file data (for linearization)
      TYPE(HydroDyn_InputType),       INTENT(IN )  :: u_HD             !< HD Inputs at t
   
      INTEGER                                      :: HD_Start         !< starting index of this mesh in HydroDyn inputs
   
  -   HD_Start = Indx_u_HD_Lumped_Start(u_HD, y_FAST) 
  -   if (u_HD%Morison%LumpedMesh%committed)  HD_Start =  HD_Start + u_HD%Morison%LumpedMesh%NNodes * 18  ! 6 fields (MASKID_TRANSLATIONDISP,MASKID_Orientation,MASKID_TRANSLATIONVel,MASKID_ROTATIONVel,MASKID_TRANSLATIONAcc,MASKID_ROTATIONAcc) with 3 components
  +   HD_Start = Indx_u_HD_Morison_Start(u_HD, y_FAST) 
  +   if (u_HD%Morison%Mesh%committed)  HD_Start =  HD_Start + u_HD%Morison%Mesh%NNodes * 18  ! 6 fields (MASKID_TRANSLATIONDISP,MASKID_Orientation,MASKID_TRANSLATIONVel,MASKID_ROTATIONVel,MASKID_TRANSLATIONAcc,MASKID_ROTATIONAcc) with 3 components
   
      END FUNCTION Indx_u_HD_PlatformRef_Start
   !----------------------------------------------------------------------------------------------------------------------------------
   !> This routine returns the starting index for the y_HD%Morison%DistribMesh mesh in the FAST linearization outputs.
  -FUNCTION Indx_y_HD_Distrib_Start(y_HD, y_FAST) RESULT(HD_Start)
  +FUNCTION Indx_y_HD_Morison_Start(y_HD, y_FAST) RESULT(HD_Start)
      TYPE(FAST_OutputFileType),      INTENT(IN )  :: y_FAST           !< FAST output file data (for linearization)
      TYPE(HydroDyn_OutputType),      INTENT(IN )  :: y_HD             !< HD Outputs at t
   
  
positive.code:    if ( p_FAST%CompHydro == Module_HD ) then ! HydroDyn-{ElastoDyn or SubDyn}
           
        !===================================================   
        !  y_ED%PlatformPtMesh and u_HD%Morison%DistribMesh
        !===================================================    
           
              ! Transfer ED motions to HD motion input (HD inputs depend on previously calculated HD inputs from ED):
    
           call Linearize_Point_to_Line2( y_ED%PlatformPtMesh, u_HD%Morison%DistribMesh, MeshMapData%ED_P_2_HD_M_L, ErrStat2, ErrMsg2 )
              call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
           ! HD is destination in the mapping, so we want M_{tv_uD} and M_{ta_uD}
              
           HD_Start_td = y_FAST%Lin%Modules(MODULE_HD)%Instance(1)%LinStartIndx(LIN_INPUT_COL)  
           HD_Start_tr = HD_Start_td + u_HD%Morison%DistribMesh%NNodes * 6 ! skip 2 fields (TranslationDisp and Orientation) with 3 components before translational velocity field      
  
              ! translational velocity:
           if (allocated(MeshMapData%ED_P_2_HD_M_L%dM%tv_uD )) then             
              call SetBlockMatrix( dUdu, MeshMapData%ED_P_2_HD_M_L%dM%tv_ud, HD_Start_tr, HD_Start_td )
           end if
  
              ! translational acceleration:
           HD_Start_tr = HD_Start_tr + u_HD%Morison%DistribMesh%NNodes * 6 ! skip 2 fields ( TranslationVel and RotationVel)
           if (allocated(MeshMapData%ED_P_2_HD_M_L%dM%ta_uD )) then            
              call SetBlockMatrix( dUdu, MeshMapData%ED_P_2_HD_M_L%dM%ta_ud, HD_Start_tr, HD_Start_td )
           end if
  
        !===================================================   
        !  y_ED%PlatformPtMesh and u_HD%Morison%LumpedMesh
        !===================================================    
  
           call Linearize_Point_to_Point( y_ED%PlatformPtMesh, u_HD%Morison%LumpedMesh, MeshMapData%ED_P_2_HD_M_P, ErrStat2, ErrMsg2 )
              call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
           ! HD is destination in the mapping, so we want M_{tv_uD} and M_{ta_uD}
           HD_Start_td = HD_Start_tr + u_HD%Morison%DistribMesh%NNodes * 6 ! skip 1 field ( TranslationAcc and RotationAcc)   
           HD_Start_tr = HD_Start_td + u_HD%Morison%LumpedMesh%NNodes  * 6 ! skip 2 fields (TranslationDisp and Orientation) with 3 components before translational velocity field       
              ! translational velocity:
           if (allocated(MeshMapData%ED_P_2_HD_M_P%dM%tv_uD )) then             
              call SetBlockMatrix( dUdu, MeshMapData%ED_P_2_HD_M_P%dM%tv_ud, HD_Start_tr, HD_Start_td )
           end if
  
              ! translational acceleration:
           HD_Start_tr = HD_Start_tr + u_HD%Morison%LumpedMesh%NNodes * 6 ! skip 2 fields ( TranslationVel and RotationVel)
  
           if (allocated(MeshMapData%ED_P_2_HD_M_P%dM%ta_uD )) then
              call SetBlockMatrix( dUdu, MeshMapData%ED_P_2_HD_M_P%dM%ta_ud, HD_Start_tr, HD_Start_td )
           end if
  
        !===================================================   
        !  y_ED%PlatformPtMesh and u_HD%Mesh
        !===================================================    
  
           call Linearize_Point_to_Point( y_ED%PlatformPtMesh, u_HD%WAMITMesh, MeshMapData%ED_P_2_HD_W_P, ErrStat2, ErrMsg2 )
              call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
  
           HD_Start_td = HD_Start_tr + u_HD%Morison%LumpedMesh%NNodes * 6 ! skip 2 field ( TranslationalAcc and RotationAcc)   
           HD_Start_tr = HD_Start_td + u_HD%WAMITMesh%NNodes  * 6 ! skip 2 fields (TranslationDisp and Orientation) with 3 components before translational velocity field       
              ! translational velocity:
           if (allocated(MeshMapData%ED_P_2_HD_W_P%dM%tv_uD )) then             
  
negative.code: END FUNCTION Indx_u_AD_BladeInflow_Start
  !----------------------------------------------------------------------------------------------------------------------------------
  !----------------------------------------------------------------------------------------------------------------------------------
  !> This routine returns the starting index for the u_HD%Morison%Mesh mesh in the FAST linearization inputs.
  FUNCTION Indx_u_HD_Morison_Start(u_HD, y_FAST) RESULT(HD_Start)
     TYPE(FAST_OutputFileType),      INTENT(IN )  :: y_FAST           !< FAST output file data (for linearization)
     TYPE(HydroDyn_InputType),       INTENT(IN )  :: u_HD             !< HD Inputs at t
  
  