anchor.diff:         ENDDO
          CALL BD_StaticElementMatrix(uuN0(:,nelem),Nuuu,Nrr0,Nrrr,DistrLoad_GL,gravity,&
                                      Mass0(:,:,temp_id+1:temp_id+ngp),Stif0(:,:,temp_id+1:temp_id+ngp),&
  -                                   ngp,node_elem,dof_node,elk,elf)
  +                                   ngp,node_elem,dof_node,elk,elf,ErrStat2,ErrMsg2)
   
          CALL BD_AssembleStiffK(nelem,node_elem,dof_elem,dof_node,elk,StifK,ErrStat2,ErrMsg2)
          CALL BD_AssembleRHS(nelem,dof_elem,node_elem,dof_node,elf,RHS,ErrStat2,ErrMsg2)
  
positive.code:    END SUBROUTINE BD_GenerateStaticElement
  
     SUBROUTINE BD_StaticElementMatrix(Nuu0,Nuuu,Nrr0,Nrrr,Distr_GL,gravity,&
                                       EMass0_GL,EStif0_GL,ngp,node_elem,dof_node,elk,elf)
  
     REAL(ReKi),    INTENT(IN   ):: Nuu0(:)
     REAL(ReKi),    INTENT(IN   ):: Nuuu(:)
  
negative.code:    INTEGER(IntKi)                  :: j
     INTEGER(IntKi)                  :: temp_id
     INTEGER(IntKi)                  :: allo_stat
     INTEGER(IntKi)                  :: ErrStat2                     ! Temporary Error status
     CHARACTER(ErrMsgLen)            :: ErrMsg2                      ! Temporary Error message
     CHARACTER(*), PARAMETER         :: RoutineName = 'BD_GenerateStaticElement'
  
     dof_elem = dof_node * node_elem
     rot_elem = (dof_node/2) * node_elem
  