<div>I wanted (a) only one -help output per object and (b) more structured options for objects, so I added two fields to _p_PetscObject:</div><div><br></div><div>char *description; /* long description of the object */</div>
<div>char *mansec; /* manual section for more information about the object */</div><div><br></div><div>These correspond to two new arguments to PetscHeaderCreate().</div><div><br></div><div>Then I made a new function PetscObjectOptionsBegin(PetscObject) that handles printing only once (through a flag in _p_PetscObject) and fills out the correct description and man sections.</div>
<div><br></div>I'm most of the way done with implementing this, but speak up if you think it's a bad idea.