1: static char help[] = "Tests dynamic loading of viewer.\n\n";
3: #include <petscsys.h>
4: #include <petscviewer.h>
6: int main(int argc, char **args)
7: {
8: PetscViewer viewer;
10: PetscFunctionBeginUser;
11: PetscCall(PetscInitialize(&argc, &args, NULL, help));
12: PetscCall(PetscViewerCreate(PETSC_COMM_WORLD, &viewer));
13: PetscCall(PetscViewerSetFromOptions(viewer));
14: PetscCall(PetscViewerDestroy(&viewer));
16: PetscCall(PetscViewerASCIIOpen(PETSC_COMM_WORLD, "stdout", &viewer));
17: PetscCall(PetscViewerDestroy(&viewer));
18: PetscCall(PetscFinalize());
19: return 0;
20: }
22: /*TEST
24: test:
26: TEST*/