method_info

Contents

method_info#

class braintools.quad.method_info(name, kind='ode')#

Look up the metadata of a registered one-step integrator.

Parameters:
  • name (str) – Short name, alias (e.g. 'heun3') or full public function name (e.g. 'ode_rk4_step') of the method.

  • kind (str) – Equation kind. Default 'ode'.

Returns:

A snapshot of the method’s canonical name, stepper and metadata.

Return type:

MethodInfo

Raises:
  • KeyError – If no method of that name or alias is registered for kind. The message lists the closest registered names (difflib).

  • ValueError – If kind is unknown.

  • TypeError – If name is not a string.

See also

get_method

Look up the stepper only.

register_method

Register a method with its metadata.

Examples

>>> from braintools.quad import method_info, ode_ssprk33_step
>>> info = method_info('ssprk3')
>>> info.name, info.order, info.fn is ode_ssprk33_step
('ssprk33', 3, True)
>>> method_info('ode_rk4_step').aliases
()