Actual source code: ex19.c


  2: static char help[] = "Illustrates creating an options database.\n\n";

  4: #include <petscsys.h>
  5: #include <petscviewer.h>
  6: int main(int argc,char **argv)
  7: {
  8:   PetscOptions   options;

 10:   PetscInitialize(&argc,&argv,(char*)0,help);
 11:   PetscOptionsCreate(&options);
 12:   PetscOptionsInsert(options,&argc,&argv,"optionsfile");
 13:   PetscOptionsInsertString(options,"-option1 value1 -option2 -option3 value3");
 14:   PetscOptionsView(options,PETSC_VIEWER_STDOUT_WORLD);
 15:   PetscOptionsDestroy(&options);
 16:   PetscFinalize();
 17:   return 0;
 18: }

 20: /*TEST

 22:    test:
 23:      localrunfiles: optionsfile
 24:      filter: egrep -v "(malloc|nox|display|saws_port|vecscatter|options_left|check_pointer_intensity|cuda_initialize|error_output_stdout|use_gpu_aware_mpi|checkstack)"

 26: TEST*/