[petsc-dev] Is DMPlexLabelComplete necessary in snes ex12?
Matthew Knepley
knepley at gmail.com
Wed Nov 20 17:52:49 CST 2013
On Tue, Nov 19, 2013 at 5:27 PM, Geoffrey Irving <irving at naml.us> wrote:
> This question isn't about changing ex12, I'm just making sure I
> understand what's going on:
>
> SetupSection in snes ex12 calls DMPlexLabelComplete on the "marker"
> label if Dirichlet conditions are chosen (not if Neumann is chosen).
> Specifically,
>
> if (user->bcType == DIRICHLET) {ierr = DMPlexLabelComplete(dm,
> label);CHKERRQ(ierr);}
>
> It then uses the same label ("marker") to create an index set:
>
> if (user->bcType == DIRICHLET) {ierr = DMPlexGetStratumIS(dm,
> bdLabel, 1, &bcPoints[0]);CHKERRQ(ierr);}
>
> I believe 1 is the codimension. If the index set is restricted to
> codimension 1, and DMPlexLabelComplete labels vertices based on edge
> labels, isn't the DMPlexLabelComplete call unnecessary?
>
1) The value 1 is just a convention that I use for marking the boundary. In
a real simulation,
there are probably many makers and they are user specified. This is
what happens in
TS ex11.
2) I should probably complete the label in the Neumann case, but I just
forgot. The completion
is not necessary the way my defaults mesh generators work, but is
sometimes necessary
when reading stuff in.
Matt
> Hopefully either all that made sense and the answer is yes, or someone
> can point out the hole in my understanding.
>
> Thanks for the help with all of my recent emails! I am getting closer
> to the actual solver part of ex12, which I understand from previous
> use, so hopefully I will have a working rewritten example in not too
> long.
>
> 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/d2db3a7b/attachment.html>
More information about the petsc-dev
mailing list