The fWaveFlux uses a Riemann decomposition to determine the upwind direction.
is linearized in 1d to produce
The Jacobian \(\frac{\partial f}{\partial q}\) contains information about wave speeds and direction. Applying an eigenvalue decomposition to the Jacobian we have \(\frac{\partial f}{\partial q}=R\,\Lambda\,L\) where \(R\) is the matrix of right eigenvectors, \(L\) is the matrix of left eigenvectors and \(\Lambda\) is the diagonal matrix of eigenvalues denoted by \(\lambda_{\alpha}\), or wave speeds. The sign of these waves tells us which direction is upwind.
The left eigenvector matrix \(L\) is applied to the fluxes at the face of a cell so that \(\beta^{+}_{\alpha}=\left[L\,f^{+}_{i}\right]_{\alpha}\), \(\beta^{-}_{\alpha}=\left[L\,f^{-}_{i+1}\right]_{\alpha}\), \(\omega^{+}_{\alpha}=\left[L\,q^{+}_{i}\right]_{\alpha}\) and \(\omega^{-}_{\alpha}=\left[L\,q^{-}_{i+1}\right]_{\alpha}\). The fluxes are then chosen based on the sign of the eigenvalues, therefore
where \(\lambda_{max}\) is the maximum eigenvalue of the system (in absolute value) at the interface.
The transformed flux is the rotated back to give
Riemann decompositions typically produce the least diffusive fluxes, however they do not preserve positivity of pressure and density so are typically not used in problems with vacuum regions.