xref: /petsc/include/petscmat.h (revision bb5a7306ba2b79be99f6d9dff5d00348384195e8)
1*bb5a7306SBarry Smith /* $Id: mat.h,v 1.120 1996/11/29 21:45:38 curfman 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 
13639f9d9dSBarry Smith /*
14639f9d9dSBarry Smith    The default matrix data storage formats and routines to create them.
15639f9d9dSBarry Smith */
164ac9ca07SLois Curfman McInnes typedef enum { MATSAME=-1,  MATSEQDENSE, MATSEQAIJ,   MATMPIAIJ, MATSHELL,
17c456f294SBarry Smith                MATMPIROWBS, MATSEQBDIAG, MATMPIBDIAG,
1890f02eecSBarry Smith                MATMPIDENSE, MATSEQBAIJ,  MATMPIBAIJ,  MATMPICSN} MatType;
1928988994SBarry Smith 
200e998a85SBarry Smith extern int MatCreate(MPI_Comm,int,int,Mat*);
21df6e0191SLois Curfman McInnes extern int MatCreateSeqDense(MPI_Comm,int,int,Scalar*,Mat*);
22d5bc1036SLois Curfman McInnes extern int MatCreateMPIDense(MPI_Comm,int,int,int,int,Scalar*,Mat*);
23de7da479SBarry Smith extern int MatCreateSeqAIJ(MPI_Comm,int,int,int,int*,Mat*);
249717bf64SBarry Smith extern int MatCreateMPIAIJ(MPI_Comm,int,int,int,int,int,int*,int,int*,Mat*);
25cfe223acSLois Curfman McInnes extern int MatCreateMPIRowbs(MPI_Comm,int,int,int,int*,void*,Mat*);
26f26ada1bSBarry Smith extern int MatCreateSeqBDiag(MPI_Comm,int,int,int,int,int*,Scalar**,Mat*);
27f26ada1bSBarry Smith extern int MatCreateMPIBDiag(MPI_Comm,int,int,int,int,int,int*,Scalar**,Mat*);
28df8a92d1SBarry Smith extern int MatCreateSeqBAIJ(MPI_Comm,int,int,int,int,int*,Mat*);
29eba03b66SLois Curfman McInnes extern int MatCreateMPIBAIJ(MPI_Comm,int,int,int,int,int,int,int*,int,int*,Mat*);
309717bf64SBarry Smith 
317b80b807SBarry Smith extern int MatDestroy(Mat);
327b80b807SBarry Smith 
337ddc982cSLois Curfman McInnes extern int MatCreateShell(MPI_Comm,int,int,int,int,void *,Mat*);
3417116c71SBarry Smith extern int MatShellGetContext(Mat,void **);
3521c89e3eSBarry Smith 
362eac72dbSBarry Smith 
37ec0117caSBarry Smith extern int MatPrintHelp(Mat);
38ec0117caSBarry Smith 
398ed539a5SBarry Smith /* ------------------------------------------------------------*/
40ee50ffe9SBarry Smith extern int MatSetValues(Mat,int,int*,int,int*,Scalar*,InsertMode);
416d4a8577SBarry Smith typedef enum {MAT_FLUSH_ASSEMBLY=1,MAT_FINAL_ASSEMBLY=0} MatAssemblyType;
42ee50ffe9SBarry Smith extern int MatAssemblyBegin(Mat,MatAssemblyType);
43ee50ffe9SBarry Smith extern int MatAssemblyEnd(Mat,MatAssemblyType);
44ee50ffe9SBarry Smith 
456d4a8577SBarry Smith typedef enum {MAT_ROW_ORIENTED=1,MAT_COLUMN_ORIENTED=2,MAT_ROWS_SORTED=4,
466d4a8577SBarry Smith               MAT_COLUMNS_SORTED=8,MAT_NO_NEW_NONZERO_LOCATIONS=16,
476d4a8577SBarry Smith               MAT_YES_NEW_NONZERO_LOCATIONS=32,MAT_SYMMETRIC=64,
486d4a8577SBarry Smith               MAT_STRUCTURALLY_SYMMETRIC,MAT_NO_NEW_DIAGONALS,
496d4a8577SBarry Smith               MAT_YES_NEW_DIAGONALS,MAT_INODE_LIMIT_1,MAT_INODE_LIMIT_2,
5090f02eecSBarry Smith               MAT_INODE_LIMIT_3,MAT_INODE_LIMIT_4,MAT_INODE_LIMIT_5,
51919340c3SLois Curfman McInnes               MAT_IGNORE_OFF_PROCESSOR_ENTRIES,MAT_ROWS_UNSORTED,
52919340c3SLois Curfman McInnes               MAT_COLUMNS_UNSORTED} MatOption;
53ee50ffe9SBarry Smith extern int MatSetOption(Mat,MatOption);
544b0e389bSBarry Smith extern int MatGetType(Mat,MatType*,char**);
5577c4ece6SBarry Smith extern int MatGetTypeFromOptions(MPI_Comm,char*,MatType*,int*);
56ee50ffe9SBarry Smith extern int MatGetValues(Mat,int,int*,int,int*,Scalar*);
578ed539a5SBarry Smith extern int MatGetRow(Mat,int,int *,int **,Scalar**);
588ed539a5SBarry Smith extern int MatRestoreRow(Mat,int,int *,int **,Scalar**);
5977c4ece6SBarry Smith extern int MatGetColumn(Mat,int,int *,int **,Scalar**);
6077c4ece6SBarry Smith extern int MatRestoreColumn(Mat,int,int *,int **,Scalar**);
6164e87e97SBarry Smith extern int MatGetArray(Mat,Scalar **);
6209883261SBarry Smith extern int MatRestoreArray(Mat,Scalar **);
63870582ebSSatish Balay extern int MatGetBlockSize(Mat,int *);
647b80b807SBarry Smith 
658ed539a5SBarry Smith extern int MatMult(Mat,Vec,Vec);
668ed539a5SBarry Smith extern int MatMultAdd(Mat,Vec,Vec,Vec);
678ed539a5SBarry Smith extern int MatMultTrans(Mat,Vec,Vec);
688ed539a5SBarry Smith extern int MatMultTransAdd(Mat,Vec,Vec,Vec);
692eac72dbSBarry Smith 
707b80b807SBarry Smith extern int MatConvert(Mat,MatType,Mat*);
717b80b807SBarry Smith extern int MatCopy(Mat,Mat);
727b80b807SBarry Smith extern int MatView(Mat,Viewer);
737b80b807SBarry Smith extern int MatLoad(Viewer,MatType,Mat*);
747b80b807SBarry Smith 
75d4fbbf0eSBarry Smith extern int MatGetRowIJ(Mat,int,PetscTruth,int*,int **,int **,PetscTruth *);
76d4fbbf0eSBarry Smith extern int MatRestoreRowIJ(Mat,int,PetscTruth,int *,int **,int **,PetscTruth *);
77d4fbbf0eSBarry Smith extern int MatGetColumnIJ(Mat,int,PetscTruth,int*,int **,int **,PetscTruth *);
78d4fbbf0eSBarry Smith extern int MatRestoreColumnIJ(Mat,int,PetscTruth,int *,int **,int **,PetscTruth *);
79d4fbbf0eSBarry Smith 
801d607229SLois Curfman McInnes /*
811d607229SLois Curfman McInnes    Context of matrix information, used with MatGetInfo()
821d607229SLois Curfman McInnes    Note: If any entries are added to this context, be sure
831d607229SLois Curfman McInnes          to adjust MAT_INFO_SIZE in FINCLUDE/mat.h
841d607229SLois Curfman McInnes  */
854e220ebcSLois Curfman McInnes typedef struct {
864e220ebcSLois Curfman McInnes   double rows_global, columns_global;         /* number of global rows and columns */
874e220ebcSLois Curfman McInnes   double rows_local, columns_local;           /* number of local rows and columns */
884e220ebcSLois Curfman McInnes   double block_size;                          /* block size */
894e220ebcSLois Curfman McInnes   double nz_allocated, nz_used, nz_unneeded;  /* number of nonzeros */
904e220ebcSLois Curfman McInnes   double memory;                              /* memory allocated */
914e220ebcSLois Curfman McInnes   double assemblies;                          /* number of matrix assemblies */
924e220ebcSLois Curfman McInnes   double mallocs;                             /* number of mallocs during MatSetValues() */
934e220ebcSLois Curfman McInnes   double fill_ratio_given, fill_ratio_needed; /* fill ration for LU/ILU */
944e220ebcSLois Curfman McInnes   double factor_mallocs;                      /* number of mallocs during factorization */
954e220ebcSLois Curfman McInnes } MatInfo;
964e220ebcSLois Curfman McInnes 
977b80b807SBarry Smith typedef enum {MAT_LOCAL=1,MAT_GLOBAL_MAX=2,MAT_GLOBAL_SUM=3} MatInfoType;
984e220ebcSLois Curfman McInnes extern int MatGetInfo(Mat,MatInfoType,MatInfo*);
9977c4ece6SBarry Smith extern int MatValid(Mat,PetscTruth*);
1007b80b807SBarry Smith extern int MatGetDiagonal(Mat,Vec);
101cd8486b4SBarry Smith extern int MatTranspose(Mat,Mat*);
102f4c33d5aSBarry Smith extern int MatDiagonalScale(Mat,Vec,Vec);
1038b3e568eSBarry Smith extern int MatDiagonalShift(Mat,Vec);
10477c4ece6SBarry Smith extern int MatEqual(Mat,Mat, PetscTruth*);
1057b80b807SBarry Smith 
1067b80b807SBarry Smith extern int MatNorm(Mat,NormType,double *);
1077b80b807SBarry Smith extern int MatZeroEntries(Mat);
1087b80b807SBarry Smith extern int MatZeroRows(Mat,IS,Scalar*);
1097b80b807SBarry Smith extern int MatZeroColumns(Mat,IS,Scalar*);
1107b80b807SBarry Smith 
1117b80b807SBarry Smith extern int MatGetSize(Mat,int*,int*);
1127b80b807SBarry Smith extern int MatGetLocalSize(Mat,int*,int*);
1137b80b807SBarry Smith extern int MatGetOwnershipRange(Mat,int*,int*);
1147b80b807SBarry Smith 
1157b80b807SBarry Smith typedef enum {MAT_INITIAL_MATRIX, MAT_REUSE_MATRIX} MatGetSubMatrixCall;
1167b80b807SBarry Smith extern int MatGetSubMatrices(Mat,int,IS *,IS *,MatGetSubMatrixCall,Mat **);
117905e6a2fSBarry Smith extern int MatDestroyMatrices(int, Mat **);
1187b80b807SBarry Smith extern int MatIncreaseOverlap(Mat,int,IS *,int);
1197b80b807SBarry Smith 
1207b80b807SBarry Smith extern int MatAXPY(Scalar *,Mat,Mat);
1217b80b807SBarry Smith extern int MatCompress(Mat);
1227b80b807SBarry Smith 
123052efed2SBarry Smith extern int MatScale(Scalar *,Mat);
124052efed2SBarry Smith extern int MatShift(Scalar *,Mat);
125052efed2SBarry Smith 
12690f02eecSBarry Smith extern int MatSetLocalToGlobalMapping(Mat, int,int *);
12790f02eecSBarry Smith extern int MatZeroRowsLocal(Mat,IS,Scalar*);
12890f02eecSBarry Smith extern int MatSetValuesLocal(Mat,int,int*,int,int*,Scalar*,InsertMode);
12990f02eecSBarry Smith 
1307b80b807SBarry Smith /* Routines unique to particular data structures */
1317b80b807SBarry Smith extern int MatBDiagGetData(Mat,int*,int*,int**,int**,Scalar***);
1327b80b807SBarry Smith 
1337b80b807SBarry Smith /*
1347b80b807SBarry Smith   These routines are not usually accessed directly, rather solving is
1357b80b807SBarry Smith   done through the SLES, KSP and PC interfaces.
1367b80b807SBarry Smith */
1377b80b807SBarry Smith 
13883f0b094SBarry Smith typedef enum {ORDER_NATURAL=0,ORDER_ND=1,ORDER_1WD=2,
139a2ce50c7SBarry Smith               ORDER_RCM=3,ORDER_QMD=4,ORDER_ROWLENGTH=5,ORDER_FLOW,
140a2ce50c7SBarry Smith               ORDER_APPLICATION_1,ORDER_APPLICATION_2} MatReordering;
141a2ce50c7SBarry Smith extern int MatGetReordering(Mat,MatReordering,IS*,IS*);
142a2ce50c7SBarry Smith extern int MatGetReorderingTypeFromOptions(char *,MatReordering*);
143d4fbbf0eSBarry Smith extern int MatReorderingRegister(MatReordering *,char*,int (*)(Mat,MatReordering,IS*,IS*));
144464493b3SBarry Smith extern int MatReorderingRegisterAll();
145464493b3SBarry Smith extern int MatReorderingRegisterDestroy();
146a2ce50c7SBarry Smith extern int MatReorderingGetName(MatReordering,char **);
147d4fbbf0eSBarry Smith 
148a2ce50c7SBarry Smith extern int MatReorderForNonzeroDiagonal(Mat,double,IS,IS);
149a2ce50c7SBarry Smith 
150a2ce50c7SBarry Smith extern int MatCholeskyFactor(Mat,IS,double);
151a2ce50c7SBarry Smith extern int MatCholeskyFactorSymbolic(Mat,IS,double,Mat*);
152a2ce50c7SBarry Smith extern int MatCholeskyFactorNumeric(Mat,Mat*);
153a2ce50c7SBarry Smith 
15449d8b64dSBarry Smith extern int MatLUFactor(Mat,IS,IS,double);
155d7b056bfSBarry Smith extern int MatILUFactor(Mat,IS,IS,double,int);
15664051cb3SBarry Smith extern int MatLUFactorSymbolic(Mat,IS,IS,double,Mat*);
15764051cb3SBarry Smith extern int MatILUFactorSymbolic(Mat,IS,IS,double,int,Mat*);
15864051cb3SBarry Smith extern int MatIncompleteCholeskyFactorSymbolic(Mat,IS,double,int,Mat*);
15920563c6bSBarry Smith extern int MatLUFactorNumeric(Mat,Mat*);
160a2ce50c7SBarry Smith extern int MatILUDTFactor(Mat,double,int,IS,IS,Mat *);
161a2ce50c7SBarry Smith 
1628ed539a5SBarry Smith 
1638ed539a5SBarry Smith extern int MatSolve(Mat,Vec,Vec);
16422169318SLois Curfman McInnes extern int MatForwardSolve(Mat,Vec,Vec);
16522169318SLois Curfman McInnes extern int MatBackwardSolve(Mat,Vec,Vec);
1668ed539a5SBarry Smith extern int MatSolveAdd(Mat,Vec,Vec,Vec);
16728988994SBarry Smith extern int MatSolveTrans(Mat,Vec,Vec);
16828988994SBarry Smith extern int MatSolveTransAdd(Mat,Vec,Vec,Vec);
1698ed539a5SBarry Smith 
170*bb5a7306SBarry Smith extern int MatSetUnfactored(Mat);
171*bb5a7306SBarry Smith 
172ee50ffe9SBarry Smith typedef enum {SOR_FORWARD_SWEEP=1,SOR_BACKWARD_SWEEP=2,SOR_SYMMETRIC_SWEEP=3,
173ee50ffe9SBarry Smith               SOR_LOCAL_FORWARD_SWEEP=4,SOR_LOCAL_BACKWARD_SWEEP=8,
174ee50ffe9SBarry Smith               SOR_LOCAL_SYMMETRIC_SWEEP=12,SOR_ZERO_INITIAL_GUESS=16,
175ca9b4cbeSLois Curfman McInnes               SOR_EISENSTAT=32,SOR_APPLY_UPPER=64,SOR_APPLY_LOWER=128
176ca9b4cbeSLois Curfman McInnes               } MatSORType;
177ca9b4cbeSLois Curfman McInnes extern int MatRelax(Mat,Vec,double,MatSORType,double,int,Vec);
1788ed539a5SBarry Smith 
179d4fbbf0eSBarry Smith /*
180639f9d9dSBarry Smith     These routines are for efficiently computing Jacobians via finite differences.
181639f9d9dSBarry Smith */
182639f9d9dSBarry Smith typedef enum {COLORING_NATURAL, COLORING_SL, COLORING_LF, COLORING_ID,
183639f9d9dSBarry Smith               COLORING_APPLICATION_1,COLORING_APPLICATION_2} MatColoring;
184639f9d9dSBarry Smith extern int MatGetColoring(Mat,MatColoring,ISColoring*);
185639f9d9dSBarry Smith extern int MatGetColoringTypeFromOptions(char *,MatColoring*);
186639f9d9dSBarry Smith extern int MatColoringRegister(MatColoring *,char*,int (*)(Mat,MatColoring,ISColoring *));
187639f9d9dSBarry Smith extern int MatColoringRegisterAll();
188639f9d9dSBarry Smith extern int MatColoringRegisterDestroy();
189639f9d9dSBarry Smith extern int MatColoringPatch(Mat,int,int *,ISColoring*);
190639f9d9dSBarry Smith 
191639f9d9dSBarry Smith #define MAT_FDCOLORING_COOKIE PETSC_COOKIE + 22
192639f9d9dSBarry Smith 
193639f9d9dSBarry Smith typedef struct _MatFDColoring *MatFDColoring;
194639f9d9dSBarry Smith 
195639f9d9dSBarry Smith extern int MatFDColoringCreate(Mat,ISColoring,MatFDColoring *);
196639f9d9dSBarry Smith extern int MatFDColoringDestroy(MatFDColoring);
197639f9d9dSBarry Smith extern int MatFDColoringView(MatFDColoring,Viewer);
198639f9d9dSBarry Smith extern int MatFDColoringSetParameters(MatFDColoring,double,double);
199639f9d9dSBarry Smith extern int MatFDColoringSetFromOptions(MatFDColoring);
200639f9d9dSBarry Smith extern int MatFDColoringPrintHelp(MatFDColoring);
20143a90d84SBarry Smith extern int MatFDColoringApply(Mat,MatFDColoring,Vec,Vec,Vec,Vec,int (*)(void *,Vec,Vec,void*),
20243a90d84SBarry Smith                               void *,void *);
203639f9d9dSBarry Smith 
204639f9d9dSBarry Smith /*
205d4fbbf0eSBarry Smith     If you add entries here you must also add them to FINCLUDE/mat.h
206d4fbbf0eSBarry Smith */
2071c1c02c0SLois Curfman McInnes typedef enum { MATOP_SET_VALUES=0,
2081c1c02c0SLois Curfman McInnes                MATOP_GET_ROW=1,
2091c1c02c0SLois Curfman McInnes                MATOP_RESTORE_ROW=2,
2101c1c02c0SLois Curfman McInnes                MATOP_MULT=3,
2111c1c02c0SLois Curfman McInnes                MATOP_MULT_ADD=4,
2121c1c02c0SLois Curfman McInnes                MATOP_MULT_TRANS=5,
2131c1c02c0SLois Curfman McInnes                MATOP_MULT_TRANS_ADD=6,
2141c1c02c0SLois Curfman McInnes                MATOP_SOLVE=7,
2151c1c02c0SLois Curfman McInnes                MATOP_SOLVE_ADD=8,
2161c1c02c0SLois Curfman McInnes                MATOP_SOLVE_TRANS=9,
2171c1c02c0SLois Curfman McInnes                MATOP_SOLVE_TRANS_ADD=10,
2181c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR=11,
2191c1c02c0SLois Curfman McInnes                MATOP_CHOLESKYFACTOR=12,
2201c1c02c0SLois Curfman McInnes                MATOP_RELAX=13,
2211c1c02c0SLois Curfman McInnes                MATOP_TRANSPOSE=14,
2221c1c02c0SLois Curfman McInnes                MATOP_GETINFO=15,
2231c1c02c0SLois Curfman McInnes                MATOP_EQUAL=16,
2241c1c02c0SLois Curfman McInnes                MATOP_GET_DIAGONAL=17,
2251c1c02c0SLois Curfman McInnes                MATOP_DIAGONAL_SCALE=18,
2261c1c02c0SLois Curfman McInnes                MATOP_NORM=19,
2271c1c02c0SLois Curfman McInnes                MATOP_ASSEMBLY_BEGIN=20,
2281c1c02c0SLois Curfman McInnes                MATOP_ASSEMBLY_END=21,
2291c1c02c0SLois Curfman McInnes                MATOP_COMPRESS=22,
2301c1c02c0SLois Curfman McInnes                MATOP_SET_OPTION=23,
2311c1c02c0SLois Curfman McInnes                MATOP_ZERO_ENTRIES=24,
2321c1c02c0SLois Curfman McInnes                MATOP_ZERO_ROWS=25,
2331c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR_SYMBOLIC=26,
2341c1c02c0SLois Curfman McInnes                MATOP_LUFACTOR_NUMERIC=27,
2351c1c02c0SLois Curfman McInnes                MATOP_CHOLESKY_FACTOR_SYMBOLIC=28,
2361c1c02c0SLois Curfman McInnes                MATOP_CHOLESKY_FACTOR_NUMERIC=29,
2371c1c02c0SLois Curfman McInnes                MATOP_GET_SIZE=30,
2381c1c02c0SLois Curfman McInnes                MATOP_GET_LOCAL_SIZE=31,
2391c1c02c0SLois Curfman McInnes                MATOP_GET_OWNERSHIP_RANGE=32,
2401c1c02c0SLois Curfman McInnes                MATOP_ILUFACTOR_SYMBOLIC=33,
2411c1c02c0SLois Curfman McInnes                MATOP_INCOMPLETECHOLESKYFACTOR_SYMBOLIC=34,
2421c1c02c0SLois Curfman McInnes                MATOP_GET_ARRAY=35,
2431c1c02c0SLois Curfman McInnes                MATOP_RESTORE_ARRAY=36,
2441c1c02c0SLois Curfman McInnes                MATOP_CONVERT=37,
2457bf97ca4SSatish Balay 
2461c1c02c0SLois Curfman McInnes                MATOP_CONVERT_SAME_TYPE=40,
2471c1c02c0SLois Curfman McInnes                MATOP_FORWARD_SOLVE=41,
2481c1c02c0SLois Curfman McInnes                MATOP_BACKWARD_SOLVE=42,
2491c1c02c0SLois Curfman McInnes                MATOP_ILUFACTOR=43,
2501c1c02c0SLois Curfman McInnes                MATOP_INCOMPLETECHOLESKYFACTOR=44,
2511c1c02c0SLois Curfman McInnes                MATOP_AXPY=45,
2521c1c02c0SLois Curfman McInnes                MATOP_GET_SUBMATRICES=46,
2531c1c02c0SLois Curfman McInnes                MATOP_INCREASE_OVERLAP=47,
2541c1c02c0SLois Curfman McInnes                MATOP_GET_VALUES=48,
2551c1c02c0SLois Curfman McInnes                MATOP_COPY=49,
2561c1c02c0SLois Curfman McInnes                MATOP_PRINT_HELP=50,
2571c1c02c0SLois Curfman McInnes                MATOP_SCALE=51,
2581c1c02c0SLois Curfman McInnes                MATOP_SHIFT=52,
2591c1c02c0SLois Curfman McInnes                MATOP_DIAGONAL_SHIFT=53,
2601c1c02c0SLois Curfman McInnes                MATOP_ILUDT_FACTOR=54,
2611c1c02c0SLois Curfman McInnes                MATOP_GET_BLOCK_SIZE=55,
262639f9d9dSBarry Smith                MATOP_GET_ROW_IJ=56,
263639f9d9dSBarry Smith                MATOP_RESTORE_ROW_IJ=57,
264639f9d9dSBarry Smith                MATOP_GET_COLUMN_IJ=58,
265639f9d9dSBarry Smith                MATOP_RESTORE_COLUMN_IJ=59,
266639f9d9dSBarry Smith                MATOP_FDCOLORING_CREATE=60,
2671c1c02c0SLois Curfman McInnes                MATOP_DESTROY=250,
2681c1c02c0SLois Curfman McInnes                MATOP_VIEW=251
269fae171e0SBarry Smith              } MatOperation;
270112a2221SBarry Smith extern int MatHasOperation(Mat,MatOperation,PetscTruth*);
271fae171e0SBarry Smith extern int MatShellSetOperation(Mat,MatOperation,void *);
272112a2221SBarry Smith 
27390ace30eSBarry Smith /*
27490ace30eSBarry Smith    Codes for matrices stored on disk. By default they are
27590ace30eSBarry Smith  stored in a universal format. By changing the format with
276639f9d9dSBarry Smith  ViewerSetFormat(viewer,VIEWER_FORMAT_BINARY_NATIVE); the matrices will
27790ace30eSBarry Smith  be stored in a way natural for the matrix, for example dense matrices
27890ace30eSBarry Smith  would be stored as dense. Matrices stored this way may only be
27990ace30eSBarry Smith  read into matrices of the same time.
28090ace30eSBarry Smith */
28190ace30eSBarry Smith #define MATRIX_BINARY_FORMAT_DENSE -1
28290ace30eSBarry Smith 
2832eac72dbSBarry Smith #endif
2842eac72dbSBarry Smith 
2852eac72dbSBarry Smith 
2869d00d63dSBarry Smith 
287