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