[petsc-users] Petsc Options
Cody Permann
codypermann at gmail.com
Mon Nov 14 15:16:01 CST 2011
How about a function that would fill in a char *[] with the options used or a function that would return a boolean for a single option indicating whether it was used or not? Basically we just need a public way to get at the data in PetscOptionTable::used.
Thanks,
Cody
On Nov 14, 2011, at 12:41 PM, Barry Smith wrote:
>
> Cody,
>
> What would you like the API to look like?
>
> Barry
>
>
> On Nov 14, 2011, at 1:39 PM, Cody Permann wrote:
>
>> There doesn't appear to be an API in PETSc for getting back the command line options "used" or "unused" for a simulation. Yes I am aware that the options unused can be printed but there doesn't appear to be a mechanism for returning them back through a function call. I'd like to add an option to MOOSE that would work like PETSc's "-options_left" CLI argument, but in order to do so I need to combine the options recognized for both libraries to report the global unused list. Right now both MOOSE and PETSc have full access to the raw ARGV vector and each library recognizes it's own options and ignores the rest.
>>
>> I could strip out the options from ARGV before passing it to PETSc in conjunction with "-options_left" but that doesn't give me quite as much flexibility as I'd like. It looks like there are about two dozen or so PETSc related options functions in the API but none of them return unused options, or otherwise allow me to query whether any particular option was recognized or not. Is this assumption correct?
>>
>> Thanks,
>> Cody
>
More information about the petsc-users
mailing list