MatFlag#
set infinity into the local part of the matrix on any subset of MPI processes
Synopsis#
#include "petscmat.h"
PetscErrorCode MatFlag(Mat A, PetscInt flg)
Logically Collective
Input Parameters#
A - the matrix, can be
NULLbut only if on all processesflg - indicates if this processes portion of the matrix should be set to infinity
Notes#
This is used to flag a block of solutions that a linear solver failed to compute, as VecFlag() does for a single solution.
The state of A is increased on all processes, whether or not their portion is flagged, so an outer solver that tracks it detects the failure even when the entries were already infinite.
Only the dense types (MATSEQDENSE, MATMPIDENSE, and their device variants) currently implement this operation.
See Also#
Matrices, Mat, VecFlag(), MatZeroEntries(), MatSetValues()
Level#
developer
Location#
Examples#
src/mat/tests/ex257.c
src/mat/tests/ex129.c
src/ksp/ksp/tests/ex90.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages