














































 







































































 


































































































































































 
























































































































































































 























































 










 








































































































































































































































 










                                
                                

                                
                                

                                
                                

                                















































      REAL*8 function EOS_Hybrid_Pressure(rho, eps)

      USE EOS_Polytrope_Scalars   
      USE EOS_Hybrid_Scalars

      implicit none

      REAL*8 eos_gamma_supernuclear
      integer, parameter :: cctki_use_eos_gamma_supernuclear = kind(eos_
     &gamma_supernuclear)
      REAL*8 eos_gamma_th
      integer, parameter :: cctki_use_eos_gamma_th = kind(eos_gamma_th)
      REAL*8 rho_nuc
      integer, parameter :: cctki_use_rho_nuc = kind(rho_nuc)
      COMMON /EOS_Hybridrest/eos_gamma_supernuclear, eos_gamma_th, rho_n
     &uc
      REAL*8 eos_gamma
      integer, parameter :: cctki_use_eos_gamma = kind(eos_gamma)
      REAL*8 eos_k
      integer, parameter :: cctki_use_eos_k = kind(eos_k)
      REAL*8 gamma_ini
      integer, parameter :: cctki_use_gamma_ini = kind(gamma_ini)
      INTEGER*4 CCTKH0
      integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
      COMMON /EOS_2D_POLYTROPErest/eos_gamma, eos_k, gamma_ini, CCTKH0

      REAL*8 rho, eps, local_eos_gamma, p_poly, p_th, local_eos_k_cgs, z
     &ero

      zero = 0.d0

      if (rho > rho_nuc) then
        local_eos_gamma = eos_gamma_supernuclear
        local_eos_k_cgs = eos_k_supernuclear_cgs
      else
        local_eos_gamma = eos_gamma
        local_eos_k_cgs = eos_k_cgs
      end if

      p_poly = p_geom_factor * local_eos_k_cgs * 
     .     (rho * rho_geom_factor_inv)**local_eos_gamma

      p_th = - p_geom_factor * local_eos_k_cgs * (eos_gamma_th - 1.d0) /
     & 
     .     (local_eos_gamma - 1.d0) * (rho * rho_geom_factor_inv)**local
     &_eos_gamma + 
     .     (eos_gamma_th - 1.d0) * rho * eps - 
     .     (eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) / 
     .     (eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) * 
     .     p_geom_factor * eos_k_cgs * rho_geom_factor_inv**eos_gamma * 
     &
     .     rho_nuc**(eos_gamma - 1.d0) * rho

      p_th = max(zero, p_th)

      EOS_Hybrid_Pressure = p_poly + p_th

      end function EOS_Hybrid_Pressure

c

      REAL*8 function EOS_Hybrid_SpecificIE(rho, press)

      USE EOS_Polytrope_Scalars   
      USE EOS_Hybrid_Scalars

      implicit none
      REAL*8 eos_gamma_supernuclear
      integer, parameter :: cctki_use_eos_gamma_supernuclear = kind(eos_
     &gamma_supernuclear)
      REAL*8 eos_gamma_th
      integer, parameter :: cctki_use_eos_gamma_th = kind(eos_gamma_th)
      REAL*8 rho_nuc
      integer, parameter :: cctki_use_rho_nuc = kind(rho_nuc)
      COMMON /EOS_Hybridrest/eos_gamma_supernuclear, eos_gamma_th, rho_n
     &uc
      REAL*8 eos_gamma
      integer, parameter :: cctki_use_eos_gamma = kind(eos_gamma)
      REAL*8 eos_k
      integer, parameter :: cctki_use_eos_k = kind(eos_k)
      REAL*8 gamma_ini
      integer, parameter :: cctki_use_gamma_ini = kind(gamma_ini)
      INTEGER*4 CCTKH0
      integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
      COMMON /EOS_2D_POLYTROPErest/eos_gamma, eos_k, gamma_ini, CCTKH0

      REAL*8  rho
      integer, parameter :: cctki_use_ rho = kind( rho)
      REAL*8  press
      integer, parameter :: cctki_use_ press = kind( press)

c
c
c
c
c
c
c
c
c
c
c

      EOS_Hybrid_SpecificIE = 2.34567890d0

      end function EOS_Hybrid_SpecificIE

