[petsc-dev] setting viewer format from options

Hapla Vaclav vaclav.hapla at erdw.ethz.ch
Thu Jan 24 10:05:02 CST 2019


> On 18 Jan 2019, at 18:43, Jed Brown <jed at jedbrown.org> wrote:
> 
> "Smith, Barry F. via petsc-dev" <petsc-dev at mcs.anl.gov> writes:
> 
>>   I'm very hesitant to have the -viewer_format supported by PETSc
>>   because it reintroduces the concept of "setting" the viewer format,
>>   as opposed to pushing and popping formats. I think it is a mistake
>>   to have both the ability to set the format and to push/pop it, they
>>   don't play well together.
> 
> I think we could allow setting the format *before* any push takes place.
> I.e., if a caller creates a Viewer, they could set its format at that
> moment, but anyone who is given a Viewer to use can only push/pop.
> 
> I don't know that such behavior is necessary/desirable in this instance.

For me it would make sense. It would allow to set the default format from options while not spoiling the push/pop.

But what do you Barry think?

Or alternatively, what about PetscViewerPushFormatFromOptions(PetscViewer) I proposed earlier?

Thanks

Vaclav


More information about the petsc-dev mailing list