Actual source code: adamat.h
petsc-3.6.1 2015-08-06
1: #include <petsc/private/matimpl.h>
2: #include <petsc/private/vecimpl.h>
4: typedef struct{
6: Mat A;
7: Vec D1;
8: Vec D2;
9: Vec W;
10: Vec W2;
11: Vec ADADiag;
12: PetscInt GotDiag;
14: } _p_TaoMatADACtx;
16: typedef _p_TaoMatADACtx* TaoMatADACtx;
18: PetscErrorCode MatCreateADA(Mat,Vec,Vec,Mat*);
19: PetscErrorCode MatMult_ADA(Mat,Vec,Vec);
20: PetscErrorCode MatMultTranspose_ADA(Mat,Vec,Vec);
21: PetscErrorCode MatDiagonalSet_ADA(Vec,Mat);
22: PetscErrorCode MatDestroy_ADA(Mat);
23: PetscErrorCode MatView_ADA(Mat,PetscViewer);
24: PetscErrorCode MatShift_ADA(Mat,PetscReal);
25: PetscErrorCode MatDuplicate_ADA(Mat,MatDuplicateOption,Mat*);
26: PetscErrorCode MatEqual_ADA(Mat,Mat,PetscBool*);
27: PetscErrorCode MatScale_ADA(Mat,PetscReal);
28: PetscErrorCode MatGetSubMatrix_ADA(Mat,IS,IS,MatReuse,Mat *);
29: PetscErrorCode MatGetSubMatrices_ADA(Mat,PetscInt,IS*,IS*,MatReuse,Mat**);
30: PetscErrorCode MatTranspose_ADA(Mat,Mat*);
31: PetscErrorCode MatGetDiagonal_ADA(Mat,Vec);
32: PetscErrorCode MatGetColumnVector_ADA(Mat,Vec, PetscInt);
33: PetscErrorCode MatNorm_ADA(Mat,NormType,PetscReal *);
34: PetscErrorCode MatADAComputeDiagonal(Mat);