slepc-3.14.2 2021-02-01
Report Typos and Errors

# 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 on st

### Input Parameters

| st | - the spectral transformation context
| str | - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or SUBSET_NONZERO_PATTERN

### Options Database Key

| -st_matstructure <str> | - Indicates the structure flag, where <str> is one of 'same' (matrices have the same nonzero pattern), 'different' (different nonzero pattern) or 'subset' (pattern is a subset of the first one).

### Notes

By default, the sparsity patterns are assumed to be different. If the patterns are equal or a subset then it is recommended to set this attribute for efficiency reasons (in particular, for internal MatAXPY() operations).

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

### See Also

STSetMatrices(), MatAXPY()

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