Dear Jed,
2011/4/28 Jed Brown <jed at 59a2.org> > On Thu, Apr 28, 2011 at 13:03, ilyas ilyas <ilyascfd at gmail.com> wrote: > >> May be, It is a simple question, but I am little bit confused. >> If I have two different size of arrays (one is cell-based which is from 1 >> to N, >> other one is face-based which is from 1 to N+1). >> How can I create and work with them within a single DA structure, >> for example in evaluating a function or setting up a matrix ? >> > > Two choices: > > 1. Increase the block size (number of components per node) and just write > the identity into the equatiosn for the "N+1" 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. > Would you please explain more the first option? > > 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, > > > http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/src/snes/examples/tutorials/ex28.c.html > Thank you, Ilyas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110428/44b2e70e/attachment.htm>
