[petsc-users] Field dependent stencil in DAs

Jed Brown jedbrown at mcs.anl.gov
Mon Jul 11 18:38:16 CDT 2011


On Mon, Jul 11, 2011 at 18:28, Kevin Green <Kevin.Green at uoit.ca> wrote:

> Essentially, I'm (currently) looking to numerically solve a system of 5
> time dependent equations, but only 1 of the fields is involved with spatial
> derivatives.  Now, I've found a couple of ways to do this, either by
> introducing a Field struct cf.
> ${PETSC_DIR}/src/snes/examples/tutorials/ex19.c, or by changing one of the
> various ts examples to use DAVecGetArrayDOF(...).  Would there be any
> performance difference between introducing a Field struct compared to
> DAVecGetArrayDOF(...)?  Intuitively, I would think not...but I suppose I
> should ask since I'm here anyway.
>

I like using field structs because then I get to use names instead of
numbers for my fields and because there is one less level of pointer
indirection.


>
> Now the real reason I came:  Is there some sort of mask that can be applied
> to the DAs that would turn off the communication of ghost points for some
> degrees of freedom?  I assume that the communication structures are set up
> so that only a single message needs to be passed between communicating
> processes on update, but this still results in passing 5X the data that I
> have to.  Any comment on this would be much appreciated.
>

DMDASetBlockFills()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110711/add9313b/attachment.htm>


More information about the petsc-users mailing list