Actual source code: ex19.c
petsc-3.11.4 2019-09-28
2: static char help[] = "Illustrates creating an options database.\n\n";
4: /*T
5: Concepts: introduction to PETSc;
6: Concepts: printing^in parallel
7: Processors: n
8: T*/
12: #include <petscsys.h>
13: #include <petscviewer.h>
14: int main(int argc,char **argv)
15: {
17: PetscOptions options;
20: PetscInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr;
21: PetscOptionsCreate(&options);
22: PetscOptionsInsert(options,&argc,&argv,"optionsfile");
23: PetscOptionsInsertString(options,"-option1 value1 -option2 -option3 value3");
24: PetscOptionsView(options,PETSC_VIEWER_STDOUT_WORLD);
25: PetscOptionsDestroy(&options);
27: PetscFinalize();
28: return ierr;
29: }
32: /*TEST
34: test:
35: localrunfiles: optionsfile
36: filter: grep -v malloc | grep -v nox | grep -v display | grep -v saws_port | grep -v vecscatter | grep -v options_left | grep -v check_pointer_intensity
37: TEST*/