Thanks, Jed. Let me finish this part first and I will upgrade to version 3.2 to try new things. <div><br></div><div>best,</div><div>Alan</div><div><br><br><div class="gmail_quote">On Tue, Sep 13, 2011 at 1:10 AM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><div class="gmail_quote">On Tue, Sep 13, 2011 at 05:59, Alan Wei <span dir="ltr">&lt;<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@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>    I&#39;m still working on this poisson solver, and find a small problem. </div><div>    I found from the original  code that DMMGGetx(dmmg) can get the solution vector after calculation. However, I want to have them as a format of 2-dimensional array (since I solve for a 2D Poisson Equation), like coors[j][i]. How can I do that? </div>

</blockquote></div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DM/DMDAVecGetArray.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DM/DMDAVecGetArray.html</a></div>

<div><br></div><div>See also the section of the users manual regarding structured grids.</div><div><br></div><div>If you upgrade to petsc-3.2, you can also do multigrid without DMMG. See src/ksp/ksp/examples/tutorials/ex45.c for an example. This is now the preferred interface: we would like to eventually remove DMMG because is more complicated to use and does not compose well with other solvers, e.g. TS.</div>

</blockquote></div><br></div>