anchor.diff:     REAL(ReKi)                  :: Oe(6,6)
      REAL(ReKi)                  :: Pe(6,6)
      REAL(ReKi)                  :: Qe(6,6)
  -   REAL(ReKi)                  :: Nvvv(dof_node*node_elem)
  -   REAL(ReKi)                  :: temp_Naaa(dof_node*node_elem)
  -   REAL(ReKi)                  :: temp_aaa(6)
  +   REAL(ReKi)                  :: aaa(6)
      INTEGER(IntKi)              :: igp
      INTEGER(IntKi)              :: i
      INTEGER(IntKi)              :: j
  
positive.code:    CHARACTER(ErrMsgLen)    :: ErrMsg2                      ! Temporary Error message
     CHARACTER(*), PARAMETER :: RoutineName = 'BD_StaticElementMatrix'
  
     vvv(:)   = 0.0D0
     Nvvv(:)  = 0.0D0
     elk(:,:) = 0.0D0
     elf(:)   = 0.0D0
     CALL BD_GenerateGLL(node_elem-1,GLL_temp,w_temp,ErrStat2,ErrMsg2)
     CALL BD_GaussPointWeight(ngp,gp,gw,ErrStat2,ErrMsg2)
     DO igp=1,ngp
         gpr = gp(igp)
         CALL BD_ComputeJacobian(gpr,Nuu0,node_elem,dof_node,gp,GLL_temp,ngp,igp,hhx,hpx,Jacobian,ErrStat2,ErrMsg2)
         CALL BD_GaussPointDataAt0(hhx,hpx,Nuu0,Nrr0,node_elem,dof_node,uu0,E10,ErrStat2,ErrMsg2)
         Stif(1:6,1:6) = EStif0_GL(1:6,1:6,igp)
         CALL BD_GaussPointData(hhx,hpx,Nuuu,Nrrr,uu0,E10,node_elem,dof_node,&
                                uuu,uup,E1,RR0,kapa,Stif,cet,ErrStat2,ErrMsg2)
         CALL BD_ElasticForce(E1,RR0,kapa,Stif,cet,Fc,Fd,Oe,Pe,Qe,ErrStat2,ErrMsg2)
         mmm          = EMass0_GL(1,1,igp)
         mEta(2)      =-EMass0_GL(1,6,igp)
         mEta(3)      = EMass0_GL(1,5,igp)
         rho(1:3,1:3) = EMass0_GL(4:6,4:6,igp)
         CALL BD_GaussPointDataMass(hhx,hpx,Nvvv,temp_Naaa,RR0,node_elem,dof_node,&
                                    vvv,temp_aaa,vvp,mmm,mEta,rho,ErrStat2,ErrMsg2)
         CALL BD_GravityForce(mmm,mEta,gravity,Fg,ErrStat2,ErrMsg2)
         Fd(:) = Fd(:) - Fg(:) - Distr_GL(:,igp)
  
         DO i=1,node_elem
  
negative.code:    INTEGER(IntKi),INTENT(IN   ):: dof_node
     REAL(ReKi),    INTENT(  OUT):: elk(:,:)
     REAL(ReKi),    INTENT(  OUT):: elf(:)
     INTEGER(IntKi),INTENT(  OUT):: ErrStat       ! Error status of the operation
     CHARACTER(*),  INTENT(  OUT):: ErrMsg        ! Error message if ErrStat /= ErrID_None
  
     REAL(ReKi),      ALLOCATABLE:: gp(:)
     REAL(ReKi),      ALLOCATABLE:: gw(:)
     REAL(ReKi),      ALLOCATABLE:: hhx(:)
     REAL(ReKi),      ALLOCATABLE:: hpx(:)
     REAL(ReKi),      ALLOCATABLE:: GLL_temp(:)
     REAL(ReKi),      ALLOCATABLE:: w_temp(:)
     REAL(ReKi),      ALLOCATABLE:: temp_Nvvv(:)
     REAL(ReKi),      ALLOCATABLE:: temp_Naaa(:)
     REAL(ReKi)                  :: uu0(6)
     REAL(ReKi)                  :: E10(3)
     REAL(ReKi)                  :: RR0(3,3)
  