[petsc-users] Quick Question on /src/ksp/ksp/example/ex29.c
Jed Brown
jedbrown at mcs.anl.gov
Tue Sep 13 01:10:45 CDT 2011
On Tue, Sep 13, 2011 at 05:59, Alan Wei <zhenglun.wei at gmail.com> wrote:
> I'm still working on this poisson solver, and find a small problem.
> 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?
>
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DM/DMDAVecGetArray.html
See also the section of the users manual regarding structured grids.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110913/a9c3e26c/attachment.htm>
More information about the petsc-users
mailing list