On Thu, Sep 6, 2012 at 1:12 PM, Ronald M. Caplan <span dir="ltr"><<a href="mailto:caplanr@predsci.com" target="_blank">caplanr@predsci.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>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). <br><br>
The default partitioning for petsc just assigns contiguous rows of the coefficient matrix to each core which is hampering performance. <br>
<br>From looking around I have found that there are AO routines and DM routines in petsc.<br><br>What is the difference between using either of them for my problem? <br></blockquote><div><br></div><div>AO is just a global renumbering. DMDA is actually a structured grid.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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?<br>
Or do AO routines just map the default petsc partitioning indices to my problem's indices in which case I want to use DM?<br></blockquote><div><br></div><div>If you have a colocated discretization on the structured grid, meaning your unknowns are only on vertices (or only on cells),</div>
<div>use the DMDA. It will make your life easier, and also allows you to match your by-hand grid partitioning if you want.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>Thanks<br><br>Ron Caplan<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>