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 allow_repeated; /* allow repeated entries in the local to global map */
18: Mat islocalref; /* is a reference to a local submatrix? this is the parent matrix (not ref counted) */
19: PetscBool blockedref; /* if a local submatrix, are its local to global maps the ordinary blocked ones? */
20: PetscBool locempty; /* adapt local matrices for empty rows/cols during MatAssemblyEnd_IS */
21: PetscBool storel2l; /* carry over local-to-local inherited in MatPtAP */
22: char *lmattype;
23: PetscScalar *bdiag; /* Used by MatInvertBlockDiagonal_IS */
25: MatState localstate; /* local matrix state last propagated to the parent */
27: PetscBool keepassembled; /* store assembled form if needed */
28: Mat assembledA; /* assembled operator */
29: MatState assembledstate; /* parent state represented by assembledA and dA */
30: Mat dA; /* For MatGetDiagonalBlock_IS */
32: /* Support for negative or repeated entries in l2map
33: These maps can be different than the ones passed in by the user via
34: MatSetLocalToGlobalMapping */
35: ISLocalToGlobalMapping rmapping, cmapping;
36: } Mat_IS;
38: struct _MatISLocalFields {
39: PetscInt nr, nc;
40: IS *rf, *cf;
41: };
42: typedef struct _MatISLocalFields *MatISLocalFields;
44: struct _MatISPtAP {
45: PetscReal fill;
46: IS cis0, cis1, ris0, ris1;
47: Mat *lP;
48: };
49: typedef struct _MatISPtAP *MatISPtAP;