ENH: improved handling for clamping

- proper component-wise clamping for MinMax clamp().

- construct clampOp from components

- propagate clamp() method from GeometricField to FieldField and Field

- clamp_min() and clamp_max() for one-sided clamping,
  as explicit alternative to min/max free functions which can
  be less intuitive and often involve additional field copies.

- top-level checks to skip applying invalid min/max ranges
  and bypass the internal checks of MinMax::clamp() etc.
This commit is contained in:
Mark Olesen
2023-01-13 20:45:53 +01:00
parent 3888bfa17f
commit ba153df8db
25 changed files with 501 additions and 164 deletions

View File

@ -1279,7 +1279,7 @@ void write_scalarField
continue;
}
os << limits.clip(fld(cellIdx)) << nl;
os << limits.clamp(fld(cellIdx)) << nl;
}
os << token::END_LIST << token::END_STATEMENT << nl;