# What does PetscBagSetFromOptions() do?

I'm writing a program that uses PETSc and SLEPc, and I was looking for a convienient way to read in options from the command line. The description of PetscBagSetFromOptions() in the official documentation says it "allows setting options from a bag". Does this mean that if I create a bag with a variety of PetscFoo elements I can read in my program's parameters from the command line without having to use PetscOptionsGetInt() and other functions like it?

-

Do you mean it sets the items in the bag by their names, or just checks to see if they are in the options database? I don't know enough about PetscOptionsBegin() and PetscOptionsSometype() to tell the difference from the source. –  Dan Mar 13 '12 at 0:04