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.cnn";

 5:  #include petscmat.h

  7: int main(int argc,char **args)
  8: {
  9:   int         ierr;
 10:   Mat         A;
 11:   PetscViewer fd;

 13:   PetscInitialize(&argc,&args,(char *)0,help);

 15:   /* Read matrix and RHS */
 16:   PetscViewerBinaryOpen(PETSC_COMM_WORLD,"rect",PETSC_BINARY_RDONLY,&fd);
 17:   MatLoad(fd,MATSEQAIJ,&A);
 18:   PetscViewerDestroy(fd);

 20:   /* Free data structures */
 21:   MatDestroy(A);

 23:   PetscFinalize();
 24:   return 0;
 25: }