MatOption — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# MatOption

Options that may be set for a matrix that indicate properties of the matrix or affect its behavior or storage

## Synopsis

    typedef enum {
      MAT_OPTION_MIN                  = -3,
      MAT_UNUSED_NONZERO_LOCATION_ERR = -2,
      MAT_ROW_ORIENTED                = -1,
      MAT_SYMMETRIC                   = 1,
      MAT_STRUCTURALLY_SYMMETRIC      = 2,
      MAT_FORCE_DIAGONAL_ENTRIES      = 3,
      MAT_IGNORE_OFF_PROC_ENTRIES     = 4,
      MAT_USE_HASH_TABLE              = 5,
      MAT_KEEP_NONZERO_PATTERN        = 6,
      MAT_IGNORE_ZERO_ENTRIES         = 7,
      MAT_USE_INODES                  = 8,
      MAT_HERMITIAN                   = 9,
      MAT_SYMMETRY_ETERNAL            = 10,
      MAT_NEW_NONZERO_LOCATION_ERR    = 11,
      MAT_IGNORE_LOWER_TRIANGULAR     = 12,
      MAT_ERROR_LOWER_TRIANGULAR      = 13,
      MAT_GETROW_UPPERTRIANGULAR      = 14,
      MAT_SPD                         = 15,
      MAT_NO_OFF_PROC_ZERO_ROWS       = 16,
      MAT_NO_OFF_PROC_ENTRIES         = 17,
      MAT_NEW_NONZERO_LOCATIONS       = 18,
      MAT_NEW_NONZERO_ALLOCATION_ERR  = 19,
      MAT_SUBSET_OFF_PROC_ENTRIES     = 20,
      MAT_SUBMAT_SINGLEIS             = 21,
      MAT_STRUCTURE_ONLY              = 22,
      MAT_SORTED_FULL                 = 23,
      MAT_FORM_EXPLICIT_TRANSPOSE     = 24,
      MAT_STRUCTURAL_SYMMETRY_ETERNAL = 25,
      MAT_SPD_ETERNAL                 = 26,
      MAT_OPTION_MAX                  = 27
    } MatOption;

## Note

See `MatSetOption()` for the use of the options

## Developer Note

Entries that are negative need not be called collectively by all processes.

## See Also

Matrices, `Mat`, `MatSetOption()`

## Level

beginner

## Location

include/petscmat.h

## Examples

src/snes/tutorials/ex28.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ksp/ksp/tutorials/ex4.c
src/ksp/ksp/tutorials/ex79.c
src/ksp/ksp/tutorials/ex69.c
src/ksp/ksp/tutorials/ex62.c
src/tao/unconstrained/tutorials/burgers_spectral.c
src/mat/tutorials/ex4.c
src/ts/tutorials/ex50.c

## Examples

src/mat/tutorials/ex16.c
src/ksp/ksp/tutorials/ex67.c
src/snes/tutorials/ex46.c
src/snes/tutorials/ex5.c
src/ksp/ksp/tutorials/ex62.c
src/snes/tutorials/ex28.c
src/snes/tutorials/ex14.c
src/snes/tutorials/ex55.c
src/snes/tutorials/ex35.c
src/ksp/ksp/tutorials/ex6.c

## Examples

src/tao/complementarity/tutorials/blackscholes.c
src/tao/unconstrained/tutorials/minsurf1.c
src/tao/bound/tutorials/plate2.c
src/tao/unconstrained/tutorials/minsurf2.c
src/tao/complementarity/tutorials/minsurf1.c

## Examples

src/snes/tutorials/ex48.c

## Examples

src/ksp/ksp/tutorials/ex84.c

## Examples

src/ksp/ksp/tutorials/ex9.c

## Examples

src/ksp/ksp/tutorials/ex59.c
src/ksp/ksp/tutorials/ex72.c

## Examples

src/ts/tutorials/extchem.c
src/ksp/ksp/tutorials/ex59.c
src/ts/tutorials/extchemfield.c
src/ksp/ksp/tutorials/ex4.c
src/mat/tutorials/ex12.c
src/snes/tutorials/ex70.c

## Examples

src/snes/tutorials/ex56.c
src/tao/pde_constrained/tutorials/elliptic.c
src/tao/pde_constrained/tutorials/parabolic.c
src/ksp/ksp/tutorials/ex21.c
src/ksp/ksp/tutorials/ex67.c
src/ksp/ksp/tutorials/ex5.c

## Examples

src/ts/tutorials/extchem.c
src/ksp/ksp/tutorials/ex74.c
src/ts/tutorials/extchemfield.c

## Examples

src/snes/tutorials/ex56.c
src/ksp/ksp/tutorials/ex54.c
src/ksp/ksp/tutorials/ex59.c
src/ksp/ksp/tutorials/ex55.c
src/ksp/ksp/tutorials/ex56.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/bench_kspsolve.c

## Examples

src/ksp/ksp/tutorials/ex21.c
src/ksp/ksp/tutorials/ex67.c
src/ksp/ksp/tutorials/ex18.c
src/ksp/ksp/tutorials/ex52.c
src/ksp/ksp/tutorials/ex7.c
src/ksp/ksp/tutorials/ex82.c
src/ksp/ksp/tutorials/ex19.c
src/ksp/ksp/tutorials/ex2.c
src/ksp/ksp/tutorials/ex77.c
src/ksp/ksp/tutorials/ex5.c

## Examples

src/snes/tutorials/ex56.c
src/ksp/ksp/tutorials/ex54.c
src/ksp/ksp/tutorials/ex59.c
src/ksp/ksp/tutorials/ex55.c
src/ksp/ksp/tutorials/ex52.c
src/ksp/ksp/tutorials/ex56.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/bench_kspsolve.c

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