PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches

◆ flux_limiter() [2/2]

double pism::flux_limiter ( double  F,
double  F_out_c,
double  F_out_n,
double  x_c,
double  x_n 
)

Smolarkiewicz-Zalesak flux limiter (equation 10 in [Smolarkiewicz1989])

Parameters
[in]Ftotal flux across a boundary between two cells ("c" and "n") over the course of a time step
[in]F_out_ctotal flux leaving the "current" cell over the course of a time step
[in]F_out_ntotal flux leaving the "neighbor" cell over the course of a time step
[in]x_cvalue at the "current" cell (non-negative)
[in]x_nvalue at the "neighbor" cell (non-negative)

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 pp(F) * dt / delta where delta is grid spacing (dx or dy).

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 pp(F) / F_out_c * x_c should be replaced by 0.

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 -np(F) / F_out_n * x_n should be replaced by 0.

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().