Skip to main content
`Ctrl`+`K`

# petsc4py.typing.MatHtoolKernelFunction

petsc4py.typing.MatHtoolKernelFunction

  `PETSc.Mat` `Mat.Type.HTOOL` kernel callback.

  Callable with signature `kernel(sdim, M, N, rows, cols, v, ctx)`:

  - `sdim` — spatial dimension of the coordinate space

  - `M` — number of target (row) indices

  - `N` — number of source (column) indices

  - `rows` — target global indices, shape `(M,)`

  - `cols` — source global indices, shape `(N,)`

  - `v` — output submatrix, shape `(M, N)` in column-major order, to be filled by the callable

  - `ctx` — user-defined context passed to `Mat.createHtoolFromKernel`

  alias of `Callable`[[`int`, `int`, `int`, `ndarray`[`tuple`[`Any`, …], `dtype`[`integer`]], `ndarray`[`tuple`[`Any`, …], `dtype`[`integer`]], `ndarray`[`tuple`[`Any`, …], `dtype`[`floating` | `complexfloating`]], `Any`], `None`]