petsc-master 2018-05-25
Report Typos and Errors

MatGetRowMaxAbs

Gets the maximum value (in absolute value) of each row of the matrix

Synopsis

#include "petscmat.h" 
PetscErrorCode MatGetRowMaxAbs(Mat mat,Vec v,PetscInt idx[])
Logically Collective on Mat and Vec

Input Parameters

mat -the matrix

Output Parameter

v - the vector for storing the maximums
idx - the indices of the column found for each row (or NULL if not needed)

Notes

if a row is completely empty or has only 0.0 values then the idx[] value for that row is 0 (the first column).

This code is only implemented for a couple of matrix formats.

See Also

MatGetDiagonal(), MatCreateSubMatrices(), MatCreateSubMatrix(), MatGetRowMax(), MatGetRowMin()

Level

intermediate

Location

src/mat/interface/matrix.c

Examples

src/ksp/ksp/examples/tutorials/ex72.c.html

Implementations

MatGetRowMaxAbs_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c
MatGetRowMaxAbs_SeqAIJ in src/mat/impls/aij/seq/aij.c
MatGetRowMaxAbs_MPIBAIJ in src/mat/impls/baij/mpi/mpibaij.c
MatGetRowMaxAbs_SeqBAIJ in src/mat/impls/baij/seq/baij.c
MatGetRowMaxAbs_SeqDense in src/mat/impls/dense/seq/dense.c
MatGetRowMaxAbs_MPISBAIJ in src/mat/impls/sbaij/mpi/mpisbaij.c
MatGetRowMaxAbs_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaij2.c

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