MatViewFromOptions — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# MatViewFromOptions

View properties of the matrix based on options set in the options database

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatViewFromOptions(Mat A, PetscObject obj, const char name[])

Collective

## Input Parameters

- A - the matrix

- obj - optional additional object that provides the options prefix to use

- name - command line option

## Options Database Key

- -name [viewertype][:…] - option name and values. See `PetscObjectViewFromOptions()` for the possible arguments

## See Also

Matrices, `Mat`, `MatView()`, `PetscObjectViewFromOptions()`, `MatCreate()`

## Level

intermediate

## Location

src/mat/interface/matrix.c

## Examples

src/ksp/ksp/tutorials/ex29.c
src/mat/tutorials/ex10.c
src/mat/tutorials/ex19.c
src/ksp/ksp/tutorials/ex56.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex21.c
src/ksp/ksp/tutorials/ex19.c
src/ksp/ksp/tutorials/ex34.c
src/ksp/ksp/tutorials/ex85.c
src/ksp/ksp/tutorials/ex42.c

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