Skip to content

Memoizer

Options for memoizing wrappers.

The memoizers store and reuse previously computed results to speed up the fixed-point iterations in OBC and Lyapunov solvers.

mode#

mode: Literal['auto', 'force', 'force-after-first', 'off'] = 'auto'

The memoization mode to determine when to do fixed-point iterations.

  • "auto": Automatically decides whether to use memoization based on the specified tolerances. Only useful if all ranks memoize.
  • "force": Always use memoization.
  • "force-after-first": Use memoization after the first SCBA iteration.
  • "off": Never use memoization.

num_ref_iterations#

num_ref_iterations: PositiveInt = 2

The number of fixed-point iterations to perform.

relative_tol#

relative_tol: PositiveFloat = 0.2

The relative tolerance for the fixed-point iterations.

Only used if mode is set to "auto".

absolute_tol#

absolute_tol: PositiveFloat = 1e-06

The absolute tolerance for the fixed-point iterations.

Only used if mode is set to "auto".

warning_threshold#

warning_threshold: PositiveFloat = 0.1

The threshold for issuing a warning if the memoized functions residual is above this value after the fixed-point iterations.

agreement_threshold#

agreement_threshold: float = 0.999