C FSTRAL    SOURCE    BECC      11/05/26    21:15:29     6981
      SUBROUTINE FSTRAL(
     &     PC, GAM,
     &     P, RHO_L, P_L, U_L,
     &     U, RHO, D,
     &     LOGDEB, LOGAN)
*
*************************************************************************
*
* project           :  CAST3M, EUROPLEXUS...
*
* name              :  fstral
*
* description       :  euler equations for a mixture of stiffened gases
*                      flux in the non-reactive case.
*
*                      left rarefaction curve as function of p
*
* language          :  fortran 77
*
* author            :  a. beccantini den/dm2s/sfme/ltmf
*
*************************************************************************
*
* called by         :
*
*
*************************************************************************
*
***** input
*
*     pc, gam         = properties of the gas
*
*     p               = pressure in the right side of the left
*                       rarefaction
*
*     rho_l, p_l, u_l
*                     = density, pressure, velocity on the left
*
*     logdeb          = debugging ?
*
***** output
*
*     u               = velocity in the right side of the left
*                       rarefaction
*
*     d               = rarefaction speed
*
*     logan           = anomaly ?
*
*************************************************************************
*
*     26/11/2009      created
*     25/05/2011      evolution in CAST3M
*
*************************************************************************
*
* n.b.: all variables are declared
*
C      IMPLICIT NONE
      IMPLICIT INTEGER(I-N)
      REAL*8
     &     PC, GAM,
     &     P, RHO_L, P_L, U_L,
     &     U, RHO, D
*
      REAL*8 VAR
*
*     debugging ?
*
      LOGICAL LOGDEB, LOGAN
*
*     a left rarefaction in the x-frame is a right rarefaction in the
*     -x-frame !
*
      VAR = -1.0D0 * U_L
      CALL FSTRAR(PC, GAM, P, RHO_L, P_L, VAR,
     &     U, RHO, D, LOGDEB, LOGAN)
      U = -1.0D0 * U
      D = -1.0D0 * D
*
      IF (LOGAN) THEN
         WRITE(*,*) 'SUBROUTINE FSTRAL.F'
         WRITE(*,*) 'ANOMALY DETECTED.'
         GOTO 9999
      ENDIF
*
 9999 RETURN
      END

