<div class="gmail_quote">On Sat, Jan 14, 2012 at 12:38, Junchao Zhang <span dir="ltr">&lt;<a href="mailto:junchao.zhang@gmail.com">junchao.zhang@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":jh">Does PETSc provide convenient functions to compute this layout( i.e.,# rows on each processor), or I have to do it myself?<div>I browsed PETSc document and did not find them.</div></div></blockquote></div><br>
<div>MatSetSizes() lets you specify local and/or global sizes. If you specify both, it checks that they are compatible. The implementation uses</div><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscSplitOwnership.html</a></div>
<div><br></div><div><br></div><div>If these are not suitable for your purposes, can you be more specific about what you would like to do?</div>