|
PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
|
◆ flux_limiter() [2/2]Smolarkiewicz-Zalesak flux limiter (equation 10 in [Smolarkiewicz1989])
Returns the limited total flux over the course of a time step Notes: Equation 10 contains the fraction pp(F) / F_out_c, so we need to avoid division by zero. Note that F_out_c >= 0 by construction. Also, if pp(F) > 0 then F_out_c > 0 because F_out_c contains a term This implies that if F_out_c == 0 then pp(F) == 0 (equivalently, F <= 0). But if pp(F) == 0 then F is a flux into the cell "c" and it cannot make the value x_c negative, so we don't need to limit it using the value of x_c. This implies that the term Equation 10 also contains the fraction -np(F) / F_out_n, so we need to avoid division by zero here as well. Note that F_out_n >= 0 by construction. Also, if np(F) > 0 then F_out_n > 0 because F_out_n contains a term np(F) * dt / delta` where delta is grid spacing (dx or dy). This implies that if F_out_n == 0 then np(F) == 0 (equivalently, F >= 0). But if np(F) == 0 then F is a flux into the cell "n" and it cannot make the value x_n negative, so we don't need to limit it using the value of x_n. This implies that the term Definition at line 107 of file flux_limiter.cc. References F(), pism::details::np(), and pism::details::pp(). Referenced by flux_limiter(), and make_nonnegative_preserving(). |