anchor.diff: -   SUBROUTINE ElementMatrix(Nuu0,Nuuu,Nrr0,Nrrr,Next,hhp,Stif0,Jac,&
  -                            &w,node_elem,nelem,norder,dof_node,elk,elf)
  +   SUBROUTINE ElementMatrix(Nuu0,Nuuu,Nrr0,Nrrr,Next,Nvvv, Naaa, hhp,Stif0,m00, mEta0, rho0, Jac,&
  +                            &w,node_elem,nelem,norder,dof_node,elk,elf,elm,elg)
   
      REAL(ReKi),INTENT(IN)::Nuu0(:),Nuuu(:),Nrr0(:),Nrrr(:),Next(:)
  +   REAL(ReKi),INTENT(IN)::Nvvv(:), Naaa(:)
      REAL(ReKi),INTENT(IN)::hhp(:,:),Stif0(:,:,:),Jac
  +   REAL(ReKi), INTENT(IN):: m00, mEta0(:), rho0(:,:)
      REAL(ReKi),INTENT(IN)::w(:)
      INTEGER(IntKi),INTENT(IN)::node_elem,nelem,norder,dof_node
   
  -   REAL(ReKi),INTENT(INOUT)::elk(:,:),elf(:)      
  +   REAL(ReKi),INTENT(INOUT)::elk(:,:),elf(:), elm(:), elg(:)      
   
      REAL(ReKi),ALLOCATABLE::Fc_elem(:,:),Fd_elem(:,:),Oe_elem(:,:,:)
      REAL(ReKi),ALLOCATABLE::Pe_elem(:,:,:),Qe_elem(:,:,:),Se_elem(:,:,:)
  +   REAL(ReKi),ALLOCATABLE::Fi_elem(:,:), Mi_elem(:,:,:), Gi_elem(:,:,:), Ki_elem(:,:,:)
      REAL(ReKi)::E10(3),RR0(3,3),kapa(3),E1(3),Stif(6,6),cet
  +   REAL(ReKi)::mEta(3), rho(3,3)
      REAL(ReKi)::Fc(6),Fd(6),Oe(6,6),Pe(6,6),Qe(6,6)
  +   REAL(ReKi)::Fi(6), Mi(6,6), Gi(6,6), Ki(6,6)
   
      INTEGER(IntKi)::i,j,k,m,n,temp_id1,temp_id2
      INTEGER(IntKi)::allo_stat
         
   
  +   ALLOCATE(Fc_elem(dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Fc_elem = 0.0D0
  +   
  +   ALLOCATE(Fd_elem(dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Fd_elem = 0.0D0
  +   
  +   ALLOCATE(Oe_elem(dof_node,dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Oe_elem = 0.0D0
  +   
  +   ALLOCATE(Pe_elem(dof_node,dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Pe_elem = 0.0D0
  +   
  +   ALLOCATE(Qe_elem(dof_node,dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Qe_elem = 0.0D0
  +   
  +   ALLOCATE(Se_elem(dof_node,dof_node,node_elem),STAT = allo_stat)
  +   IF(allo_stat/=0) GOTO 9999
  +   Se_elem = 0.0D0
  +   
      ALLOCATE(Fi_elem(dof_node,node_elem),STAT = allo_stat)
      IF(allo_stat/=0) GOTO 9999
      Fi_elem = 0.0D0
  
positive.code:    ALLOCATE(Mi_elem(dof_node,dof_node,node_elem),STAT = allo_stat)
     IF(allo_stat/=0) GOTO 9999
     Mi_elem = 0.0D0
     
     DO i=1,node_elem
         E10 = 0.0D0
         E1 = 0.0D0
  
negative.code:            ENDDO
         ENDDO
     ENDDO
     
     DO i=1,node_elem
         DO j=1,6
             temp_id1 = (i-1)*dof_node+j
             DO k=1,6
                 temp_id2 = (i-1)*dof_node+k
                 elm(temp_id1,temp_id2) = elm(temp_id1, temp_id2) + w(i) * Mi_elem(j,k,i) * Jac
                 elg(temp_id1,temp_id2) = elg(temp_id1, temp_id2) + w(i) * Gi_elem(j,k,i) * Jac
                 elk(temp_id1,temp_id2) = elk(temp_id1, temp_id2) + w(i) * Ki_elem(j,k,i) * Jac
             ENDDO
         ENDDO
     ENDDO
  
     DO i=1,node_elem
         DO j=1,6
             temp_id1 = (i-1)*dof_node+j
             elf(temp_id1) = elf(temp_id1) - w(i) * Fi_elem(j,i) * Jac
         ENDDO
     ENDDO
  
  
  
  