Actual source code: ex44.c
1: /*$Id: ex44.c,v 1.15 2001/04/10 19:35:44 bsmith Exp $*/
3: static char help[] = "Loads matrix dumped by ex43.\n\n";
5: #include petscmat.h
9: int main(int argc,char **args)
10: {
11: Mat C;
12: PetscViewer viewer;
13: int ierr;
15: PetscInitialize(&argc,&args,0,help);
16: PetscViewerBinaryOpen(PETSC_COMM_WORLD,"matrix.dat",PETSC_FILE_RDONLY,&viewer);
17:
18: MatLoad(viewer,MATMPIDENSE,&C);
19: PetscViewerDestroy(viewer);
20: MatView(C,PETSC_VIEWER_STDOUT_WORLD);
21: MatDestroy(C);
22: PetscFinalize();
23: return 0;
24: }