c

      REAL*8 function EOS_Hybrid_RestMassDens(eps, press)

      implicit none
      REAL*8 eos_gamma_supernuclear
      integer, parameter :: cctki_use_eos_gamma_supernuclear = kind(eos_
     &gamma_supernuclear)
      REAL*8 eos_gamma_th
      integer, parameter :: cctki_use_eos_gamma_th = kind(eos_gamma_th)
      REAL*8 rho_nuc
      integer, parameter :: cctki_use_rho_nuc = kind(rho_nuc)
      COMMON /EOS_Hybridrest/eos_gamma_supernuclear, eos_gamma_th, rho_n
     &uc
      REAL*8 eos_gamma
      integer, parameter :: cctki_use_eos_gamma = kind(eos_gamma)
      REAL*8 eos_k
      integer, parameter :: cctki_use_eos_k = kind(eos_k)
      REAL*8 gamma_ini
      integer, parameter :: cctki_use_gamma_ini = kind(gamma_ini)
      INTEGER*4 CCTKH0
      integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
      COMMON /EOS_2D_POLYTROPErest/eos_gamma, eos_k, gamma_ini, CCTKH0

      REAL*8  eps
      integer, parameter :: cctki_use_ eps = kind( eps)
      REAL*8  press
      integer, parameter :: cctki_use_ press = kind( press)

      EOS_Hybrid_RestMassDens = 1.23456789d0
      
      end function EOS_Hybrid_RestMassDens
      
      REAL*8 function EOS_Hybrid_DPressByDRho(rho, eps)

      USE EOS_Polytrope_Scalars   
      USE EOS_Hybrid_Scalars   

      implicit none
      REAL*8 eos_gamma_supernuclear
      integer, parameter :: cctki_use_eos_gamma_supernuclear = kind(eos_
     &gamma_supernuclear)
      REAL*8 eos_gamma_th
      integer, parameter :: cctki_use_eos_gamma_th = kind(eos_gamma_th)
      REAL*8 rho_nuc
      integer, parameter :: cctki_use_rho_nuc = kind(rho_nuc)
      COMMON /EOS_Hybridrest/eos_gamma_supernuclear, eos_gamma_th, rho_n
     &uc
      REAL*8 eos_gamma
      integer, parameter :: cctki_use_eos_gamma = kind(eos_gamma)
      REAL*8 eos_k
      integer, parameter :: cctki_use_eos_k = kind(eos_k)
      REAL*8 gamma_ini
      integer, parameter :: cctki_use_gamma_ini = kind(gamma_ini)
      INTEGER*4 CCTKH0
      integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
      COMMON /EOS_2D_POLYTROPErest/eos_gamma, eos_k, gamma_ini, CCTKH0

      REAL*8 rho, eps, local_eos_gamma, local_eos_k_cgs, d_p_poly, d_p_t
     &h_1, 
     .     d_p_th_2, zero

      zero = 0.d0

      if (rho > rho_nuc) then
        local_eos_gamma = eos_gamma_supernuclear
        local_eos_k_cgs = eos_k_supernuclear_cgs
      else
        local_eos_gamma = eos_gamma
        local_eos_k_cgs = eos_k_cgs
      end if

      d_p_poly = local_eos_gamma * p_geom_factor * local_eos_k_cgs * 
     .     rho**(local_eos_gamma - 1.d0) * rho_geom_factor_inv**local_eo
     &s_gamma

      d_p_th_1 = - local_eos_gamma * p_geom_factor * local_eos_k_cgs * 
     .     (eos_gamma_th - 1.d0) / (local_eos_gamma - 1.d0) * 
     .     rho**(local_eos_gamma - 1.d0) * rho_geom_factor_inv**local_eo
     &s_gamma

      d_p_th_2 = (eos_gamma_th - 1.d0) * eps
     .     - (eos_gamma_th - 1.d0) * (local_eos_gamma - eos_gamma) / 
     .     (eos_gamma - 1.d0) / (eos_gamma_supernuclear - 1.d0) * 
     .     p_geom_factor * eos_k_cgs * rho_geom_factor_inv**eos_gamma * 
     &
     .     rho_nuc**(eos_gamma - 1.d0)

c
c
      
      EOS_Hybrid_DPressByDRho = d_p_poly + d_p_th_1 + d_p_th_2

      end function EOS_Hybrid_DPressByDRho

      REAL*8 function EOS_Hybrid_DPressByDEps(rho, eps)

      implicit none
      REAL*8 eos_gamma_supernuclear
      integer, parameter :: cctki_use_eos_gamma_supernuclear = kind(eos_
     &gamma_supernuclear)
      REAL*8 eos_gamma_th
      integer, parameter :: cctki_use_eos_gamma_th = kind(eos_gamma_th)
      REAL*8 rho_nuc
      integer, parameter :: cctki_use_rho_nuc = kind(rho_nuc)
      COMMON /EOS_Hybridrest/eos_gamma_supernuclear, eos_gamma_th, rho_n
     &uc
      REAL*8 eos_gamma
      integer, parameter :: cctki_use_eos_gamma = kind(eos_gamma)
      REAL*8 eos_k
      integer, parameter :: cctki_use_eos_k = kind(eos_k)
      REAL*8 gamma_ini
      integer, parameter :: cctki_use_gamma_ini = kind(gamma_ini)
      INTEGER*4 CCTKH0
      integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
      COMMON /EOS_2D_POLYTROPErest/eos_gamma, eos_k, gamma_ini, CCTKH0

      REAL*8 rho
      REAL*8  eps
      integer, parameter :: cctki_use_ eps = kind( eps)

      EOS_Hybrid_DPressByDEps = (eos_gamma_th - 1.d0) * rho

      end function EOS_Hybrid_DPressByDEps
