[petsc-dev] What part of DMPlexProjectFunctionLocal restricts to the boundary in snes ex12?

Geoffrey Irving irving at naml.us
Wed Nov 20 10:38:23 CST 2013


On Tue, Nov 19, 2013 at 10:32 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Geoffrey Irving <irving at naml.us> writes:
>> I was missing the obvious INSERT_BC_VALUES parameter in the call to
>> DMPlexProjectFunctionLocal.  It's a shame one has to loop over the
>> interior just to set the boundary, but it does seem like the code
>> produces the correct answer.
>
> You can of course build an index to loop over any chosen feature fast.
> But with no index, an iterator for a feature would still involve
> visiting everything.

That was part of why I was confused: in snes ex12, we *do* build a
boundary index set (SetupSection).  I haven't traced the code to see
if the IS itself is discarded, but the DM at least has access to it in
some form as the boundary section of its default section.

Geoffrey



More information about the petsc-dev mailing list