Skip to main content
Ctrl+K
PETSc v3.26.0-293-gfb7a8f337c26 documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • MatGetRowSumAbs

MatGetRowSumAbs#

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

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatGetRowSumAbs(Mat mat, Vec v)

Logically Collective

Input Parameter#

  • mat - the matrix

Output Parameter#

  • v - the vector for storing the sum

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

See Also#

Matrices, Mat, MatGetDiagonal(), MatCreateSubMatrices(), MatCreateSubMatrix(), MatGetRowMax(), MatGetRowMin(), MatGetRowMinAbs()

Level#

intermediate

Location#

src/mat/interface/matrix.c

Examples#

src/mat/tests/ex115.c
src/mat/tests/ex2.c
src/ksp/ksp/tutorials/ex72.c

Implementations#

MatGetRowSumAbs_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatGetRowSumAbs_SeqAIJ() in src/mat/impls/aij/seq/aij.c
MatGetRowSumAbs_AIJKokkos() in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
MatGetRowSumAbs_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatGetRowSumAbs_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cxx
MatGetRowSumAbs_MPIBAIJ() in src/mat/impls/baij/mpi/mpibaij.c
MatGetRowSumAbs_SeqBAIJ() in src/mat/impls/baij/seq/baij.c
MatGetRowSumAbs_HYPRE() in src/mat/impls/hypre/mhypre.c


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

On this page
  • Synopsis
  • Input Parameter
  • Output Parameter
  • See Also
  • Level
  • Location
  • Examples
  • Implementations
Edit on GitLab
Show Source

© Copyright 1991-2026, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2026-10-31T03:41:22-0500 (v3.26.0-293-gfb7a8f337c26).