Actual source code: ex66.c
1: /*$Id: ex66.c,v 1.14 2001/04/10 19:35:44 bsmith Exp $*/
3: static char help[] = "Reads in rectangular matrix from disk, stored from ex65.c\n\n";
5: #include petscmat.h
9: int main(int argc,char **args)
10: {
11: int ierr;
12: Mat A;
13: PetscViewer fd;
15: PetscInitialize(&argc,&args,(char *)0,help);
17: /* Read matrix and RHS */
18: PetscViewerBinaryOpen(PETSC_COMM_WORLD,"rect",PETSC_FILE_RDONLY,&fd);
19: MatLoad(fd,MATSEQAIJ,&A);
20: PetscViewerDestroy(fd);
22: /* Free data structures */
23: MatDestroy(A);
25: PetscFinalize();
26: return 0;
27: }