MatHtoolSetKernel — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# MatHtoolSetKernel

Sets the kernel and context used for the assembly of a `MATHTOOL`.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatHtoolSetKernel(Mat A, MatHtoolKernelFn *kernel, void *kernelctx)

Collective, No Fortran Support

## Input Parameters

- A - hierarchical matrix

- kernel - computational kernel (or `NULL`)

- kernelctx - kernel context (if kernel is `NULL`, the pointer must be of type htool::VirtualGenerator*)

## See Also

Matrices, `Mat`, `MATHTOOL`, `MatCreateHtoolFromKernel()`

## Level

advanced

## Location

src/mat/impls/htool/htool.cxx

## Implementations

MatHtoolSetKernel_Htool() in src/mat/impls/htool/htool.cxx

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages