STSetMatStructure — SLEPc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# STSetMatStructure

Sets an internal `MatStructure` attribute to indicate which is the relation of the sparsity pattern of all `ST` matrices.

## Synopsis

    #include "slepcst.h"
    PetscErrorCode STSetMatStructure(ST st,MatStructure str)

Logically Collective

## Input Parameters

- st - the spectral transformation context

- str - either `SAME_NONZERO_PATTERN`, `DIFFERENT_NONZERO_PATTERN`, `SUBSET_NONZERO_PATTERN`, or `UNKNOWN_NONZERO_PATTERN`

## Options Database Key

- -st_matstructure (same|different|subset|unknown) - set the structure flag

## Notes

If the sparsity pattern of the second matrix is equal or a subset of the pattern of the first matrix then it is recommended to set this attribute for efficiency reasons (in particular, for internal `MatAXPY()` operations). If not set, the default is `UNKNOWN_NONZERO_PATTERN`, in which case the patterns will be compared to determine if they are equal.

This function has no effect in the case of standard eigenproblems.

In case of polynomial eigenproblems, the flag applies to all matrices relative to the first one.

## See Also

ST: Spectral Transformation, `STGetMatStructure()`, `STSetMatrices()`, `MatAXPY()`

## Level

advanced

## Location

src/sys/classes/st/interface/stset.c

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