[petsc-dev] components in PetscSection

Matthew Knepley knepley at gmail.com
Fri Aug 31 15:29:49 CDT 2012

On Fri, Aug 31, 2012 at 1:04 PM, Chris Eldred <chris.eldred at gmail.com>wrote:

> I was wondering how components were treated in PetscSection- my
> understanding is that a field with multiple components and multiple
> dofs would have those dofs duplicated for each component, but that
> does not appear to be the case. For example, let's say I have a field
> with 2 components and 2 dofs that covers 10 points. I expected that it
> would have size 40: 4 dofs per point x 10 points. Instead, it appears
> to have size 20: 2 dofs x 10 pts.

Yep, that is not the case. What if the components are discretized with
different numbers of dofs on different points? This definitely happens.

> What then are components in PetscSection- is it just a way of telling
> the code that the dofs associated with a field at a point are really
> split across multiple components (ie for my example, I should define 4
> dofs at each pt instead of 2)? How does that then interact with the
> re-ordering done in DMComplexVecGetClosure?

The idea of components is to give you an idea what kind of field you are
dealing with. I know I don't go so far as to tell you its a vector, or a
pseudo-vector, etc. I am not sure where to draw the line yet. Within
GetClosure(), the dofs for reversed points are separately reversed per


> --
> Chris Eldred
> DOE Computational Science Graduate Fellow
> Graduate Student, Atmospheric Science, Colorado State University
> B.S. Applied Computational Physics, Carnegie Mellon University, 2009
> chris.eldred at gmail.com

What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120831/8728c154/attachment.html>

More information about the petsc-dev mailing list