[petsc-dev] DMPlexCreateSection crash in a no-boundary corner case
Geoffrey Irving
irving at naml.us
Thu Nov 21 12:42:12 CST 2013
On Thu, Nov 21, 2013 at 8:11 AM, Matthew Knepley <knepley at gmail.com> wrote:
> On Wed, Nov 20, 2013 at 10:35 PM, Geoffrey Irving <irving at naml.us> wrote:
>>
>> DMPlexCreateSection expects that the boundary index sets its given are
>> non-null. However, if these are retrieved via DMPlexGetStratumIS from
>> a label generated by DMPlexMarkBoundaryFaces, the index sets will come
>> out null, causing the following error.
>>
>> In my case this was caused by a bug: my DMPlex creation routine is
>> broken. However, it could also arise from a mesh without boundary,
>> such as a Klein bottle. Do we care about this kind of corner case?
>> If so, what's the right fix? Two example possibilities are
>>
>> 1. Make DMPlexCreateSection treat null index sets as no boundary.
>> 2. Make DMPlexMarkBoundaryFaces ensure that the stratum for value 1 is
>> "there" even though it is empty. I'm not sure if this makes sense in
>> the desired semantics.
>
>
> My preference is to have the code calling DMPlexCreateSection() check for NULL
> when it extracts the IS and decrement numBC if this happens.
That works.
Geoffrey
More information about the petsc-dev
mailing list