petsc-3.9.4 2018-09-11
Report Typos and Errors

MatSolveAdd

Computes x = y + inv(A)*b, given a factored matrix.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatSolveAdd(Mat mat,Vec b,Vec y,Vec x)
Neighbor-wise Collective on Mat and Vec

Input Parameters

mat - the factored matrix
b - the right-hand-side vector
y - the vector to be added to

Output Parameter

x -the result vector

Notes

The vectors b and x cannot be the same. I.e., one cannot call MatSolveAdd(A,x,y,x).

Most users should employ the simplified KSP interface for linear solvers instead of working directly with matrix algebra routines such as this. See, e.g., KSPCreate().

See Also

MatSolve(), MatSolveTranspose(), MatSolveTransposeAdd()

Level

developer

Location

src/mat/interface/matrix.c

Implementations

MatSolveAdd_SeqAIJ_inplace in src/mat/impls/aij/seq/aijfact.c
MatSolveAdd_SeqAIJ in src/mat/impls/aij/seq/aijfact.c
MatSolveAdd_SeqDense in src/mat/impls/dense/seq/dense.c
MatSolveAdd_Elemental in src/mat/impls/elemental/matelem.cxx

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