register_integrator

register_integrator#

class braincell.quad.register_integrator(name, *, aliases=(), category='general', order=None, description='', deprecated=False, override=False)[source]#

Decorator: register the wrapped function in the global registry.

The decorated function is returned unchanged so it remains directly callable. Place this decorator outside any other decorators (such as braincell._misc.set_module_as()) so that the registry stores the

final exported function.

Parameters:
Return type:

Callable[[Callable], Callable]

Examples

>>> from braincell.quad import register_integrator
>>> @register_integrator("euler", aliases=("explicit",),
...                      category="explicit", order=1)
... def euler_step(target, *args):
...     ...