Actual source code: submatfree.h
petsc-3.7.3 2016-08-01
1: #include <petsc/private/matimpl.h>
2: #include <petsc/private/vecimpl.h>
4: typedef struct{
6: Mat A;
7: Vec VC; /* Work vector in the column space */
8: Vec VR; /* Work vector in the row space */
9: IS Rows, Cols;
11: } _p_MatSubMatFreeCtx;
13: typedef _p_MatSubMatFreeCtx* MatSubMatFreeCtx;
15: PetscErrorCode MatCreateSubMatrixFree(Mat,IS,IS,Mat*);
16: PetscErrorCode MatSMFResetRowColumn(Mat,IS,IS);
17: PetscErrorCode MatMult_SMF(Mat,Vec,Vec);
18: PetscErrorCode MatMultTranspose_SMF(Mat,Vec,Vec);
19: PetscErrorCode MatDiagonalSet_SMF(Mat,Vec,InsertMode);
20: PetscErrorCode MatDestroy_SMF(Mat);
21: PetscErrorCode MatView_SMF(Mat,PetscViewer);
22: PetscErrorCode MatShift_SMF(Mat,PetscReal);
23: PetscErrorCode MatDuplicate_SMF(Mat,MatDuplicateOption,Mat*);
24: PetscErrorCode MatEqual_SMF(Mat,Mat,PetscBool*);
25: PetscErrorCode MatScale_SMF(Mat,PetscReal);
26: PetscErrorCode MatGetSubMatrix_SMF(Mat,IS,IS,MatReuse,Mat *);
27: PetscErrorCode MatGetSubMatrices_SMF(Mat,PetscInt,IS*,IS*,MatReuse,Mat**);
28: PetscErrorCode MatTranspose_SMF(Mat,Mat*);
29: PetscErrorCode MatGetDiagonal_SMF(Mat,Vec);
30: PetscErrorCode MatGetColumnVector_SMF(Mat,Vec, PetscInt);
31: PetscErrorCode MatNorm_SMF(Mat,NormType,PetscReal *);
32: PetscErrorCode MatGetRowMax_SMF(Mat, Vec);
33: PetscErrorCode MatGetRow_SMF(Mat,PetscInt,PetscInt *,const PetscInt **,const PetscScalar **);
34: PetscErrorCode MatRestoreRow_SMF(Mat,PetscInt,PetscInt *,const PetscInt **,const PetscScalar **);