astronomix._fluid_equations._eigen_hydro#
Computations of the eigenvalues and eigenvectors for the Euler (hydrodynamics) equations.
Problems for differentiation largely follow from square roots and divisions: The derivative of sqrt(x) is 1/(2*sqrt(x)) and of 1/x is -1/x^2, where both expressions are problematic for small x, especially when multiplying gradients in the backward pass, -> exploding gradients.
Module Contents#
Functions#
Square root with a small floor, so its derivative stays finite at x = 0. |