Discretization of the HD, SHD and GHD equations in its Lagrangian form.

We try to write the formulas in its most general form and fix First of all, in the simplest form of the HD equations we have $latex frac{dboldsymbol{v}_a}{dt} = -sum_b m_b (frac{P_a}{rho_a^2} + frac{P_b}{rho_b^2}) nabla_a W_{ab}$ (momentum) where: $latex rho_a = sum_b m_b W_{ab}$ (density), $latex frac{de_a}{dt} = frac{1}{2} sum_b m_b (frac{P_a}{rho_a^2} + frac{P_b}{rho_b^2}) boldsymbol{v}_{ab} […]