C EIGGLO    SOURCE    CB215821  17/07/21    21:15:08     9513           
c---------------------------------------------------------------------
c
      SUBROUTINE EIGGLO (NDIME, NSTR1, NTENS,
     .                   betam, prosi, sgten, soxyz)
c
c=====================================================================
c                                                                    =
c   This subroutine performs rotation of tension stress matrix,      =
c   from eigen to global system (optimized).                         =
c                                                                    =
c    Input variable:                                                 =
c                                                                    =
c       ntens                  no. of tension componentes            =
c       betam                  rotation matrix                       =
c       sgten (i)  (i=1,3)     principal tension stress tensor       =
c                                                                    =
c    Output variable:                                                =
c                                                                    =
c       sgten                  tension stress tensor contribution    =
c                                                                    =
c   Author: Rui Faria                           Version: 96.09.18    =
c                                               --------             =
c=====================================================================
      IMPLICIT INTEGER(I-N)
      integer    ndime, nstr1, ntens
      real*8     sgten (nstr1),
     .           betam (ndime,ndime), prosi (ndime,ndime),
     .           soxyz (ndime,ndime)
c
      integer    istrs, jstrs
      real*8     provi
c
      if (ntens .gt. 0)  then
          do 10 istrs = 1, ndime
             do 20 jstrs = 1, ndime
                prosi (istrs,jstrs) = betam (jstrs,istrs) *
     .                                sgten (jstrs)
   20        continue
   10     continue
c
          call proma1 (soxyz, prosi, betam, ndime, ndime, ndime)
c
          if (nstr1 .eq. 6)  then
              sgten (1) = soxyz (1,1)
              sgten (2) = soxyz (2,2)
              sgten (3) = soxyz (3,3)
              sgten (4) = soxyz (1,2)
              sgten (5) = soxyz (1,3)
              sgten (6) = soxyz (2,3)
          else
              sgten (1) = soxyz (1,1)
              sgten (2) = soxyz (2,2)
              provi     = sgten (3)
              sgten (3) = provi
              sgten (4) = soxyz (1,2)
          end if
      else
          call zeror  (sgten, nstr1)
      end if
c
      return
      end


 
