Equation of state Riemann solver

Equation of state are important physics component in astrophysics. I followed Kengo Tomida's prescription (Radiation Magnetohydrodynamic Simulations of Protostellar Collapse: Protostellar Core Formation) to calculate the equation of state of ideal gas using statistical mechanics. This mixture of gas is consisted of seven species of particles, they are electron, HeIII, HeII, HeI (atomic helium), HII, HI (atomic hydrogen) and molecular hydrogen. I changed Kengo's algorithm so that the code does not encounter numerical overflow or underflow in calculating huge partition functions.

For X=0.7 and Y=0.3, the ratio of specific heat and mean atomic weight are shown on right side. It is a MPI code written in Fortran.