MatDiagonalScaleLocal#

Scales columns of a matrix given the scaling values including the ghosted ones.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatDiagonalScaleLocal(Mat mat, Vec diag)

Not Collective

Input Parameters#

  • mat - the matrix

  • diag - the diagonal values, including ghost ones

Notes#

Works only for MATMPIAIJ and MATMPIBAIJ matrices

diag is a sequential vector that has a length which is the same as the local (ghosted) length of the vector associated with the matrix’s ISLocalToGlobalMapping set with MatSetLocalToGlobalMapping().

This allows one to avoid during communication to perform the scaling that must be done with MatDiagonalScale().

See Also#

Matrices, Mat, MatDiagonalScale(), MatSetLocalToGlobalMapping(), ISLocalToGlobalMapping

Level#

developer

Location#

src/mat/interface/matrix.c

Implementations#

MatDiagonalScaleLocal_MPIAIJ() in src/mat/impls/aij/mpi/mmaij.c
MatDiagonalScaleLocal_MPIBAIJ() in src/mat/impls/baij/mpi/mmbaij.c
MatDiagonalScaleLocal_MPISELL() in src/mat/impls/sell/mpi/mmsell.c


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