Extract primitive variables (rho, u, p) from a conserved state vector.
Inverse of the conserved-to-primitive map for the 1-D Euler equations: rho = q(1), u = q(2)/rho, p = (q(3) - ½ρu²)(γ-1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q(:) | |||
| real(kind=wp), | intent(in) | :: | gam |
Ratio of specific heats γ |
||
| real(kind=wp), | intent(out) | :: | rho |
Density |
||
| real(kind=wp), | intent(out) | :: | u |
Density Velocity |
||
| real(kind=wp), | intent(out) | :: | p |
Density Velocity Pressure |