autopdex.dae.RootIterationController

class autopdex.dae.RootIterationController(target_niters: int = 6, gamma: float = 0.5, max_step_size: float = 1e+20, min_step_size: float = 1e-06)[source]

Root Iteration Controller for adjusting step size based on number of root solver iterations.

Tries to achieve a target number of Newton iterations by adjusting the step size. Does not consider possible error estimates. Maximal and minimal step sizes can be set.

__init__(target_niters: int = 6, gamma: float = 0.5, max_step_size: float = 1e+20, min_step_size: float = 1e-06)[source]

Initialize the RootIterationController.

Parameters:
  • target_niters (int) – Desired number of Newton iterations.

  • gamma (float) – Proportionality factor for step size adjustment.

  • max_step_size (float) – Maximum allowable step size.

  • min_step_size (float) – Minimum allowable step size.

Methods

__delattr__(name, /)

Implement delattr(self, name).

__dir__()

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__getstate__()

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init_subclass__

This method is called when a class is subclassed.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)

__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__()

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

check_accept(state, converged, verbose)

Check whether the current step should be accepted.

compute_scaler(error, q, q_n, state, order, ...)

Compute the scaling factor step_scaler and update the controller state.

initialize(initial_error)

Initialize the controller state based on the initial error.

Attributes

__abstractmethods__

__annotations__

__dict__

__doc__

__module__

__slots__

__weakref__

list of weak references to the object

_abc_impl