<div dir="ltr"><div dir="ltr">On Fri, Jul 12, 2019 at 2:43 PM Manuel Valera 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">Hi petsc devs and users,<br><div><br></div><div>Is there an analogue to reshape as in the fortran / matlab functions for petsc arrays? i am looking into converting a 3D DMDA array of (nx,ny,nz) sizes into a 2D MATMPI matrix of size (nx) x (ny) x (nz) by (nx) x (ny) x (nz), that will be used as the laplacian matrix in a linear solver, which will change in every iteration, so is easier to calculate in 3D and convert.</div></div></blockquote><div><br></div><div>I do not think this makes sense. A DMDA array is a Vec, or function on the grid. A Mat is a linear operator between those functions.</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"><div dir="ltr"><div>Thanks for your help,</div><div><br></div><div><br></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>