2: static char help[] = "Loads matrix dumped by ex43.\n\n";
4: #include petscmat.h
8: int main(int argc,char **args)
9: {
10: Mat C;
11: PetscViewer viewer;
14: PetscInitialize(&argc,&args,0,help);
15: PetscViewerBinaryOpen(PETSC_COMM_WORLD,"matrix.dat",FILE_MODE_READ,&viewer);
16: MatLoad(viewer,MATMPIDENSE,&C);
17: PetscViewerDestroy(viewer);
18: MatView(C,PETSC_VIEWER_STDOUT_WORLD);
19: MatDestroy(C);
20: PetscFinalize();
21: return 0;
22: }