[petsc-users] Quick Question on /src/ksp/ksp/example/ex29.c

Alan Wei zhenglun.wei at gmail.com
Tue Sep 13 09:26:29 CDT 2011


Thanks, Jed. Let me finish this part first and I will upgrade to version 3.2
to try new things.

best,
Alan


On Tue, Sep 13, 2011 at 1:10 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 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/9aef0129/attachment.htm>


More information about the petsc-users mailing list