<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><br></div><div>Thanks</div><div><br></div><div dir="ltr">PetscViewer viewer1;<table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC357" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">   ierr = <span class="gmail-pl-c1">PetscViewerBinaryOpen</span>(PETSC_COMM_WORLD,fileName.<span class="gmail-pl-c1">c_str</span>(),FILE_MODE_WRITE,&viewer1);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC358" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">    ierr = <span class="gmail-pl-c1">PetscViewerSetFormat</span>(viewer1,PETSC_VIEWER_BINARY_MATLAB);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC359" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC360" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">    ierr = <span class="gmail-pl-c1">PetscObjectSetName</span>((PetscObject)<span class="gmail-pl-smi">mX</span>,<span class="gmail-pl-s"><span class="gmail-pl-pds">"</span>x<span class="gmail-pl-pds">"</span></span>);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC361" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">    ierr = <span class="gmail-pl-c1">PetscObjectSetName</span>((PetscObject)<span class="gmail-pl-smi">mB</span>,<span class="gmail-pl-s"><span class="gmail-pl-pds">"</span>b<span class="gmail-pl-pds">"</span></span>);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC362" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC363" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">    ierr = <span class="gmail-pl-c1">VecView</span>(<span class="gmail-pl-smi">mX</span>,viewer1);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC364" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">    ierr = <span class="gmail-pl-c1">VecView</span>(<span class="gmail-pl-smi">mB</span>,viewer1);<span class="gmail-pl-c1">CHKERRQ</span>(ierr);</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-LC365" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><br>-- <br><div dir="ltr" class="gmail_signature"><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>