smoothLimitInside¶
Once continuously differentiable limitation of x to [l + deltaX, u - deltaX], strictly inside [l, u] (for arguments of functions singular at the bounds, as acos at -1 and 1)
FastSmoothBuildings.Utilities.smoothLimitInside, function (source)
Purpose
Limitation of x strictly inside [l, u], once continuously differentiable: for the argument of
a function singular at the bounds, as acos and asin at −1 and 1.
Equations
With δ = deltaX,
y = smoothMin(smoothMax(x, l + δ, δ), u − δ, δ),
with smoothMax and smoothMin. For u − l ≥ 4 δ: y = l + δ for x < l, y = x between l + 2 δ and u − 2 δ, y = u − δ for x > u. In the blends the result passes at most 0.087 δ beyond l + δ and u − δ, so it stays at least 0.91 δ away from the bounds. C1.
Use
The weather and the windows bound the cosines they give to acos and asin with it, whose
derivatives are infinite at −1 and 1.
Revisions¶
- October 2026: moved from trano's
FastModel.Utilities.