[petsc-users] AO versus DM for 3D CG solve
Matthew Knepley
knepley at gmail.com
Thu Sep 6 13:32:35 CDT 2012
On Thu, Sep 6, 2012 at 1:12 PM, Ronald M. Caplan <caplanr at predsci.com>wrote:
> Hi,
>
> I am trying to implement petsc into an existing (very large) FORTRAN code
> which splits a 3D grid in each dimension (so for a 100x100x100 problem on 4
> cores, each core gets a 25x25x25 part of the grid).
>
> The default partitioning for petsc just assigns contiguous rows of the
> coefficient matrix to each core which is hampering performance.
>
> From looking around I have found that there are AO routines and DM
> routines in petsc.
>
> What is the difference between using either of them for my problem?
>
AO is just a global renumbering. DMDA is actually a structured grid.
> Should I be using DM to partition the petsc matrices/vectors so that they
> match the grid points on each node, or do I use AO routines to do that?
> Or do AO routines just map the default petsc partitioning indices to my
> problem's indices in which case I want to use DM?
>
If you have a colocated discretization on the structured grid, meaning your
unknowns are only on vertices (or only on cells),
use the DMDA. It will make your life easier, and also allows you to match
your by-hand grid partitioning if you want.
Matt
>
> Thanks
>
> Ron Caplan
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/d69edda6/attachment.html>
More information about the petsc-users
mailing list