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

◆ make_nonnegative_preserving()

int pism::make_nonnegative_preserving ( double  dt,
const array::Scalar1 x,
const array::Staggered1 flux,
array::Staggered result 
)

Limit fluxes to preserve non-negativity of a transported quantity.

See flux_limiter() for details.

Limit fluxes to preserve non-negativity of a transported quantity.

Parameters
[in]dttime step length (seconds)
[in]xtransported quantity (non-negative)
[in]fluxflux on the staggered grid
[in]resultflux with the limiter applied

Returns the number of grid cells affected by the flux limiter.

Does not require communication.

Definition at line 199 of file flux_limiter.cc.

References pism::array::Array2D< T >::E(), flux_limiter(), GlobalSum(), pism::array::Array::grid(), pism::array::Array2D< T >::N(), and pism::array::Staggered1::star().

Referenced by pism::GeometryEvolution::flow_step(), and pism::UNO::update().