<div dir="ltr"><div dir="ltr">On Sun, Feb 23, 2020 at 6:25 PM Richard Beare via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br> </div><div>Hi,</div><div>The following code gives a deprecation warning. What is the correct way of updating the use of ViewerSetFormat to ViewerPushFormat (which I presume is the preferred replacement). My first attempt gave errors concerning ordering.</div></div></blockquote><div><br></div><div>You can't just change SetFormat to PushFormat here?</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"><div dir="ltr"><div>Thanks</div><div><br></div><div dir="ltr">PetscViewer viewer1;<table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC357">   ierr = <span>PetscViewerBinaryOpen</span>(PETSC_COMM_WORLD,fileName.<span>c_str</span>(),FILE_MODE_WRITE,&viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC358">    ierr = <span>PetscViewerSetFormat</span>(viewer1,PETSC_VIEWER_BINARY_MATLAB);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC359">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC360">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mX</span>,<span><span>"</span>x<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC361">    ierr = <span>PetscObjectSetName</span>((PetscObject)<span>mB</span>,<span><span>"</span>b<span>"</span></span>);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC362">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC363">    ierr = <span>VecView</span>(<span>mX</span>,viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC364">    ierr = <span>VecView</span>(<span>mB</span>,viewer1);<span>CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table><tbody><tr><td id="gmail-m_1427995789408475818gmail-LC365">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><br>-- <br><div dir="ltr"><div dir="ltr"><div>--<br>A/Prof Richard Beare<br>Imaging and Bioinformatics, Peninsula Clinical School</div><div><span><div><span><a href="http://orcid.org/0000-0002-7530-5664" target="_blank">orcid.org/0000-0002-7530-5664</a></span></div></span></div><div><a href="mailto:Richard.Beare@monash.edu" target="_blank">Richard.Beare@monash.edu</a><br>+61 3 9788 1724<br><span><br></span></div><div><br></div><div><span></span><br>Geospatial Research: <a href="https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis" target="_blank">https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis</a></div></div></div></div></div>
</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>