<div class="gmail_quote">On Tue, Jan 17, 2012 at 02:04, Klaij, Christiaan <span dir="ltr"><<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1jd">Thanks Jed, but how would I store the grid point coordinates? The grid could<br>
be non-uniform (stretching, deforming) so I still need a 9-by-9 DM to store<br>
the grid point coordinates, right?</div></blockquote></div><br><div>If you want to store coordinates that way, yes.</div><div><br></div><div>One way is to create a separate DMDA for the coordinates (setting lx,ly,lz so the layout is compatible) and use PetscObjectCompose()/PetscObjectQuery() to attach it to the "solution" DM. If you need refinement/coarsening, you can implement it with whatever rule you want and set up the coarse/fine DM with an attached coordinate DM.</div>