Actual source code: ex3.c

petsc-3.6.1 2015-08-06
Report Typos and Errors
  2: static char help[] = "Tests dynamic loading of viewer.\n\n";

  4: #include <petscsys.h>
  5: #include <petscviewer.h>

  9: int main(int argc,char **args)
 10: {
 12:   PetscViewer    viewer;

 14:   PetscInitialize(&argc,&args,(char*)0,help);
 15:   PetscViewerCreate(PETSC_COMM_WORLD,&viewer);
 16:   PetscViewerSetFromOptions(viewer);
 17:   PetscViewerDestroy(&viewer);

 19:   PetscViewerASCIIOpen(PETSC_COMM_WORLD,"stdout",&viewer);
 20:   PetscViewerDestroy(&viewer);
 21:   PetscFinalize();
 22:   return 0;
 23: }