Not directly, but you can use PetscOptionsHasHelp() to query whether the user 
runs with “-help”, print all of your available options and exit early. So you 
might do:

PetscOptionsBegin();
< your options list here >
PetscOptionsEnd();
PetscOptionsHasHelp(NULL, &set);
If (set) PetscFinalize();

You’ll still get the header with the basic PetscOptions but it shouldn’t print 
all the other options. 

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: +1 (312) 694-3391

> On Jan 11, 2021, at 17:36, Mark Adams <[email protected]> wrote:
> 
> 
> I don't think so. I use grep.
> 
>> On Mon, Jan 11, 2021 at 5:53 PM Abhyankar, Shrirang G via petsc-users 
>> <[email protected]> wrote:
>> I have an application where I set a bunch of application-specific options in 
>> PetscOptionsBegin/End and it uses the default PetscOptions database. When 
>> running the application with “-help” option all the application and PETSc 
>> options get displayed. Is there a way to suppress displaying PETSc options, 
>> but only display the application options.
>> 
>>  
>> 
>> Thanks,
>> 
>> Shri
>> 
>>  

Reply via email to