<div>Dear Jed,<br></div><div><br></div><br><div class="gmail_quote">2011/4/28 Jed Brown <span dir="ltr">&lt;<a href="mailto:jed@59a2.org">jed@59a2.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5"><div class="gmail_quote">On Thu, Apr 28, 2011 at 13:03, ilyas ilyas <span dir="ltr">&lt;<a href="mailto:ilyascfd@gmail.com" target="_blank">ilyascfd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>May be, It is a simple question, but I am little bit confused.</div><div>If I have two different size of arrays (one is cell-based which is from 1 to N,</div><div><div>other one is face-based which is from 1 to N+1).</div>


<div>How can  I create and work with them within a single DA structure, </div><div>for example in evaluating a function or setting up a matrix ? </div></div></blockquote></div><br></div></div><div>Two choices:</div><div>
<br></div><div>
1. Increase the block size (number of components per node) and just write the identity into the equatiosn for the &quot;N+1&quot; cell (which does not exist). This will normally give better memory performance and the few extra trivial equations around the margin are not a big deal.</div>
</blockquote><div><br></div><div><br></div><div>Would you please explain more the first option?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><br></div><div>2. Use two separate DAs and make the parallel decomposition compatible. You can put them together into one system using DMComposite. This is usually overkill for staggered grids, but extends to general multi-physics problems. Support for this option is better in petsc-dev, see, for example,</div>

<div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/src/snes/examples/tutorials/ex28.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/src/snes/examples/tutorials/ex28.c.html</a></div>

</blockquote></div><div><br></div><div><br></div><div>Thank you,<br></div><div>Ilyas.</div>