<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jan 16, 2019 at 7:48 AM Hapla  Vaclav via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I need to distinguish a PetscViewerFormat in DMLoad() and MatLoad(). And it would be handy to be able to set it from options. So I wanted to add -viewer_format option into PetscViewerSetFromOptions().<br>
<br>
But the problem is PetscViewerSetFormat() is deprecated and PetscViewerPushFormat() needs to be paired with PetscViewerPopFormat() which I don't know where to place correctly.<br>
<br>
Can you see some clean way to proceed?<br></blockquote><div><br></div><div>I think you just Push and do not Pop. Do we check for a non-empty stack? We silently ignore too many Pops.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks<br>
<br>
Vaclav</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>