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

Matthew Knepley knepley at gmail.com
Wed Nov 20 18:07:55 CST 2013


On Wed, Nov 20, 2013 at 10:38 AM, Geoffrey Irving <irving at naml.us> wrote:

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


The problem here is generality. The INSERT_BC_VALUES sets anything that is
constrained in the PetscSection. The constraints can come from many labels
and many values, so that no one of those ISes is an index. Adding support
for an
index over constrained points in a PetscSection is easy (basically the same
as the
DMLabel code).

   Matt


>
> Geoffrey
>



-- 
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/20131120/dd716d7f/attachment.html>


More information about the petsc-dev mailing list