anchor.diff:     DEALLOCATE(Pe_elem)
      DEALLOCATE(Qe_elem)
      DEALLOCATE(Se_elem)
  +   
  +   DEALLOCATE(Fi_elem)
  +   DEALLOCATE(Ki_elem)
  +   DEALLOCATE(Mi_elem)
  +   DEALLOCATE(Gi_elem)
      
      9999 IF(allo_stat/=0) THEN
               IF(ALLOCATED(Fc_elem)) DEALLOCATE(Fc_elem)
  
positive.code:        Qe = 0.0D0
         Stif = 0.0D0
         cet = 0.0D0
         CALL NodalDataAt0(node_elem,nelem,norder,dof_node,i,hhp,Nuu0,Jac,E10)
         CALL NodalData(Nuuu,Nrrr,Nuu0,Nrr0,E10,hhp,Stif0,Jac,&
                        &node_elem,nelem,i,norder,dof_node,&
                        &E1,RR0,kapa,Stif,cet)
         CALL ElasticForce(E1,RR0,kapa,Stif,cet,Fc,Fd,Oe,Pe,Qe)
         Fi_elem(1:6,i) = Fi(1:6)
         Ki_elem(1:6,1:6,i) = Ki(1:6,1:6)
         Gi_elem(1:6,1:6,i) = Gi(1:6,1:6)
  
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
  
  
  
  