























































































































 


































































































































































 








































































































































































































 




























































 










 








































































































































































































































 










                                
                                

                                
                                

                                
                                

                                

























































































subroutine EOS_Omni_EOS_Press_f_hrho_v2_rhoW(eoskey,keytemp,rf_precision,npoints,&
                              hrho,v2,rhoW,eps,temp,ye,press,keyerr,anyerr)

  use EOS_Omni_Module
  implicit none
  REAL*8 barotropiceos_gammath
  integer, parameter :: cctki_use_barotropiceos_gammath = kind(barotropiceos_gammath)
  REAL*8 gl_gamma
  integer, parameter :: cctki_use_gl_gamma = kind(gl_gamma)
  REAL*8 gl_k
  integer, parameter :: cctki_use_gl_k = kind(gl_k)
  REAL*8 hybrid_gamma (10)
  integer, parameter :: cctki_use_hybrid_gamma = kind(hybrid_gamma)
  REAL*8 hybrid_gamma1
  integer, parameter :: cctki_use_hybrid_gamma1 = kind(hybrid_gamma1)
  REAL*8 hybrid_gamma2
  integer, parameter :: cctki_use_hybrid_gamma2 = kind(hybrid_gamma2)
  REAL*8 hybrid_gamma_th
  integer, parameter :: cctki_use_hybrid_gamma_th = kind(hybrid_gamma_th)
  REAL*8 hybrid_k0
  integer, parameter :: cctki_use_hybrid_k0 = kind(hybrid_k0)
  REAL*8 hybrid_k1
  integer, parameter :: cctki_use_hybrid_k1 = kind(hybrid_k1)
  REAL*8 hybrid_rho (9)
  integer, parameter :: cctki_use_hybrid_rho = kind(hybrid_rho)
  REAL*8 hybrid_rho_nuc
  integer, parameter :: cctki_use_hybrid_rho_nuc = kind(hybrid_rho_nuc)
  REAL*8 poly_gamma
  integer, parameter :: cctki_use_poly_gamma = kind(poly_gamma)
  REAL*8 poly_gamma_initial
  integer, parameter :: cctki_use_poly_gamma_initial = kind(poly_gamma_initial)
  REAL*8 poly_k
  integer, parameter :: cctki_use_poly_k = kind(poly_k)
  integer*8 barotropiceos_table_name
  integer, parameter :: cctki_use_barotropiceos_table_name = kind(barotropiceos_table_name)
  integer*8 coldeos_table_name
  integer, parameter :: cctki_use_coldeos_table_name = kind(coldeos_table_name)
  integer*8 dump_nuceos_table_name
  integer, parameter :: cctki_use_dump_nuceos_table_name = kind(dump_nuceos_table_name)
  integer*8 nuceos_table_name
  integer, parameter :: cctki_use_nuceos_table_name = kind(nuceos_table_name)
  INTEGER*4 barotropiceos_read_table
  integer, parameter :: cctki_use_barotropiceos_read_table = kind(barotropiceos_read_table)
  INTEGER*4 barotropiceos_use_thermal_gamma_law
  integer, parameter :: cctki_use_barotropiceos_use_thermal_gamma_law = kind(barotropiceos_use_thermal_gamma_law)
  INTEGER*4 coldeos_read_table
  integer, parameter :: cctki_use_coldeos_read_table = kind(coldeos_read_table)
  INTEGER*4 coldeos_use_thermal_gamma_law
  integer, parameter :: cctki_use_coldeos_use_thermal_gamma_law = kind(coldeos_use_thermal_gamma_law)
  INTEGER*4 do_energy_shift
  integer, parameter :: cctki_use_do_energy_shift = kind(do_energy_shift)
  INTEGER*4 dump_nuceos_table
  integer, parameter :: cctki_use_dump_nuceos_table = kind(dump_nuceos_table)
  INTEGER*4 n_pieces
  integer, parameter :: cctki_use_n_pieces = kind(n_pieces)
  INTEGER*4 nuceos_read_table
  integer, parameter :: cctki_use_nuceos_read_table = kind(nuceos_read_table)
  INTEGER*4 read_table_on_single_process
  integer, parameter :: cctki_use_read_table_on_single_process = kind(read_table_on_single_process)
  INTEGER*4 reader_process
  integer, parameter :: cctki_use_reader_process = kind(reader_process)
  COMMON /EOS_Omnirest/barotropiceos_gammath, gl_gamma, gl_k, hybrid_gamma, hybrid_gamma1, hybrid_gamma2, hybrid_gamma_th, hybrid_k&
  &0, hybrid_k1, hybrid_rho, hybrid_rho_nuc, poly_gamma, poly_gamma_initial, poly_k, barotropiceos_table_name, coldeos_table_name, &
  &dump_nuceos_table_name, nuceos_table_name, barotropiceos_read_table, barotropiceos_use_thermal_gamma_law, coldeos_read_table, co&
  &ldeos_use_thermal_gamma_law, do_energy_shift, dump_nuceos_table, n_pieces, nuceos_read_table, read_table_on_single_process, read&
  &er_process
  REAL*8 CCTKH5
  integer, parameter :: cctki_use_CCTKH5 = kind(CCTKH5)
  REAL*8 CCTKH19
  integer, parameter :: cctki_use_CCTKH19 = kind(CCTKH19)
  REAL*8 CCTKH29
  integer, parameter :: cctki_use_CCTKH29 = kind(CCTKH29)
  REAL*8 CCTKH31
  integer, parameter :: cctki_use_CCTKH31 = kind(CCTKH31)
  REAL*8 CCTKH33
  integer, parameter :: cctki_use_CCTKH33 = kind(CCTKH33)
  REAL*8 CCTKH35
  integer, parameter :: cctki_use_CCTKH35 = kind(CCTKH35)
  REAL*8 CCTKH37
  integer, parameter :: cctki_use_CCTKH37 = kind(CCTKH37)
  REAL*8 CCTKH39
  integer, parameter :: cctki_use_CCTKH39 = kind(CCTKH39)
  REAL*8 CCTKH41
  integer, parameter :: cctki_use_CCTKH41 = kind(CCTKH41)
  REAL*8 CCTKH43
  integer, parameter :: cctki_use_CCTKH43 = kind(CCTKH43)
  REAL*8 CCTKH45
  integer, parameter :: cctki_use_CCTKH45 = kind(CCTKH45)
  integer*8 CCTKH2
  integer, parameter :: cctki_use_CCTKH2 = kind(CCTKH2)
  integer*8 CCTKH3
  integer, parameter :: cctki_use_CCTKH3 = kind(CCTKH3)
  integer*8 CCTKH6
  integer, parameter :: cctki_use_CCTKH6 = kind(CCTKH6)
  integer*8 CCTKH9
  integer, parameter :: cctki_use_CCTKH9 = kind(CCTKH9)
  integer*8 CCTKH10
  integer, parameter :: cctki_use_CCTKH10 = kind(CCTKH10)
  integer*8 CCTKH11
  integer, parameter :: cctki_use_CCTKH11 = kind(CCTKH11)
  integer*8 CCTKH15
  integer, parameter :: cctki_use_CCTKH15 = kind(CCTKH15)
  integer*8 out_dir
  integer, parameter :: cctki_use_out_dir = kind(out_dir)
  integer*8 CCTKH21
  integer, parameter :: cctki_use_CCTKH21 = kind(CCTKH21)
  integer*8 CCTKH22
  integer, parameter :: cctki_use_CCTKH22 = kind(CCTKH22)
  integer*8 CCTKH23
  integer, parameter :: cctki_use_CCTKH23 = kind(CCTKH23)
  integer*8 CCTKH25
  integer, parameter :: cctki_use_CCTKH25 = kind(CCTKH25)
  integer*8 CCTKH47
  integer, parameter :: cctki_use_CCTKH47 = kind(CCTKH47)
  integer*8 CCTKH49
  integer, parameter :: cctki_use_CCTKH49 = kind(CCTKH49)
  integer*8 CCTKH51
  integer, parameter :: cctki_use_CCTKH51 = kind(CCTKH51)
  integer*8 CCTKH53
  integer, parameter :: cctki_use_CCTKH53 = kind(CCTKH53)
  integer*8 CCTKH54
  integer, parameter :: cctki_use_CCTKH54 = kind(CCTKH54)
  integer*8 CCTKH57
  integer, parameter :: cctki_use_CCTKH57 = kind(CCTKH57)
  INTEGER*4 CCTKH0
  integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
  INTEGER*4 CCTKH1
  integer, parameter :: cctki_use_CCTKH1 = kind(CCTKH1)
  INTEGER*4 CCTKH4
  integer, parameter :: cctki_use_CCTKH4 = kind(CCTKH4)
  INTEGER*4 CCTKH7
  integer, parameter :: cctki_use_CCTKH7 = kind(CCTKH7)
  INTEGER*4 CCTKH8
  integer, parameter :: cctki_use_CCTKH8 = kind(CCTKH8)
  INTEGER*4 CCTKH12
  integer, parameter :: cctki_use_CCTKH12 = kind(CCTKH12)
  INTEGER*4 CCTKH13
  integer, parameter :: cctki_use_CCTKH13 = kind(CCTKH13)
  INTEGER*4 CCTKH14
  integer, parameter :: cctki_use_CCTKH14 = kind(CCTKH14)
  INTEGER*4 CCTKH16
  integer, parameter :: cctki_use_CCTKH16 = kind(CCTKH16)
  INTEGER*4 CCTKH17
  integer, parameter :: cctki_use_CCTKH17 = kind(CCTKH17)
  INTEGER*4 CCTKH18
  integer, parameter :: cctki_use_CCTKH18 = kind(CCTKH18)
  INTEGER*4 CCTKH20
  integer, parameter :: cctki_use_CCTKH20 = kind(CCTKH20)
  INTEGER*4 CCTKH24
  integer, parameter :: cctki_use_CCTKH24 = kind(CCTKH24)
  INTEGER*4 CCTKH26
  integer, parameter :: cctki_use_CCTKH26 = kind(CCTKH26)
  INTEGER*4 CCTKH27
  integer, parameter :: cctki_use_CCTKH27 = kind(CCTKH27)
  INTEGER*4 CCTKH28
  integer, parameter :: cctki_use_CCTKH28 = kind(CCTKH28)
  INTEGER*4 CCTKH30
  integer, parameter :: cctki_use_CCTKH30 = kind(CCTKH30)
  INTEGER*4 CCTKH32
  integer, parameter :: cctki_use_CCTKH32 = kind(CCTKH32)
  INTEGER*4 CCTKH34
  integer, parameter :: cctki_use_CCTKH34 = kind(CCTKH34)
  INTEGER*4 CCTKH36
  integer, parameter :: cctki_use_CCTKH36 = kind(CCTKH36)
  INTEGER*4 CCTKH38
  integer, parameter :: cctki_use_CCTKH38 = kind(CCTKH38)
  INTEGER*4 CCTKH40
  integer, parameter :: cctki_use_CCTKH40 = kind(CCTKH40)
  INTEGER*4 CCTKH42
  integer, parameter :: cctki_use_CCTKH42 = kind(CCTKH42)
  INTEGER*4 CCTKH44
  integer, parameter :: cctki_use_CCTKH44 = kind(CCTKH44)
  INTEGER*4 CCTKH46
  integer, parameter :: cctki_use_CCTKH46 = kind(CCTKH46)
  INTEGER*4 CCTKH48
  integer, parameter :: cctki_use_CCTKH48 = kind(CCTKH48)
  INTEGER*4 CCTKH50
  integer, parameter :: cctki_use_CCTKH50 = kind(CCTKH50)
  INTEGER*4 CCTKH52
  integer, parameter :: cctki_use_CCTKH52 = kind(CCTKH52)
  INTEGER*4 CCTKH55
  integer, parameter :: cctki_use_CCTKH55 = kind(CCTKH55)
  INTEGER*4 CCTKH56
  integer, parameter :: cctki_use_CCTKH56 = kind(CCTKH56)
  COMMON /IOrest/CCTKH5, CCTKH19, CCTKH29, CCTKH31, CCTKH33, CCTKH35, CCTKH37, CCTKH39, CCTKH41, CCTKH43, CCTKH45, CCTKH2, CCTKH3, &
  &CCTKH6, CCTKH9, CCTKH10, CCTKH11, CCTKH15, out_dir, CCTKH21, CCTKH22, CCTKH23, CCTKH25, CCTKH47, CCTKH49, CCTKH51, CCTKH53, CCTK&
  &H54, CCTKH57, CCTKH0, CCTKH1, CCTKH4, CCTKH7, CCTKH8, CCTKH12, CCTKH13, CCTKH14, CCTKH16, CCTKH17, CCTKH18, CCTKH20, CCTKH24, CC&
  &TKH26, CCTKH27, CCTKH28, CCTKH30, CCTKH32, CCTKH34, CCTKH36, CCTKH38, CCTKH40, CCTKH42, CCTKH44, CCTKH46, CCTKH48, CCTKH50, CCTK&
  &H52, CCTKH55, CCTKH56
  interface
  integer*8 function CCTK_PointerTo (var)
  implicit none
  type(*),dimension(..),TARGET :: var
  end function CCTK_PointerTo
  end interface
  interface
  integer function CCTK_Equals (arg1, arg2)
  implicit none
  integer*8 arg1
  character(*) arg2
  end function CCTK_Equals
  integer function CCTK_MyProc (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_MyProc
  integer function CCTK_nProcs (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_nProcs
  integer function CCTK_IsThornActive (name)
  implicit none
  character(*) name
  end function CCTK_IsThornActive
  integer*8 function CCTK_NullPointer ()
  implicit none
  end function CCTK_NullPointer
  end interface
  interface
  subroutine EOS_Omni_DEpsByDRho_DEpsByDPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DEpsByDRho, DEpsByDPres&
  &s, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DEpsByDRho(*)
  REAL*8 DEpsByDPress(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DEpsByDRho_DEpsByDPress
  end interface
  interface
  subroutine EOS_Omni_DPressByDEps (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDEps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDEps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDEps
  end interface
  interface
  subroutine EOS_Omni_DPressByDRho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDRho, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDRho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDRho
  end interface
  interface
  subroutine EOS_Omni_EpsFromPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, xeps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 xeps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_EpsFromPress
  end interface
  interface
  INTEGER*4 function EOS_Omni_GetHandle (name)
  implicit none
  character(*) name
  end function EOS_Omni_GetHandle
  end interface
  interface
  subroutine EOS_Omni_PressEpsTempYe_from_Rho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_PressEpsTempYe_from_Rho
  end interface
  interface
  subroutine EOS_Omni_RhoFromPressEpsTempEnt (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ent, ye, press, keyerr, anye&
  &rr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ent(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_RhoFromPressEpsTempEnt
  end interface
  interface
  subroutine EOS_Omni_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_cs2
  end interface
  interface
  subroutine EOS_Omni_dpderho_dpdrhoe (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, dpderho, dpdrhoe, keyerr, anyer&
  &r)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpderho_dpdrhoe
  end interface
  interface
  subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdhrho, keye&
  &rr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdhrho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdv2, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdv2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_full (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrho&
  &e, xa, xh, xn, xp, abar, zbar, mue, mun, mup, muhat, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 xa(*)
  REAL*8 xh(*)
  REAL*8 xn(*)
  REAL*8 xp(*)
  REAL*8 abar(*)
  REAL*8 zbar(*)
  REAL*8 mue(*)
  REAL*8 mun(*)
  REAL*8 mup(*)
  REAL*8 muhat(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_full
  end interface
  interface
  subroutine EOS_Omni_press (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press
  end interface
  interface
  subroutine EOS_Omni_pressOMP (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_pressOMP
  end interface
  interface
  subroutine EOS_Omni_press_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_cs2
  end interface
  interface
  subroutine EOS_Omni_press_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, press, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_short (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrh&
  &oe, munu, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 munu(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_short
  end interface

  INTEGER*4, intent(in)     :: eoskey,keytemp,npoints
  INTEGER*4, intent(out)    :: keyerr(npoints)
  INTEGER*4, intent(out)    :: anyerr
  REAL*8, intent(in)    :: rf_precision
  REAL*8, intent(in)    :: hrho(npoints),v2(npoints)
  REAL*8, intent(in)    :: rhoW(npoints),ye(npoints)
  REAL*8, intent(inout) :: eps(npoints), temp(npoints)
  REAL*8, intent(out)   :: press(npoints)

  
  integer          :: i
  real*8           :: gtmp1,gtmp2
  character(256)   :: warnstring
  real*8           :: hybrid_local_gamma, hybrid_local_k_cgs, &
                      hybrid_p_poly, hybrid_p_th
  real*8,parameter :: zero = 0.0d0

  anyerr    = 0
  keyerr(:) = 0

  select case (eoskey)
     case (1)
        
        call CCTK_Error(43,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Polytropic EOS not implemented for press_f_hro_v2_rhoW")
        STOP
     case (2)
        
        if(keytemp.eq.1) then
           call CCTK_Error(48,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","keytemp.eq.1 not implemented for press_f_hro_v2_rhoW")
           STOP
        endif
        do i=1,npoints
           gtmp1 = 1.0d0 - v2(i)
           gtmp2 = rhoW(i)*sqrt(gtmp1)
           press(i) = (gl_gamma - 1.0d0)/(gl_gamma) * &
                (hrho(i)*gtmp1 - gtmp2)
           eps(i) = press(i) / (gl_gamma - 1.0d0) / gtmp2
        enddo
     case (3)
        
        call CCTK_Error(60,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Hybrid EOS not implemented for press_f_hro_v2_rhoW")
        STOP

     case DEFAULT
        write(warnstring,*) "eoskey ",eoskey," not implemented!"
        call CCTK_Error(65,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni",warnstring)
        STOP
     end select

end subroutine EOS_Omni_EOS_Press_f_hrho_v2_rhoW


subroutine EOS_Omni_EOS_dpdhrho_f_hrho_v2_rhoW(eoskey,keytemp,rf_precision,npoints,&
                              hrho,v2,rhoW,eps,temp,ye,dpdhrho,keyerr,anyerr)

  use EOS_Omni_Module
  implicit none
  REAL*8 barotropiceos_gammath
  integer, parameter :: cctki_use_barotropiceos_gammath = kind(barotropiceos_gammath)
  REAL*8 gl_gamma
  integer, parameter :: cctki_use_gl_gamma = kind(gl_gamma)
  REAL*8 gl_k
  integer, parameter :: cctki_use_gl_k = kind(gl_k)
  REAL*8 hybrid_gamma (10)
  integer, parameter :: cctki_use_hybrid_gamma = kind(hybrid_gamma)
  REAL*8 hybrid_gamma1
  integer, parameter :: cctki_use_hybrid_gamma1 = kind(hybrid_gamma1)
  REAL*8 hybrid_gamma2
  integer, parameter :: cctki_use_hybrid_gamma2 = kind(hybrid_gamma2)
  REAL*8 hybrid_gamma_th
  integer, parameter :: cctki_use_hybrid_gamma_th = kind(hybrid_gamma_th)
  REAL*8 hybrid_k0
  integer, parameter :: cctki_use_hybrid_k0 = kind(hybrid_k0)
  REAL*8 hybrid_k1
  integer, parameter :: cctki_use_hybrid_k1 = kind(hybrid_k1)
  REAL*8 hybrid_rho (9)
  integer, parameter :: cctki_use_hybrid_rho = kind(hybrid_rho)
  REAL*8 hybrid_rho_nuc
  integer, parameter :: cctki_use_hybrid_rho_nuc = kind(hybrid_rho_nuc)
  REAL*8 poly_gamma
  integer, parameter :: cctki_use_poly_gamma = kind(poly_gamma)
  REAL*8 poly_gamma_initial
  integer, parameter :: cctki_use_poly_gamma_initial = kind(poly_gamma_initial)
  REAL*8 poly_k
  integer, parameter :: cctki_use_poly_k = kind(poly_k)
  integer*8 barotropiceos_table_name
  integer, parameter :: cctki_use_barotropiceos_table_name = kind(barotropiceos_table_name)
  integer*8 coldeos_table_name
  integer, parameter :: cctki_use_coldeos_table_name = kind(coldeos_table_name)
  integer*8 dump_nuceos_table_name
  integer, parameter :: cctki_use_dump_nuceos_table_name = kind(dump_nuceos_table_name)
  integer*8 nuceos_table_name
  integer, parameter :: cctki_use_nuceos_table_name = kind(nuceos_table_name)
  INTEGER*4 barotropiceos_read_table
  integer, parameter :: cctki_use_barotropiceos_read_table = kind(barotropiceos_read_table)
  INTEGER*4 barotropiceos_use_thermal_gamma_law
  integer, parameter :: cctki_use_barotropiceos_use_thermal_gamma_law = kind(barotropiceos_use_thermal_gamma_law)
  INTEGER*4 coldeos_read_table
  integer, parameter :: cctki_use_coldeos_read_table = kind(coldeos_read_table)
  INTEGER*4 coldeos_use_thermal_gamma_law
  integer, parameter :: cctki_use_coldeos_use_thermal_gamma_law = kind(coldeos_use_thermal_gamma_law)
  INTEGER*4 do_energy_shift
  integer, parameter :: cctki_use_do_energy_shift = kind(do_energy_shift)
  INTEGER*4 dump_nuceos_table
  integer, parameter :: cctki_use_dump_nuceos_table = kind(dump_nuceos_table)
  INTEGER*4 n_pieces
  integer, parameter :: cctki_use_n_pieces = kind(n_pieces)
  INTEGER*4 nuceos_read_table
  integer, parameter :: cctki_use_nuceos_read_table = kind(nuceos_read_table)
  INTEGER*4 read_table_on_single_process
  integer, parameter :: cctki_use_read_table_on_single_process = kind(read_table_on_single_process)
  INTEGER*4 reader_process
  integer, parameter :: cctki_use_reader_process = kind(reader_process)
  COMMON /EOS_Omnirest/barotropiceos_gammath, gl_gamma, gl_k, hybrid_gamma, hybrid_gamma1, hybrid_gamma2, hybrid_gamma_th, hybrid_k&
  &0, hybrid_k1, hybrid_rho, hybrid_rho_nuc, poly_gamma, poly_gamma_initial, poly_k, barotropiceos_table_name, coldeos_table_name, &
  &dump_nuceos_table_name, nuceos_table_name, barotropiceos_read_table, barotropiceos_use_thermal_gamma_law, coldeos_read_table, co&
  &ldeos_use_thermal_gamma_law, do_energy_shift, dump_nuceos_table, n_pieces, nuceos_read_table, read_table_on_single_process, read&
  &er_process
  REAL*8 CCTKH5
  integer, parameter :: cctki_use_CCTKH5 = kind(CCTKH5)
  REAL*8 CCTKH19
  integer, parameter :: cctki_use_CCTKH19 = kind(CCTKH19)
  REAL*8 CCTKH29
  integer, parameter :: cctki_use_CCTKH29 = kind(CCTKH29)
  REAL*8 CCTKH31
  integer, parameter :: cctki_use_CCTKH31 = kind(CCTKH31)
  REAL*8 CCTKH33
  integer, parameter :: cctki_use_CCTKH33 = kind(CCTKH33)
  REAL*8 CCTKH35
  integer, parameter :: cctki_use_CCTKH35 = kind(CCTKH35)
  REAL*8 CCTKH37
  integer, parameter :: cctki_use_CCTKH37 = kind(CCTKH37)
  REAL*8 CCTKH39
  integer, parameter :: cctki_use_CCTKH39 = kind(CCTKH39)
  REAL*8 CCTKH41
  integer, parameter :: cctki_use_CCTKH41 = kind(CCTKH41)
  REAL*8 CCTKH43
  integer, parameter :: cctki_use_CCTKH43 = kind(CCTKH43)
  REAL*8 CCTKH45
  integer, parameter :: cctki_use_CCTKH45 = kind(CCTKH45)
  integer*8 CCTKH2
  integer, parameter :: cctki_use_CCTKH2 = kind(CCTKH2)
  integer*8 CCTKH3
  integer, parameter :: cctki_use_CCTKH3 = kind(CCTKH3)
  integer*8 CCTKH6
  integer, parameter :: cctki_use_CCTKH6 = kind(CCTKH6)
  integer*8 CCTKH9
  integer, parameter :: cctki_use_CCTKH9 = kind(CCTKH9)
  integer*8 CCTKH10
  integer, parameter :: cctki_use_CCTKH10 = kind(CCTKH10)
  integer*8 CCTKH11
  integer, parameter :: cctki_use_CCTKH11 = kind(CCTKH11)
  integer*8 CCTKH15
  integer, parameter :: cctki_use_CCTKH15 = kind(CCTKH15)
  integer*8 out_dir
  integer, parameter :: cctki_use_out_dir = kind(out_dir)
  integer*8 CCTKH21
  integer, parameter :: cctki_use_CCTKH21 = kind(CCTKH21)
  integer*8 CCTKH22
  integer, parameter :: cctki_use_CCTKH22 = kind(CCTKH22)
  integer*8 CCTKH23
  integer, parameter :: cctki_use_CCTKH23 = kind(CCTKH23)
  integer*8 CCTKH25
  integer, parameter :: cctki_use_CCTKH25 = kind(CCTKH25)
  integer*8 CCTKH47
  integer, parameter :: cctki_use_CCTKH47 = kind(CCTKH47)
  integer*8 CCTKH49
  integer, parameter :: cctki_use_CCTKH49 = kind(CCTKH49)
  integer*8 CCTKH51
  integer, parameter :: cctki_use_CCTKH51 = kind(CCTKH51)
  integer*8 CCTKH53
  integer, parameter :: cctki_use_CCTKH53 = kind(CCTKH53)
  integer*8 CCTKH54
  integer, parameter :: cctki_use_CCTKH54 = kind(CCTKH54)
  integer*8 CCTKH57
  integer, parameter :: cctki_use_CCTKH57 = kind(CCTKH57)
  INTEGER*4 CCTKH0
  integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
  INTEGER*4 CCTKH1
  integer, parameter :: cctki_use_CCTKH1 = kind(CCTKH1)
  INTEGER*4 CCTKH4
  integer, parameter :: cctki_use_CCTKH4 = kind(CCTKH4)
  INTEGER*4 CCTKH7
  integer, parameter :: cctki_use_CCTKH7 = kind(CCTKH7)
  INTEGER*4 CCTKH8
  integer, parameter :: cctki_use_CCTKH8 = kind(CCTKH8)
  INTEGER*4 CCTKH12
  integer, parameter :: cctki_use_CCTKH12 = kind(CCTKH12)
  INTEGER*4 CCTKH13
  integer, parameter :: cctki_use_CCTKH13 = kind(CCTKH13)
  INTEGER*4 CCTKH14
  integer, parameter :: cctki_use_CCTKH14 = kind(CCTKH14)
  INTEGER*4 CCTKH16
  integer, parameter :: cctki_use_CCTKH16 = kind(CCTKH16)
  INTEGER*4 CCTKH17
  integer, parameter :: cctki_use_CCTKH17 = kind(CCTKH17)
  INTEGER*4 CCTKH18
  integer, parameter :: cctki_use_CCTKH18 = kind(CCTKH18)
  INTEGER*4 CCTKH20
  integer, parameter :: cctki_use_CCTKH20 = kind(CCTKH20)
  INTEGER*4 CCTKH24
  integer, parameter :: cctki_use_CCTKH24 = kind(CCTKH24)
  INTEGER*4 CCTKH26
  integer, parameter :: cctki_use_CCTKH26 = kind(CCTKH26)
  INTEGER*4 CCTKH27
  integer, parameter :: cctki_use_CCTKH27 = kind(CCTKH27)
  INTEGER*4 CCTKH28
  integer, parameter :: cctki_use_CCTKH28 = kind(CCTKH28)
  INTEGER*4 CCTKH30
  integer, parameter :: cctki_use_CCTKH30 = kind(CCTKH30)
  INTEGER*4 CCTKH32
  integer, parameter :: cctki_use_CCTKH32 = kind(CCTKH32)
  INTEGER*4 CCTKH34
  integer, parameter :: cctki_use_CCTKH34 = kind(CCTKH34)
  INTEGER*4 CCTKH36
  integer, parameter :: cctki_use_CCTKH36 = kind(CCTKH36)
  INTEGER*4 CCTKH38
  integer, parameter :: cctki_use_CCTKH38 = kind(CCTKH38)
  INTEGER*4 CCTKH40
  integer, parameter :: cctki_use_CCTKH40 = kind(CCTKH40)
  INTEGER*4 CCTKH42
  integer, parameter :: cctki_use_CCTKH42 = kind(CCTKH42)
  INTEGER*4 CCTKH44
  integer, parameter :: cctki_use_CCTKH44 = kind(CCTKH44)
  INTEGER*4 CCTKH46
  integer, parameter :: cctki_use_CCTKH46 = kind(CCTKH46)
  INTEGER*4 CCTKH48
  integer, parameter :: cctki_use_CCTKH48 = kind(CCTKH48)
  INTEGER*4 CCTKH50
  integer, parameter :: cctki_use_CCTKH50 = kind(CCTKH50)
  INTEGER*4 CCTKH52
  integer, parameter :: cctki_use_CCTKH52 = kind(CCTKH52)
  INTEGER*4 CCTKH55
  integer, parameter :: cctki_use_CCTKH55 = kind(CCTKH55)
  INTEGER*4 CCTKH56
  integer, parameter :: cctki_use_CCTKH56 = kind(CCTKH56)
  COMMON /IOrest/CCTKH5, CCTKH19, CCTKH29, CCTKH31, CCTKH33, CCTKH35, CCTKH37, CCTKH39, CCTKH41, CCTKH43, CCTKH45, CCTKH2, CCTKH3, &
  &CCTKH6, CCTKH9, CCTKH10, CCTKH11, CCTKH15, out_dir, CCTKH21, CCTKH22, CCTKH23, CCTKH25, CCTKH47, CCTKH49, CCTKH51, CCTKH53, CCTK&
  &H54, CCTKH57, CCTKH0, CCTKH1, CCTKH4, CCTKH7, CCTKH8, CCTKH12, CCTKH13, CCTKH14, CCTKH16, CCTKH17, CCTKH18, CCTKH20, CCTKH24, CC&
  &TKH26, CCTKH27, CCTKH28, CCTKH30, CCTKH32, CCTKH34, CCTKH36, CCTKH38, CCTKH40, CCTKH42, CCTKH44, CCTKH46, CCTKH48, CCTKH50, CCTK&
  &H52, CCTKH55, CCTKH56
  interface
  integer*8 function CCTK_PointerTo (var)
  implicit none
  type(*),dimension(..),TARGET :: var
  end function CCTK_PointerTo
  end interface
  interface
  integer function CCTK_Equals (arg1, arg2)
  implicit none
  integer*8 arg1
  character(*) arg2
  end function CCTK_Equals
  integer function CCTK_MyProc (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_MyProc
  integer function CCTK_nProcs (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_nProcs
  integer function CCTK_IsThornActive (name)
  implicit none
  character(*) name
  end function CCTK_IsThornActive
  integer*8 function CCTK_NullPointer ()
  implicit none
  end function CCTK_NullPointer
  end interface
  interface
  subroutine EOS_Omni_DEpsByDRho_DEpsByDPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DEpsByDRho, DEpsByDPres&
  &s, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DEpsByDRho(*)
  REAL*8 DEpsByDPress(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DEpsByDRho_DEpsByDPress
  end interface
  interface
  subroutine EOS_Omni_DPressByDEps (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDEps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDEps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDEps
  end interface
  interface
  subroutine EOS_Omni_DPressByDRho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDRho, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDRho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDRho
  end interface
  interface
  subroutine EOS_Omni_EpsFromPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, xeps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 xeps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_EpsFromPress
  end interface
  interface
  INTEGER*4 function EOS_Omni_GetHandle (name)
  implicit none
  character(*) name
  end function EOS_Omni_GetHandle
  end interface
  interface
  subroutine EOS_Omni_PressEpsTempYe_from_Rho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_PressEpsTempYe_from_Rho
  end interface
  interface
  subroutine EOS_Omni_RhoFromPressEpsTempEnt (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ent, ye, press, keyerr, anye&
  &rr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ent(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_RhoFromPressEpsTempEnt
  end interface
  interface
  subroutine EOS_Omni_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_cs2
  end interface
  interface
  subroutine EOS_Omni_dpderho_dpdrhoe (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, dpderho, dpdrhoe, keyerr, anyer&
  &r)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpderho_dpdrhoe
  end interface
  interface
  subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdhrho, keye&
  &rr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdhrho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdv2, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdv2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_full (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrho&
  &e, xa, xh, xn, xp, abar, zbar, mue, mun, mup, muhat, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 xa(*)
  REAL*8 xh(*)
  REAL*8 xn(*)
  REAL*8 xp(*)
  REAL*8 abar(*)
  REAL*8 zbar(*)
  REAL*8 mue(*)
  REAL*8 mun(*)
  REAL*8 mup(*)
  REAL*8 muhat(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_full
  end interface
  interface
  subroutine EOS_Omni_press (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press
  end interface
  interface
  subroutine EOS_Omni_pressOMP (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_pressOMP
  end interface
  interface
  subroutine EOS_Omni_press_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_cs2
  end interface
  interface
  subroutine EOS_Omni_press_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, press, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_short (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrh&
  &oe, munu, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 munu(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_short
  end interface

  INTEGER*4, intent(in)     :: eoskey,keytemp,npoints
  INTEGER*4, intent(out)    :: keyerr(npoints)
  INTEGER*4, intent(out)    :: anyerr
  REAL*8, intent(in)    :: rf_precision
  REAL*8, intent(in)    :: hrho(npoints),v2(npoints)
  REAL*8, intent(in)    :: rhoW(npoints),ye(npoints)
  REAL*8, intent(inout) :: eps(npoints), temp(npoints)
  REAL*8, intent(out)   :: dpdhrho(npoints)

  
  integer          :: i
  character(256)   :: warnstring
  real*8           :: hybrid_local_gamma, hybrid_local_k_cgs, &
                      hybrid_p_poly, hybrid_p_th
  real*8,parameter :: zero = 0.0d0

  anyerr    = 0
  keyerr(:) = 0

  select case (eoskey)
     case (1)
        
        call CCTK_Error(102,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Polytropic EOS not implemented for press_f_hro_v2_rhoW")
        STOP
     case (2)
        
        if(keytemp.eq.1) then
           call CCTK_Error(107,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","keytemp.eq.1 not implemented for press_f_hro_v2_rhoW")
           STOP
        endif
        do i=1,npoints
           dpdhrho(i) = (gl_gamma - 1.0d0) * (1.0d0 - v2(i)) / (gl_gamma)
        enddo
     case (3)
        
        call CCTK_Error(115,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Hybrid EOS not implemented for press_f_hro_v2_rhoW")
        STOP

     case DEFAULT
        write(warnstring,*) "eoskey ",eoskey," not implemented!"
        call CCTK_Error(120,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni",warnstring)
        STOP
     end select

end subroutine EOS_Omni_EOS_dpdhrho_f_hrho_v2_rhoW


subroutine EOS_Omni_EOS_dpdv2_f_hrho_v2_rhoW(eoskey,keytemp,rf_precision,npoints,&
                              hrho,v2,rhoW,eps,temp,ye,dpdv2,keyerr,anyerr)

  use EOS_Omni_Module
  implicit none
  REAL*8 barotropiceos_gammath
  integer, parameter :: cctki_use_barotropiceos_gammath = kind(barotropiceos_gammath)
  REAL*8 gl_gamma
  integer, parameter :: cctki_use_gl_gamma = kind(gl_gamma)
  REAL*8 gl_k
  integer, parameter :: cctki_use_gl_k = kind(gl_k)
  REAL*8 hybrid_gamma (10)
  integer, parameter :: cctki_use_hybrid_gamma = kind(hybrid_gamma)
  REAL*8 hybrid_gamma1
  integer, parameter :: cctki_use_hybrid_gamma1 = kind(hybrid_gamma1)
  REAL*8 hybrid_gamma2
  integer, parameter :: cctki_use_hybrid_gamma2 = kind(hybrid_gamma2)
  REAL*8 hybrid_gamma_th
  integer, parameter :: cctki_use_hybrid_gamma_th = kind(hybrid_gamma_th)
  REAL*8 hybrid_k0
  integer, parameter :: cctki_use_hybrid_k0 = kind(hybrid_k0)
  REAL*8 hybrid_k1
  integer, parameter :: cctki_use_hybrid_k1 = kind(hybrid_k1)
  REAL*8 hybrid_rho (9)
  integer, parameter :: cctki_use_hybrid_rho = kind(hybrid_rho)
  REAL*8 hybrid_rho_nuc
  integer, parameter :: cctki_use_hybrid_rho_nuc = kind(hybrid_rho_nuc)
  REAL*8 poly_gamma
  integer, parameter :: cctki_use_poly_gamma = kind(poly_gamma)
  REAL*8 poly_gamma_initial
  integer, parameter :: cctki_use_poly_gamma_initial = kind(poly_gamma_initial)
  REAL*8 poly_k
  integer, parameter :: cctki_use_poly_k = kind(poly_k)
  integer*8 barotropiceos_table_name
  integer, parameter :: cctki_use_barotropiceos_table_name = kind(barotropiceos_table_name)
  integer*8 coldeos_table_name
  integer, parameter :: cctki_use_coldeos_table_name = kind(coldeos_table_name)
  integer*8 dump_nuceos_table_name
  integer, parameter :: cctki_use_dump_nuceos_table_name = kind(dump_nuceos_table_name)
  integer*8 nuceos_table_name
  integer, parameter :: cctki_use_nuceos_table_name = kind(nuceos_table_name)
  INTEGER*4 barotropiceos_read_table
  integer, parameter :: cctki_use_barotropiceos_read_table = kind(barotropiceos_read_table)
  INTEGER*4 barotropiceos_use_thermal_gamma_law
  integer, parameter :: cctki_use_barotropiceos_use_thermal_gamma_law = kind(barotropiceos_use_thermal_gamma_law)
  INTEGER*4 coldeos_read_table
  integer, parameter :: cctki_use_coldeos_read_table = kind(coldeos_read_table)
  INTEGER*4 coldeos_use_thermal_gamma_law
  integer, parameter :: cctki_use_coldeos_use_thermal_gamma_law = kind(coldeos_use_thermal_gamma_law)
  INTEGER*4 do_energy_shift
  integer, parameter :: cctki_use_do_energy_shift = kind(do_energy_shift)
  INTEGER*4 dump_nuceos_table
  integer, parameter :: cctki_use_dump_nuceos_table = kind(dump_nuceos_table)
  INTEGER*4 n_pieces
  integer, parameter :: cctki_use_n_pieces = kind(n_pieces)
  INTEGER*4 nuceos_read_table
  integer, parameter :: cctki_use_nuceos_read_table = kind(nuceos_read_table)
  INTEGER*4 read_table_on_single_process
  integer, parameter :: cctki_use_read_table_on_single_process = kind(read_table_on_single_process)
  INTEGER*4 reader_process
  integer, parameter :: cctki_use_reader_process = kind(reader_process)
  COMMON /EOS_Omnirest/barotropiceos_gammath, gl_gamma, gl_k, hybrid_gamma, hybrid_gamma1, hybrid_gamma2, hybrid_gamma_th, hybrid_k&
  &0, hybrid_k1, hybrid_rho, hybrid_rho_nuc, poly_gamma, poly_gamma_initial, poly_k, barotropiceos_table_name, coldeos_table_name, &
  &dump_nuceos_table_name, nuceos_table_name, barotropiceos_read_table, barotropiceos_use_thermal_gamma_law, coldeos_read_table, co&
  &ldeos_use_thermal_gamma_law, do_energy_shift, dump_nuceos_table, n_pieces, nuceos_read_table, read_table_on_single_process, read&
  &er_process
  REAL*8 CCTKH5
  integer, parameter :: cctki_use_CCTKH5 = kind(CCTKH5)
  REAL*8 CCTKH19
  integer, parameter :: cctki_use_CCTKH19 = kind(CCTKH19)
  REAL*8 CCTKH29
  integer, parameter :: cctki_use_CCTKH29 = kind(CCTKH29)
  REAL*8 CCTKH31
  integer, parameter :: cctki_use_CCTKH31 = kind(CCTKH31)
  REAL*8 CCTKH33
  integer, parameter :: cctki_use_CCTKH33 = kind(CCTKH33)
  REAL*8 CCTKH35
  integer, parameter :: cctki_use_CCTKH35 = kind(CCTKH35)
  REAL*8 CCTKH37
  integer, parameter :: cctki_use_CCTKH37 = kind(CCTKH37)
  REAL*8 CCTKH39
  integer, parameter :: cctki_use_CCTKH39 = kind(CCTKH39)
  REAL*8 CCTKH41
  integer, parameter :: cctki_use_CCTKH41 = kind(CCTKH41)
  REAL*8 CCTKH43
  integer, parameter :: cctki_use_CCTKH43 = kind(CCTKH43)
  REAL*8 CCTKH45
  integer, parameter :: cctki_use_CCTKH45 = kind(CCTKH45)
  integer*8 CCTKH2
  integer, parameter :: cctki_use_CCTKH2 = kind(CCTKH2)
  integer*8 CCTKH3
  integer, parameter :: cctki_use_CCTKH3 = kind(CCTKH3)
  integer*8 CCTKH6
  integer, parameter :: cctki_use_CCTKH6 = kind(CCTKH6)
  integer*8 CCTKH9
  integer, parameter :: cctki_use_CCTKH9 = kind(CCTKH9)
  integer*8 CCTKH10
  integer, parameter :: cctki_use_CCTKH10 = kind(CCTKH10)
  integer*8 CCTKH11
  integer, parameter :: cctki_use_CCTKH11 = kind(CCTKH11)
  integer*8 CCTKH15
  integer, parameter :: cctki_use_CCTKH15 = kind(CCTKH15)
  integer*8 out_dir
  integer, parameter :: cctki_use_out_dir = kind(out_dir)
  integer*8 CCTKH21
  integer, parameter :: cctki_use_CCTKH21 = kind(CCTKH21)
  integer*8 CCTKH22
  integer, parameter :: cctki_use_CCTKH22 = kind(CCTKH22)
  integer*8 CCTKH23
  integer, parameter :: cctki_use_CCTKH23 = kind(CCTKH23)
  integer*8 CCTKH25
  integer, parameter :: cctki_use_CCTKH25 = kind(CCTKH25)
  integer*8 CCTKH47
  integer, parameter :: cctki_use_CCTKH47 = kind(CCTKH47)
  integer*8 CCTKH49
  integer, parameter :: cctki_use_CCTKH49 = kind(CCTKH49)
  integer*8 CCTKH51
  integer, parameter :: cctki_use_CCTKH51 = kind(CCTKH51)
  integer*8 CCTKH53
  integer, parameter :: cctki_use_CCTKH53 = kind(CCTKH53)
  integer*8 CCTKH54
  integer, parameter :: cctki_use_CCTKH54 = kind(CCTKH54)
  integer*8 CCTKH57
  integer, parameter :: cctki_use_CCTKH57 = kind(CCTKH57)
  INTEGER*4 CCTKH0
  integer, parameter :: cctki_use_CCTKH0 = kind(CCTKH0)
  INTEGER*4 CCTKH1
  integer, parameter :: cctki_use_CCTKH1 = kind(CCTKH1)
  INTEGER*4 CCTKH4
  integer, parameter :: cctki_use_CCTKH4 = kind(CCTKH4)
  INTEGER*4 CCTKH7
  integer, parameter :: cctki_use_CCTKH7 = kind(CCTKH7)
  INTEGER*4 CCTKH8
  integer, parameter :: cctki_use_CCTKH8 = kind(CCTKH8)
  INTEGER*4 CCTKH12
  integer, parameter :: cctki_use_CCTKH12 = kind(CCTKH12)
  INTEGER*4 CCTKH13
  integer, parameter :: cctki_use_CCTKH13 = kind(CCTKH13)
  INTEGER*4 CCTKH14
  integer, parameter :: cctki_use_CCTKH14 = kind(CCTKH14)
  INTEGER*4 CCTKH16
  integer, parameter :: cctki_use_CCTKH16 = kind(CCTKH16)
  INTEGER*4 CCTKH17
  integer, parameter :: cctki_use_CCTKH17 = kind(CCTKH17)
  INTEGER*4 CCTKH18
  integer, parameter :: cctki_use_CCTKH18 = kind(CCTKH18)
  INTEGER*4 CCTKH20
  integer, parameter :: cctki_use_CCTKH20 = kind(CCTKH20)
  INTEGER*4 CCTKH24
  integer, parameter :: cctki_use_CCTKH24 = kind(CCTKH24)
  INTEGER*4 CCTKH26
  integer, parameter :: cctki_use_CCTKH26 = kind(CCTKH26)
  INTEGER*4 CCTKH27
  integer, parameter :: cctki_use_CCTKH27 = kind(CCTKH27)
  INTEGER*4 CCTKH28
  integer, parameter :: cctki_use_CCTKH28 = kind(CCTKH28)
  INTEGER*4 CCTKH30
  integer, parameter :: cctki_use_CCTKH30 = kind(CCTKH30)
  INTEGER*4 CCTKH32
  integer, parameter :: cctki_use_CCTKH32 = kind(CCTKH32)
  INTEGER*4 CCTKH34
  integer, parameter :: cctki_use_CCTKH34 = kind(CCTKH34)
  INTEGER*4 CCTKH36
  integer, parameter :: cctki_use_CCTKH36 = kind(CCTKH36)
  INTEGER*4 CCTKH38
  integer, parameter :: cctki_use_CCTKH38 = kind(CCTKH38)
  INTEGER*4 CCTKH40
  integer, parameter :: cctki_use_CCTKH40 = kind(CCTKH40)
  INTEGER*4 CCTKH42
  integer, parameter :: cctki_use_CCTKH42 = kind(CCTKH42)
  INTEGER*4 CCTKH44
  integer, parameter :: cctki_use_CCTKH44 = kind(CCTKH44)
  INTEGER*4 CCTKH46
  integer, parameter :: cctki_use_CCTKH46 = kind(CCTKH46)
  INTEGER*4 CCTKH48
  integer, parameter :: cctki_use_CCTKH48 = kind(CCTKH48)
  INTEGER*4 CCTKH50
  integer, parameter :: cctki_use_CCTKH50 = kind(CCTKH50)
  INTEGER*4 CCTKH52
  integer, parameter :: cctki_use_CCTKH52 = kind(CCTKH52)
  INTEGER*4 CCTKH55
  integer, parameter :: cctki_use_CCTKH55 = kind(CCTKH55)
  INTEGER*4 CCTKH56
  integer, parameter :: cctki_use_CCTKH56 = kind(CCTKH56)
  COMMON /IOrest/CCTKH5, CCTKH19, CCTKH29, CCTKH31, CCTKH33, CCTKH35, CCTKH37, CCTKH39, CCTKH41, CCTKH43, CCTKH45, CCTKH2, CCTKH3, &
  &CCTKH6, CCTKH9, CCTKH10, CCTKH11, CCTKH15, out_dir, CCTKH21, CCTKH22, CCTKH23, CCTKH25, CCTKH47, CCTKH49, CCTKH51, CCTKH53, CCTK&
  &H54, CCTKH57, CCTKH0, CCTKH1, CCTKH4, CCTKH7, CCTKH8, CCTKH12, CCTKH13, CCTKH14, CCTKH16, CCTKH17, CCTKH18, CCTKH20, CCTKH24, CC&
  &TKH26, CCTKH27, CCTKH28, CCTKH30, CCTKH32, CCTKH34, CCTKH36, CCTKH38, CCTKH40, CCTKH42, CCTKH44, CCTKH46, CCTKH48, CCTKH50, CCTK&
  &H52, CCTKH55, CCTKH56
  interface
  integer*8 function CCTK_PointerTo (var)
  implicit none
  type(*),dimension(..),TARGET :: var
  end function CCTK_PointerTo
  end interface
  interface
  integer function CCTK_Equals (arg1, arg2)
  implicit none
  integer*8 arg1
  character(*) arg2
  end function CCTK_Equals
  integer function CCTK_MyProc (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_MyProc
  integer function CCTK_nProcs (cctkGH)
  implicit none
  integer*8 cctkGH
  end function CCTK_nProcs
  integer function CCTK_IsThornActive (name)
  implicit none
  character(*) name
  end function CCTK_IsThornActive
  integer*8 function CCTK_NullPointer ()
  implicit none
  end function CCTK_NullPointer
  end interface
  interface
  subroutine EOS_Omni_DEpsByDRho_DEpsByDPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DEpsByDRho, DEpsByDPres&
  &s, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DEpsByDRho(*)
  REAL*8 DEpsByDPress(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DEpsByDRho_DEpsByDPress
  end interface
  interface
  subroutine EOS_Omni_DPressByDEps (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDEps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDEps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDEps
  end interface
  interface
  subroutine EOS_Omni_DPressByDRho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, DPressByDRho, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 DPressByDRho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_DPressByDRho
  end interface
  interface
  subroutine EOS_Omni_EpsFromPress (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, xeps, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 xeps(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_EpsFromPress
  end interface
  interface
  INTEGER*4 function EOS_Omni_GetHandle (name)
  implicit none
  character(*) name
  end function EOS_Omni_GetHandle
  end interface
  interface
  subroutine EOS_Omni_PressEpsTempYe_from_Rho (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_PressEpsTempYe_from_Rho
  end interface
  interface
  subroutine EOS_Omni_RhoFromPressEpsTempEnt (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ent, ye, press, keyerr, anye&
  &rr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ent(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_RhoFromPressEpsTempEnt
  end interface
  interface
  subroutine EOS_Omni_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_cs2
  end interface
  interface
  subroutine EOS_Omni_dpderho_dpdrhoe (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, dpderho, dpdrhoe, keyerr, anyer&
  &r)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpderho_dpdrhoe
  end interface
  interface
  subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdhrho, keye&
  &rr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdhrho(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdhrho_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, dpdv2, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 dpdv2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_dpdv2_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_full (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrho&
  &e, xa, xh, xn, xp, abar, zbar, mue, mun, mup, muhat, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 xa(*)
  REAL*8 xh(*)
  REAL*8 xn(*)
  REAL*8 xp(*)
  REAL*8 abar(*)
  REAL*8 zbar(*)
  REAL*8 mue(*)
  REAL*8 mun(*)
  REAL*8 mup(*)
  REAL*8 muhat(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_full
  end interface
  interface
  subroutine EOS_Omni_press (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press
  end interface
  interface
  subroutine EOS_Omni_pressOMP (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_pressOMP
  end interface
  interface
  subroutine EOS_Omni_press_cs2 (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, cs2, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 cs2(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_cs2
  end interface
  interface
  subroutine EOS_Omni_press_f_hrho_v2_rhoW (eoskey, havetemp, rf_precision, npoints, hrho, v2, rhoW, eps, temp, ye, press, keyerr, &
  &anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 hrho(*)
  REAL*8 v2(*)
  REAL*8 rhoW(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_press_f_hrho_v2_rhoW
  end interface
  interface
  subroutine EOS_Omni_short (eoskey, havetemp, rf_precision, npoints, rho, eps, temp, ye, press, entropy, cs2, dedt, dpderho, dpdrh&
  &oe, munu, keyerr, anyerr)
  implicit none
  INTEGER*4 eoskey
  INTEGER*4 havetemp
  REAL*8 rf_precision
  INTEGER*4 npoints
  REAL*8 rho(*)
  REAL*8 eps(*)
  REAL*8 temp(*)
  REAL*8 ye(*)
  REAL*8 press(*)
  REAL*8 entropy(*)
  REAL*8 cs2(*)
  REAL*8 dedt(*)
  REAL*8 dpderho(*)
  REAL*8 dpdrhoe(*)
  REAL*8 munu(*)
  INTEGER*4 keyerr(*)
  INTEGER*4 anyerr
  end subroutine EOS_Omni_short
  end interface

  INTEGER*4, intent(in)     :: eoskey,keytemp,npoints
  INTEGER*4, intent(out)    :: keyerr(npoints)
  INTEGER*4, intent(out)    :: anyerr
  REAL*8, intent(in)    :: rf_precision
  REAL*8, intent(in)    :: hrho(npoints),v2(npoints)
  REAL*8, intent(in)    :: rhoW(npoints),ye(npoints)
  REAL*8, intent(inout) :: eps(npoints), temp(npoints)
  REAL*8, intent(out)   :: dpdv2(npoints)

  
  integer          :: i
  character(256)   :: warnstring
  real*8           :: hybrid_local_gamma, hybrid_local_k_cgs, &
                      hybrid_p_poly, hybrid_p_th
  real*8,parameter :: zero = 0.0d0

  anyerr    = 0
  keyerr(:) = 0

  select case (eoskey)
     case (1)
        
        call CCTK_Error(157,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Polytropic EOS not implemented for press_f_hro_v2_rhoW")
        STOP
     case (2)
        
        if(keytemp.eq.1) then
           call CCTK_Error(162,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","keytemp.eq.1 not implemented for press_f_hro_v2_rhoW")
           STOP
        endif
        do i=1,npoints
           dpdv2(i) = (gl_gamma - 1.0d0) * (0.5d0 * rhoW(i) &
                / sqrt(1.0d0 - v2(i)) - hrho(i)) / gl_gamma
        enddo
     case (3)
        
        call CCTK_Error(171,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni","Hybrid EOS not implemented for press_f_hro_v2_rhoW")
        STOP

     case DEFAULT
        write(warnstring,*) "eoskey ",eoskey," not implemented!"
        call CCTK_Error(176,"EOS_Omni_SingleVarCalls_harm.F90","EOS_Omni",warnstring)
        STOP
     end select

end subroutine EOS_Omni_EOS_dpdv2_f_hrho_v2_rhoW


