anchor.diff:     REAL(ReKi),INTENT(  OUT)    :: elem_IN(:,:)
      INTEGER(IntKi),INTENT(IN   ):: ngp ! Number of Gauss points
      REAL(ReKi),    INTENT(IN   ):: gw(:)
  -   REAL(ReKi),    INTENT(IN   ):: hhx(:,:) !bjj: NOT USED
  -   REAL(ReKi),    INTENT(IN   ):: hpx(:,:) !bjj: NOT USED
      REAL(ReKi),    INTENT(IN   ):: Jaco(:)
  -   INTEGER(IntKi),INTENT(IN   ):: node_elem ! Node per element !bjj: NOT USED
  -   INTEGER(IntKi),INTENT(IN   ):: dof_node ! Degrees of freedom per node !bjj: NOT USED
      INTEGER(IntKi),INTENT(  OUT):: ErrStat       ! Error status of the operation
      CHARACTER(*),  INTENT(  OUT):: ErrMsg        ! Error message if ErrStat /= ErrID_None
   
      REAL(ReKi)                  :: mmm
      INTEGER(IntKi)              :: igp
  -!   INTEGER(IntKi)              :: i
  -!   INTEGER(IntKi)              :: temp_id
   !   INTEGER(IntKi)              :: ErrStat2                     ! Temporary Error status
   !   CHARACTER(ErrMsgLen)        :: ErrMsg2                      ! Temporary Error message
      CHARACTER(*), PARAMETER     :: RoutineName = 'BD_ComputeElementMass'
  
positive.code: !------------------------------------------------------------
  
     TYPE(BD_InputType),           INTENT(IN   )  :: u           ! Inputs at t
     REAL(DbKi),                   INTENT(IN   )  :: t           ! time (s) ! bjj: NOT USED
     TYPE(BD_ContinuousStateType), INTENT(INOUT)  :: x           ! Continuous states at t
     TYPE(BD_ParameterType),       INTENT(IN   )  :: p           ! Inputs at t
     TYPE(BD_OtherStateType),      INTENT(INOUT)  :: OtherState  ! Continuous states at t
  
negative.code:    ErrStat = ErrID_None
     ErrMsg  = ""
  
     CALL BD_SolutionForceAcc(x%q,x%dqdt,p%Stif0_GL,p%Mass0_GL,p%gravity,u,&
                              p%damp_flag,p%beta,&
                              p%quadrature,p%GLw,p%Shp,p%Der,p%Jacobian,p%uu0,p%E10,&
                              p%node_elem,p%dof_node,p%elem_total,p%dof_total,p%node_total,p%ngp,&
  