anchor.diff:     INTEGER(IntKi)                                :: j
      INTEGER(IntKi)                                :: k
      INTEGER(IntKi)                                :: piter
  -   REAL(ReKi)                                    :: gravity_temp(3)
  +   REAL(BDKi)                                    :: gravity_temp(3)
      INTEGER(IntKi)                                :: ErrStat2                     ! Temporary Error status
      CHARACTER(ErrMsgLen)                          :: ErrMsg2                      ! Temporary Error message
      CHARACTER(*), PARAMETER                       :: RoutineName = 'BD_Static'
  
positive.code:        call Cleanup()
         return
     end if
     Nuuu(:)  = 0.0D0
     Nrrr(:)  = 0.0D0
     Nvvv(:)  = 0.0D0
     Naaa(:)  = 0.0D0
     elf(:)   = 0.0D0
     elk(:,:) = 0.0D0
     elm(:,:) = 0.0D0
     elg(:,:) = 0.0D0
     EStif0_GL(:,:,:)   = 0.0D0
     EMass0_GL(:,:,:)   = 0.0D0
     DistrLoad_GL(:,:)  = 0.0D0
  
     DO nelem=1,elem_total
         CALL BD_ElemNodalDisp(uuNf,node_elem,dof_node,nelem,Nuuu,ErrStat2,ErrMsg2)
  
negative.code:              call cleanup()
               return
            end if
         temp_ratio(:,:) = 0.0_BDKi
         temp_GL(:) = 0.0D0
         DO i=1,p%ngp
             temp_GL(i) = (p%GL(i) + 1.0_BDKi)/2.0_BDKi
         ENDDO
         DO i=1,p%elem_total
             IF(i .EQ. 1) THEN
  