conatus.expert.EmbeddedError

class conatus.expert.EmbeddedError(solver, adapt=False, tol=None, safety=None, dt_min=0.0, dt_max=inf)[source]

Bases: object

Temporal error of one step, from a lower-order companion on the same data.

Parameters:
  • solver (IVPSolver)

  • adapt (bool)

  • tol (float | None)

  • safety (float | None)

  • dt_min (float)

  • dt_max (float)

step()[source]

Advance one step with the main scheme; return ||X - X_low|| / ||X|| (max norm).

adapt=True: a step whose estimate exceeds tol is rejected, the state (X, t, iteration) restored and the step retried with a smaller dt (review finding 10: the step used to be kept whatever its error, only the next dt changed); the accepted estimate is returned and the next dt proposed from it. ConvergenceError if tol cannot be met at dt_min or after MAX_REJECTIONS retries.

Return type:

float

explain()[source]

Main scheme, companion and whether dt is adapted.

Return type:

str