#include "petscmat.h" PetscErrorCode MatLoad(Mat newmat,PetscViewer viewer)Collective on PetscViewer Many br
newmat | - the newly loaded matrix, this needs to have been created with MatCreate() Many bror some related function before a call to MatLoad() Many br | |
viewer | - binary file viewer, created with PetscViewerBinaryOpen() Many br |
MatLoad() automatically loads into the options database any options Many brgiven in the file filename.info where filename is the name of the file Many brthat was passed to the PetscViewerBinaryOpen(). The options in the info Many brfile will be ignored if you use the -viewer_binary_skip_info option. Many br
If the type or size of newmat is not set before a call to MatLoad, PETSc Many brsets the default matrix type AIJ and sets the local and global sizes. Many brIf type and/or size is already set, then the same are used. Many br
In parallel, each processor can load a subset of rows (or the Many brentire matrix). This routine is especially useful when a large Many brmatrix is stored on disk and only part of it is desired on each Many brprocessor. For example, a parallel solver may access only some of Many brthe rows from each processor. The algorithm used here reads Many brrelatively small blocks of data rather than reading the entire Many brmatrix and then subsetting it. Many br
int MAT_FILE_CLASSID
int number of rows
int number of columns
int total number of nonzeros
int *number nonzeros in each row
int *column indices of all nonzeros (starting index is zero)
PetscScalar *values of all nonzeros
PETSc automatically does the byte swapping for Many brmachines that store the bytes reversed, e.g. DEC alpha, freebsd, Many brlinux, Windows and the paragon; thus if you write your own binary Many brread/write routines you have to swap the bytes; see PetscBinaryRead() Many brand PetscBinaryWrite() to see how this may be done. Many br
Level:beginner
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages