xref: /petsc/include/petscmat.h (revision 84cb2905a512499b542fd30cf471a05f503d96d2)
1*84cb2905SBarry Smith /* $Id: mat.h,v 1.124 1997/01/27 18:19:37 bsmith Exp bsmith $ */
22eac72dbSBarry Smith /*
32eac72dbSBarry Smith      Include file for the matrix component of PETSc
42eac72dbSBarry Smith */
51eb62cbbSBarry Smith #ifndef __MAT_PACKAGE
61eb62cbbSBarry Smith #define __MAT_PACKAGE
78ed539a5SBarry Smith #include "vec.h"
82eac72dbSBarry Smith 
99cd28387SBarry Smith #define MAT_COOKIE         PETSC_COOKIE+5
10f0479e8cSBarry Smith 
112eac72dbSBarry Smith typedef struct _Mat*           Mat;
122eac72dbSBarry Smith 
1394a9d846SBarry Smith #define MAX_MATRIX_TYPES 12
14639f9d9dSBarry Smith /*
15639f9d9dSBarry Smith    The default matrix data storage formats and routines to create them.
16639f9d9dSBarry Smith */
174ac9ca07SLois Curfman McInnes typedef enum { MATSAME=-1,  MATSEQDENSE, MATSEQAIJ,   MATMPIAIJ,   MATSHELL,
18*84cb2905SBarry Smith                MATMPIROWBS, MATSEQBDIAG, MATMPIBDIAG, MATMPIDENSE, MATSEQBAIJ,
19*84cb2905SBarry Smith                MATMPIBAIJ,  MATMPICSN} MatType;
2028988994SBarry Smith 
210e998a85SBarry Smith extern int MatCreate(MPI_Comm,int,int,Mat*);
22df6e0191SLois Curfman McInnes extern int MatCreateSeqDense(MPI_Comm,int,int,Scalar*,Mat*);
23d5bc1036SLois Curfman McInnes extern int MatCreateMPIDense(MPI_Comm,int,int,int,int,Scalar*,Mat*);
24de7da479SBarry Smith extern int MatCreateSeqAIJ(MPI_Comm,int,int,int,int*,Mat*);
259717bf64SBarry Smith extern int MatCreateMPIAIJ(MPI_Comm,int,int,int,int,int,int*,int,int*,Mat*);
26cfe223acSLois Curfman McInnes extern int MatCreateMPIRowbs(MPI_Comm,int,int,int,int*,void*,Mat*);
27f26ada1bSBarry Smith extern int MatCreateSeqBDiag(MPI_Comm,int,int,int,int,int*,Scalar**,Mat*);
28f26ada1bSBarry Smith extern int MatCreateMPIBDiag(MPI_Comm,int,int,int,int,int,int*,Scalar**,Mat*);
29df8a92d1SBarry Smith extern int MatCreateSeqBAIJ(MPI_Comm,int,int,int,int,int*,Mat*);
30eba03b66SLois Curfman McInnes extern int MatCreateMPIBAIJ(MPI_Comm,int,int,int,int,int,int,int*,int,int*,Mat*);
319717bf64SBarry Smith 
327b80b807SBarry Smith extern int MatDestroy(Mat);
337b80b807SBarry Smith 
347ddc982cSLois Curfman McInnes extern int MatCreateShell(MPI_Comm,int,int,int,int,void *,Mat*);
3517116c71SBarry Smith extern int MatShellGetContext(Mat,void **);
3621c89e3eSBarry Smith 
37ec0117caSBarry Smith extern int MatPrintHelp(Mat);
38ec0117caSBarry Smith 
398ed539a5SBarry Smith /* ------------------------------------------------------------*/
40ee50ffe9SBarry Smith extern int MatSetValues(Mat,int,int*,int,int*,Scalar*,InsertMode);
41*84cb2905SBarry Smith 
426d4a8577SBarry Smith typedef enum {MAT_FLUSH_ASSEMBLY=1,MAT_FINAL_ASSEMBLY=0} MatAssemblyType;
43ee50ffe9SBarry Smith extern int MatAssemblyBegin(Mat,MatAssemblyType);
44ee50ffe9SBarry Smith extern int MatAssemblyEnd(Mat,MatAssemblyType);
45b951964fSBarry Smith #define MatSetValue(v,i,j,va,mode) \
46b951964fSBarry Smith {int _ierr,_row = i,_col = j; Scalar _va = va; \
47b951964fSBarry Smith   _ierr = MatSetValues(v,1,&_row,1,&_col,&_va,mode);CHKERRQ(_ierr); \
48b951964fSBarry Smith }
49ee50ffe9SBarry Smith 
506d4a8577SBarry Smith typedef enum {MAT_ROW_ORIENTED=1,MAT_COLUMN_ORIENTED=2,MAT_ROWS_SORTED=4,
516d4a8577SBarry Smith               MAT_COLUMNS_SORTED=8,MAT_NO_NEW_NONZERO_LOCATIONS=16,
526d4a8577SBarry Smith               MAT_YES_NEW_NONZERO_LOCATIONS=32,MAT_SYMMETRIC=64,
536d4a8577SBarry Smith               MAT_STRUCTURALLY_SYMMETRIC,MAT_NO_NEW_DIAGONALS,
546d4a8577SBarry Smith               MAT_YES_NEW_DIAGONALS,MAT_INODE_LIMIT_1,MAT_INODE_LIMIT_2,
5590f02eecSBarry Smith               MAT_INODE_LIMIT_3,MAT_INODE_LIMIT_4,MAT_INODE_LIMIT_5,
56919340c3SLois Curfman McInnes               MAT_IGNORE_OFF_PROCESSOR_ENTRIES,MAT_ROWS_UNSORTED,
57919340c3SLois Curfman McInnes               MAT_COLUMNS_UNSORTED} MatOption;
58ee50ffe9SBarry Smith extern int MatSetOption(Mat,MatOption);
594b0e389bSBarry Smith extern int MatGetType(Mat,MatType*,char**);
6077c4ece6SBarry Smith extern int MatGetTypeFromOptions(MPI_Comm,char*,MatType*,int*);
61*84cb2905SBarry Smith 
62ee50ffe9SBarry Smith extern int MatGetValues(Mat,int,int*,int,int*,Scalar*);
638ed539a5SBarry Smith extern int MatGetRow(Mat,int,int *,int **,Scalar**);
648ed539a5SBarry Smith extern int MatRestoreRow(Mat,int,int *,int **,Scalar**);
6577c4ece6SBarry Smith extern int MatGetColumn(Mat,int,int *,int **,Scalar**);
6677c4ece6SBarry Smith extern int MatRestoreColumn(Mat,int,int *,int **,Scalar**);
6764e87e97SBarry Smith extern int MatGetArray(Mat,Scalar **);
6809883261SBarry Smith extern int MatRestoreArray(Mat,Scalar **);
69870582ebSSatish Balay extern int MatGetBlockSize(Mat,int *);
707b80b807SBarry Smith 
718ed539a5SBarry Smith extern int MatMult(Mat,Vec,Vec);
728ed539a5SBarry Smith extern int MatMultAdd(Mat,Vec,Vec,Vec);
738ed539a5SBarry Smith extern int MatMultTrans(Mat,Vec,Vec);
748ed539a5SBarry Smith extern int MatMultTransAdd(Mat,Vec,Vec,Vec);
752eac72dbSBarry Smith 
767b80b807SBarry Smith extern int MatConvert(Mat,MatType,Mat*);
7794a9d846SBarry Smith extern int MatConvertRegister(MatType,MatType,int (*)(Mat,MatType,Mat*));
7894a9d846SBarry Smith extern int MatConvertRegisterAll();
7994a9d846SBarry Smith 
807b80b807SBarry Smith extern int MatCopy(Mat,Mat);
817b80b807SBarry Smith extern int MatView(Mat,Viewer);
827b80b807SBarry Smith extern int MatLoad(Viewer,MatType,Mat*);
8394a9d846SBarry Smith extern int MatLoadRegister(MatType,int (*)(Viewer,MatType,Mat*));
8494a9d846SBarry Smith extern int MatLoadRegisterAll();
857b80b807SBarry Smith 
86d4fbbf0eSBarry Smith extern int MatGetRowIJ(Mat,int,PetscTruth,int*,int **,int **,PetscTruth *);
87d4fbbf0eSBarry Smith extern int MatRestoreRowIJ(Mat,int,PetscTruth,int *,int **,int **,PetscTruth *);
88d4fbbf0eSBarry Smith extern int MatGetColumnIJ(Mat,int,PetscTruth,int*,int **,int **,PetscTruth *);
89d4fbbf0eSBarry Smith extern int MatRestoreColumnIJ(Mat,int,PetscTruth,int *,int **,int **,PetscTruth *);
90d4fbbf0eSBarry Smith 
911d607229SLois Curfman McInnes /*
921d607229SLois Curfman McInnes    Context of matrix information, used with MatGetInfo()
931d607229SLois Curfman McInnes    Note: If any entries are added to this context, be sure
941d607229SLois Curfman McInnes          to adjust MAT_INFO_SIZE in FINCLUDE/mat.h
951d607229SLois Curfman McInnes  */
964e220ebcSLois Curfman McInnes typedef struct {
974e220ebcSLois Curfman McInnes   double rows_global, columns_global;         /* number of global rows and columns */
984e220ebcSLois Curfman McInnes   double rows_local, columns_local;           /* number of local rows and columns */
994e220ebcSLois Curfman McInnes   double block_size;                          /* block size */
1004e220ebcSLois Curfman McInnes   double nz_allocated, nz_used, nz_unneeded;  /* number of nonzeros */
1014e220ebcSLois Curfman McInnes   double memory;                              /* memory allocated */
1024e220ebcSLois Curfman McInnes   double assemblies;                          /* number of matrix assemblies */
1034e220ebcSLois Curfman McInnes   double mallocs;                             /* number of mallocs during MatSetValues() */
1044e220ebcSLois Curfman McInnes   double fill_ratio_given, fill_ratio_needed; /* fill ration for LU/ILU */
1054e220ebcSLois Curfman McInnes   double factor_mallocs;                      /* number of mallocs during factorization */
1064e220ebcSLois Curfman McInnes } MatInfo;
1074e220ebcSLois Curfman McInnes 
1087b80b807SBarry Smith typedef enum {MAT_LOCAL=1,MAT_GLOBAL_MAX=2,MAT_GLOBAL_SUM=3} MatInfoType;
1094e220ebcSLois Curfman McInnes extern int MatGetInfo(Mat,MatInfoType,MatInfo*);
11077c4ece6SBarry Smith extern int MatValid(Mat,PetscTruth*);
1117b80b807SBarry Smith extern int MatGetDiagonal(Mat,Vec);
112cd8486b4SBarry Smith extern int MatTranspose(Mat,Mat*);
1130513a670SBarry Smith extern int MatPermute(Mat,IS,IS,Mat *);
114f4c33d5aSBarry Smith extern int MatDiagonalScale(Mat,Vec,Vec);
1158b3e568eSBarry Smith extern int MatDiagonalShift(Mat,Vec);
11677c4ece6SBarry Smith extern int MatEqual(Mat,Mat, PetscTruth*);
1177b80b807SBarry Smith 
1187b80b807SBarry Smith extern int MatNorm(Mat,NormType,double *);
1197b80b807SBarry Smith extern int MatZeroEntries(Mat);
1207b80b807SBarry Smith extern int MatZeroRows(Mat,IS,Scalar*);
1217b80b807SBarry Smith extern int MatZeroColumns(Mat,IS,Scalar*);
1227b80b807SBarry Smith 
1237b80b807SBarry Smith extern int MatGetSize(Mat,int*,int*);
1247b80b807SBarry Smith extern int MatGetLocalSize(Mat,int*,int*);
1257b80b807SBarry Smith extern int MatGetOwnershipRange(Mat,int*,int*);
1267b80b807SBarry Smith 
1277b80b807SBarry Smith typedef enum {MAT_INITIAL_MATRIX, MAT_REUSE_MATRIX} MatGetSubMatrixCall;
1287b80b807SBarry Smith extern int MatGetSubMatrices(Mat,int,IS *,IS *,MatGetSubMatrixCall,Mat **);
129905e6a2fSBarry Smith extern int MatDestroyMatrices(int, Mat **);
1307b80b807SBarry Smith extern int MatIncreaseOverlap(Mat,int,IS *,int);
1317b80b807SBarry Smith 
1327b80b807SBarry Smith extern int MatAXPY(Scalar *,Mat,Mat);
1337b80b807SBarry Smith extern int MatCompress(Mat);
1347b80b807SBarry Smith 
135052efed2SBarry Smith extern int MatScale(Scalar *,Mat);
136052efed2SBarry Smith extern int MatShift(Scalar *,Mat);
137052efed2SBarry Smith 
13890f02eecSBarry Smith extern int MatSetLocalToGlobalMapping(Mat, int,int *);
13990f02eecSBarry Smith extern int MatZeroRowsLocal(Mat,IS,Scalar*);
14090f02eecSBarry Smith extern int MatSetValuesLocal(Mat,int,int*,int,int*,Scalar*,InsertMode);
14190f02eecSBarry Smith 
1427b80b807SBarry Smith /* Routines unique to particular data structures */
1437b80b807SBarry Smith extern int MatBDiagGetData(Mat,int*,int*,int**,int**,Scalar***);
1447b80b807SBarry Smith 
1457b80b807SBarry Smith /*
1467b80b807SBarry Smith   These routines are not usually accessed directly, rather solving is
1477b80b807SBarry Smith   done through the SLES, KSP and PC interfaces.
1487b80b807SBarry Smith */
1497b80b807SBarry Smith 
150*84cb2905SBarry Smith typedef enum {ORDER_NATURAL=0,ORDER_ND=1,ORDER_1WD=2,ORDER_RCM=3,
151*84cb2905SBarry Smith               ORDER_QMD=4,ORDER_ROWLENGTH=5,ORDER_FLOW,ORDER_NEW} MatReordering;
152a2ce50c7SBarry Smith extern int MatGetReordering(Mat,MatReordering,IS*,IS*);
153a2ce50c7SBarry Smith extern int MatGetReorderingTypeFromOptions(char *,MatReordering*);
154*84cb2905SBarry Smith extern int MatReorderingRegister(MatReordering,MatReordering*,char*,int(*)(Mat,MatReordering,IS*,IS*));
155a2ce50c7SBarry Smith extern int MatReorderingGetName(MatReordering,char **);
156*84cb2905SBarry Smith extern int MatReorderingRegisterDestroy();
157*84cb2905SBarry Smith extern int MatReorderingRegisterAll();
158*84cb2905SBarry Smith extern int MatReorderingRegisterAllCalled;
159d4fbbf0eSBarry Smith 
160a2ce50c7SBarry Smith extern int MatReorderForNonzeroDiagonal(Mat,double,IS,IS);
161a2ce50c7SBarry Smith 
162a2ce50c7SBarry Smith extern int MatCholeskyFactor(Mat,IS,double);
163a2ce50c7SBarry Smith extern int MatCholeskyFactorSymbolic(Mat,IS,double,Mat*);
164a2ce50c7SBarry Smith extern int MatCholeskyFactorNumeric(Mat,Mat*);
165a2ce50c7SBarry Smith 
16649d8b64dSBarry Smith extern int MatLUFactor(Mat,IS,IS,double);
167d7b056bfSBarry Smith extern int MatILUFactor(Mat,IS,IS,double,int);
16864051cb3SBarry Smith extern int MatLUFactorSymbolic(Mat,IS,IS,double,Mat*);
16964051cb3SBarry Smith extern int MatILUFactorSymbolic(Mat,IS,IS,double,int,Mat*);
17064051cb3SBarry Smith extern int MatIncompleteCholeskyFactorSymbolic(Mat,IS,double,int,Mat*);
17120563c6bSBarry Smith extern int MatLUFactorNumeric(Mat,Mat*);
172a2ce50c7SBarry Smith extern int MatILUDTFactor(Mat,double,int,IS,IS,Mat *);
173a2ce50c7SBarry Smith 
1748ed539a5SBarry Smith extern int MatSolve(Mat,Vec,Vec);
17522169318SLois Curfman McInnes extern int MatForwardSolve(Mat,Vec,Vec);
17622169318SLois Curfman McInnes extern int MatBackwardSolve(Mat,Vec,Vec);
1778ed539a5SBarry Smith extern int MatSolveAdd(Mat,Vec,Vec,Vec);
17828988994SBarry Smith extern int MatSolveTrans(Mat,Vec,Vec);
17928988994SBarry Smith extern int MatSolveTransAdd(Mat,Vec,Vec,Vec);
1808ed539a5SBarry Smith 
181bb5a7306SBarry Smith extern int MatSetUnfactored(Mat);
182bb5a7306SBarry Smith 
183ee50ffe9SBarry Smith typedef enum {SOR_FORWARD_SWEEP=1,SOR_BACKWARD_SWEEP=2,SOR_SYMMETRIC_SWEEP=3,
184ee50ffe9SBarry Smith               SOR_LOCAL_FORWARD_SWEEP=4,SOR_LOCAL_BACKWARD_SWEEP=8,
185ee50ffe9SBarry Smith               SOR_LOCAL_SYMMETRIC_SWEEP=12,SOR_ZERO_INITIAL_GUESS=16,
186*84cb2905SBarry Smith               SOR_EISENSTAT=32,SOR_APPLY_UPPER=64,SOR_APPLY_LOWER=128} MatSORType;
187ca9b4cbeSLois Curfman McInnes extern int MatRelax(Mat,Vec,double,MatSORType,double,int,Vec);
1888ed539a5SBarry Smith 
189d4fbbf0eSBarry Smith /*
190639f9d9dSBarry Smith     These routines are for efficiently computing Jacobians via finite differences.
191639f9d9dSBarry Smith */
192639f9d9dSBarry Smith typedef enum {COLORING_NATURAL, COLORING_SL, COLORING_LF, COLORING_ID,
193*84cb2905SBarry Smith               COLORING_NEW} MatColoring;
194639f9d9dSBarry Smith extern int MatGetColoring(Mat,MatColoring,ISColoring*);
195639f9d9dSBarry Smith extern int MatGetColoringTypeFromOptions(char *,MatColoring*);
196*84cb2905SBarry Smith extern int MatColoringRegister(MatColoring,MatColoring*,char*,int(*)(Mat,MatColoring,ISColoring *));
197639f9d9dSBarry Smith extern int MatColoringRegisterAll();
198*84cb2905SBarry Smith extern int MatColoringRegisterAllCalled;
199639f9d9dSBarry Smith extern int MatColoringRegisterDestroy();
200639f9d9dSBarry Smith extern int MatColoringPatch(Mat,int,int *,ISColoring*);
201639f9d9dSBarry Smith 
202*84cb2905SBarry Smith /*
203*84cb2905SBarry Smith     Data structures used to compute Jacobian vector products
204*84cb2905SBarry Smith   efficiently using finite differences.
205*84cb2905SBarry Smith */
206639f9d9dSBarry Smith #define MAT_FDCOLORING_COOKIE PETSC_COOKIE + 22
207639f9d9dSBarry Smith 
208639f9d9dSBarry Smith typedef struct _MatFDColoring *MatFDColoring;
209639f9d9dSBarry Smith 
210639f9d9dSBarry Smith extern int MatFDColoringCreate(Mat,ISColoring,MatFDColoring *);
211639f9d9dSBarry Smith extern int MatFDColoringDestroy(MatFDColoring);
212639f9d9dSBarry Smith extern int MatFDColoringView(MatFDColoring,Viewer);
213639f9d9dSBarry Smith extern int MatFDColoringSetParameters(MatFDColoring,double,double);
214639f9d9dSBarry Smith extern int MatFDColoringSetFromOptions(MatFDColoring);
215639f9d9dSBarry Smith extern int MatFDColoringPrintHelp(MatFDColoring);
21643a90d84SBarry Smith extern int MatFDColoringApply(Mat,MatFDColoring,Vec,Vec,Vec,Vec,int (*)(void *,Vec,Vec,void*),
21743a90d84SBarry Smith                               void *,void *);
218639f9d9dSBarry Smith 
219639f9d9dSBarry Smith /*
220d4fbbf0eSBarry Smith     If you add entries here you must also add them to FINCLUDE/mat.h
221d4fbbf0eSBarry Smith */
2221c1c02c0SLois Curfman McInnes typedef enum { MATOP_SET_VALUES=0,
2231c1c02c0SLois Curfman McInnes                MATOP_GET_ROW=1,
2241c1c02c0SLois Curfman McInnes                MATOP_RESTORE_ROW=2,
2251c1c02c0SLois Curfman McInnes                MATOP_MULT=3,
2261c1c02c0SLois Curfman McInnes                MATOP_MULT_ADD=4,
2271c1c02c0SLois Curfman McInnes                MATOP_MULT_TRANS=5,
2281c1c02c0SLois Curfman McInnes                MATOP_MULT_TRANS_ADD=6,
2291c1c02c0SLois Curfman McInnes                MATOP_SOLVE=7,
2301c1c02c0SLois Curfman McInnes                MATOP_SOLVE_ADD=8,
2311c1c02c0SLois Curfman McInnes                MATOP_SOLVE_TRANS=9,
2321c1c02c0SLois Curfman McInnes                MATOP_SOLVE_TRANS_ADD=10,
2331c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR=11,
2341c1c02c0SLois Curfman McInnes                MATOP_CHOLESKYFACTOR=12,
2351c1c02c0SLois Curfman McInnes                MATOP_RELAX=13,
2361c1c02c0SLois Curfman McInnes                MATOP_TRANSPOSE=14,
2371c1c02c0SLois Curfman McInnes                MATOP_GETINFO=15,
2381c1c02c0SLois Curfman McInnes                MATOP_EQUAL=16,
2391c1c02c0SLois Curfman McInnes                MATOP_GET_DIAGONAL=17,
2401c1c02c0SLois Curfman McInnes                MATOP_DIAGONAL_SCALE=18,
2411c1c02c0SLois Curfman McInnes                MATOP_NORM=19,
2421c1c02c0SLois Curfman McInnes                MATOP_ASSEMBLY_BEGIN=20,
2431c1c02c0SLois Curfman McInnes                MATOP_ASSEMBLY_END=21,
2441c1c02c0SLois Curfman McInnes                MATOP_COMPRESS=22,
2451c1c02c0SLois Curfman McInnes                MATOP_SET_OPTION=23,
2461c1c02c0SLois Curfman McInnes                MATOP_ZERO_ENTRIES=24,
2471c1c02c0SLois Curfman McInnes                MATOP_ZERO_ROWS=25,
2481c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR_SYMBOLIC=26,
2491c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR_NUMERIC=27,
2501c1c02c0SLois Curfman McInnes                MATOP_CHOLESKY_FACTOR_SYMBOLIC=28,
2511c1c02c0SLois Curfman McInnes                MATOP_CHOLESKY_FACTOR_NUMERIC=29,
2521c1c02c0SLois Curfman McInnes                MATOP_GET_SIZE=30,
2531c1c02c0SLois Curfman McInnes                MATOP_GET_LOCAL_SIZE=31,
2541c1c02c0SLois Curfman McInnes                MATOP_GET_OWNERSHIP_RANGE=32,
2551c1c02c0SLois Curfman McInnes                MATOP_ILUFACTOR_SYMBOLIC=33,
2561c1c02c0SLois Curfman McInnes                MATOP_INCOMPLETECHOLESKYFACTOR_SYMBOLIC=34,
2571c1c02c0SLois Curfman McInnes                MATOP_GET_ARRAY=35,
2581c1c02c0SLois Curfman McInnes                MATOP_RESTORE_ARRAY=36,
2597bf97ca4SSatish Balay 
260*84cb2905SBarry Smith                MATOP_CONVERT_SAME_TYPE=39,
261*84cb2905SBarry Smith                MATOP_FORWARD_SOLVE=40,
262*84cb2905SBarry Smith                MATOP_BACKWARD_SOLVE=41,
263*84cb2905SBarry Smith                MATOP_ILUFACTOR=42,
264*84cb2905SBarry Smith                MATOP_INCOMPLETECHOLESKYFACTOR=43,
265*84cb2905SBarry Smith                MATOP_AXPY=44,
266*84cb2905SBarry Smith                MATOP_GET_SUBMATRICES=45,
267*84cb2905SBarry Smith                MATOP_INCREASE_OVERLAP=46,
268*84cb2905SBarry Smith                MATOP_GET_VALUES=47,
269*84cb2905SBarry Smith                MATOP_COPY=48,
270*84cb2905SBarry Smith                MATOP_PRINT_HELP=49,
271*84cb2905SBarry Smith                MATOP_SCALE=50,
272*84cb2905SBarry Smith                MATOP_SHIFT=51,
273*84cb2905SBarry Smith                MATOP_DIAGONAL_SHIFT=52,
274*84cb2905SBarry Smith                MATOP_ILUDT_FACTOR=53,
275*84cb2905SBarry Smith                MATOP_GET_BLOCK_SIZE=54,
276*84cb2905SBarry Smith                MATOP_GET_ROW_IJ=55,
277*84cb2905SBarry Smith                MATOP_RESTORE_ROW_IJ=56,
278*84cb2905SBarry Smith                MATOP_GET_COLUMN_IJ=57,
279*84cb2905SBarry Smith                MATOP_RESTORE_COLUMN_IJ=58,
280*84cb2905SBarry Smith                MATOP_FDCOLORING_CREATE=59,
2811c1c02c0SLois Curfman McInnes                MATOP_DESTROY=250,
2821c1c02c0SLois Curfman McInnes                MATOP_VIEW=251
283fae171e0SBarry Smith              } MatOperation;
284112a2221SBarry Smith extern int MatHasOperation(Mat,MatOperation,PetscTruth*);
285fae171e0SBarry Smith extern int MatShellSetOperation(Mat,MatOperation,void *);
286112a2221SBarry Smith 
28790ace30eSBarry Smith /*
28890ace30eSBarry Smith    Codes for matrices stored on disk. By default they are
28990ace30eSBarry Smith  stored in a universal format. By changing the format with
290639f9d9dSBarry Smith  ViewerSetFormat(viewer,VIEWER_FORMAT_BINARY_NATIVE); the matrices will
29190ace30eSBarry Smith  be stored in a way natural for the matrix, for example dense matrices
29290ace30eSBarry Smith  would be stored as dense. Matrices stored this way may only be
29390ace30eSBarry Smith  read into matrices of the same time.
29490ace30eSBarry Smith */
29590ace30eSBarry Smith #define MATRIX_BINARY_FORMAT_DENSE -1
29690ace30eSBarry Smith 
2972eac72dbSBarry Smith #endif
2982eac72dbSBarry Smith 
2992eac72dbSBarry Smith 
3009d00d63dSBarry Smith 
301