anchor.diff:            CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
          IF(quadrature .EQ. 1) THEN
              temp_id = (nelem-1)*ngp + 1
  +           temp_id2 = (nelem-1)*ngp
          ELSEIF(quadrature .EQ. 2) THEN
              temp_id = (nelem-1)*ngp
  +           temp_id2= temp_id
          ENDIF
   
          DO j=1,ngp
  -           EStif0_GL(1:6,1:6,j) = Stif0(1:6,1:6,temp_id+j)
  -           EMass0_GL(1:6,1:6,j) = Mass0(1:6,1:6,temp_id+j)
  +           EStif0_GL(1:6,1:6,j) = Stif0(1:6,1:6,temp_id2+j)
  +           EMass0_GL(1:6,1:6,j) = Mass0(1:6,1:6,temp_id2+j)
              DistrLoad_GL(1:3,j) = u%DistrLoad%Force(1:3,temp_id+j)
              DistrLoad_GL(4:6,j) = u%DistrLoad%Moment(1:3,temp_id+j)
          ENDDO
  
positive.code: 
         IF(quadrature .EQ. 1) THEN
             temp_id = (nelem-1)*ngp + 1
         ELSEIF(quadrature .EQ. 2) THEN
             temp_id = (nelem-1)*ngp
         ENDIF
  
         DO j=1,ngp
             EStif0_GL(1:6,1:6,j) = Stif0(1:6,1:6,temp_id+j)
             EMass0_GL(1:6,1:6,j) = Mass0(1:6,1:6,temp_id+j)
             DistrLoad_GL(1:3,j) = u%DistrLoad%Force(1:3,temp_id+j)
             DistrLoad_GL(4:6,j) = u%DistrLoad%Moment(1:3,temp_id+j)
         ENDDO
  
negative.code:    INTEGER(IntKi)                :: nelem ! number of elements
     INTEGER(IntKi)                :: j ! Index counter
     INTEGER(IntKi)                :: temp_id ! Index counter
     INTEGER(IntKi)                :: temp_id2
     INTEGER(IntKi)                :: ErrStat2                     ! Temporary Error status
     CHARACTER(ErrMsgLen)          :: ErrMsg2                      ! Temporary Error message
     CHARACTER(*),        PARAMETER:: RoutineName = 'BD_GenerateStaticElementForce'
  