Actual source code: matisimpl.h
1: #pragma once
3: #include <petscsf.h>
4: #include <petsc/private/matimpl.h>
6: typedef struct {
7: Mat A; /* the local matrix */
8: VecScatter cctx; /* column scatter */
9: VecScatter rctx; /* row scatter */
10: Vec x, y; /* work space for matrix vector product */
11: Vec counter; /* counter vector */
12: PetscBool pure_neumann;
13: PetscSF sf, csf; /* SFs for rows and cols */
14: PetscInt *sf_rootdata, *sf_leafdata;
15: PetscInt *csf_rootdata, *csf_leafdata;
16: IS getsub_ris, getsub_cis; /* row and column ISs for MatCreateSubMatrix and MAT_REUSE_MATRIX */
17: PetscBool islocalref; /* is a reference to a local submatrix? */
18: PetscBool locempty; /* adapt local matrices for empty rows/cols during MatAssemblyEnd_IS */
19: PetscBool storel2l; /* carry over local-to-local inherited in MatPtAP */
20: char *lmattype;
21: PetscScalar *bdiag; /* Used by MatInvertBlockDiagonal_IS */
23: PetscObjectState lnnzstate; /* nonzero state of local matrix */
25: PetscBool keepassembled; /* store assembled form if needed */
26: Mat assembledA; /* assembled operator */
27: Mat dA; /* For MatGetDiagonalBlock_IS */
29: /* Support for negative or repeated entries in l2map
30: These maps can be different than the ones passed in by the user via
31: MatSetLocalToGlobalMapping */
32: ISLocalToGlobalMapping rmapping, cmapping;
33: } Mat_IS;
35: struct _MatISLocalFields {
36: PetscInt nr, nc;
37: IS *rf, *cf;
38: };
39: typedef struct _MatISLocalFields *MatISLocalFields;
41: struct _MatISPtAP {
42: PetscReal fill;
43: IS cis0, cis1, ris0, ris1;
44: Mat *lP;
45: };
46: typedef struct _MatISPtAP *MatISPtAP;
48: PETSC_EXTERN PetscErrorCode MatISSetMPIXAIJPreallocation_Private(Mat, Mat, PetscBool);