[petsc-dev] PetscSection

Matthew Knepley knepley at gmail.com
Sat Nov 10 14:28:59 CST 2012


On Sat, Nov 10, 2012 at 3:19 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Sat, Nov 10, 2012 at 2:05 PM, Matthew Knepley <knepley at gmail.com> wrote:
>>
>> Well, you have to designate the set with something. The easiest thing to
>> use is
>> an integer, so I use that. This is the only value associated with the set,
>> so I
>> would say Labels really only make sets.
>
>
> I was looking at DMComplexGetLabelValue() and didn't realize it's just one
> value per stratum. So you get the value associated with a point by searching
> to find which stratum it resides in. In the implementation, if point is not

Yes.

> in the set specified by the label, it does not set *value. Is that

It gives back -1 (complex.c:2103)

> intentional? And there is no way to query stratum values without getting a
> point that is a member. What about if a given level happens to be empty?

DMComplexGetLabelIdIS(). Its not problem if a level is empty.


> Also, linear search, oh my. ;-)

Was waiting to fix. Fixed.

>>
>>
>> Exactly, they are sorted by strata, not dimension.
>
>
> Okay, then dimensional query would really need to return an IS, provided it
> didn't switch to sorting by dimension.

Yes. Dimensions are just labels, so they can reuse the Label interface.

> Can you answer how you can distinguish a quad from a tet in a
> non-interpolated mesh?

You can't, but that is the point. You are not supposed to distinguish them.

   Matt

--
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



More information about the petsc-dev mailing list