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

Geoffrey Irving irving at naml.us
Wed Nov 20 00:26:03 CST 2013


On Tue, Nov 19, 2013 at 12:48 PM, Geoffrey Irving <irving at naml.us> wrote:
> I'm trying to understand the boundary condition projection function
>
>      DMPlexProjectFunctionLocal
>
> It seems to access the default section of the DM, which knows about
> boundary conditions, but doesn't seem to access it in a way that would
> use the boundary condition information.  How does it know to only do
> work on the boundary?
>
> If it snapped to the "boundary conditions" globally ex12 would still
> work since the "boundary conditions" are the globally correct exact
> solution, but I imagine that's not actually what's happening.
>
> Thanks,
> Geoffrey

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.

Geoffrey



More information about the petsc-dev mailing list