buffalo_panel.kernels.KernelRegistry

class buffalo_panel.kernels.KernelRegistry(kernels=<factory>)[source]

Store potential flow influence kernels.

A registry key identifies the mathematical kernel by support geometry, singularity type, and basis family. The backend label identifies the implementation used for that mathematical kernel, such as a Python reference implementation or a later accelerated implementation.

Methods

get(backend, key)

Return the registered element kernel for one backend and family key.

register(*, backend, key, kernel)

Register an element kernel for one backend and family key.

Attributes

kernels

Element kernels keyed by backend, support, singularity, and basis.

kernels: dict[tuple[str, str, str, str], ElementKernel[Any]]

Element kernels keyed by backend, support, singularity, and basis.

register(*, backend, key, kernel)[source]

Register an element kernel for one backend and family key.

Parameters:
  • backend (str) – Implementation backend label for the kernel.

  • key (RegistryKey) – Mathematical family key as (support, singularity, basis).

  • kernel (ElementKernel) – Element-kernel object implementing the standard block-building surface. Unsupported block types should raise NotImplementedError from the kernel method.

get(backend, key)[source]

Return the registered element kernel for one backend and family key.

Parameters:
  • backend (str) – Implementation backend label to select.

  • key (RegistryKey) – Mathematical family key as (support, singularity, basis).

Returns:

Registered element kernel for the backend and key.

Return type:

ElementKernel

Raises:

KeyError – No element kernel is registered for the backend and key.