[petsc-users] a question on DMPlexSetAnchors

Matthew Knepley knepley at gmail.com
Wed Jan 4 17:59:53 CST 2017


On Tue, Jan 3, 2017 at 4:02 PM, Rochan Upadhyay <u.rochan at gmail.com> wrote:

> I think I sent my previous question (on Dec 28th) to the wrong place
> (petsc-users-request at mcs.anl.gov).
>

Yes, this is the correct mailing list.


> To repeat,
>
> I am having bit of a difficulty in understanding the introduction of
> constraints in DMPlex. From a quick study of the User Manual I gather
> that it is easiest done using DMPlexSetAnchors ? The description of this
> routine says that there is an anchorIS that specifies the anchor points
> (rows in the
> matrix). This is okay and easily understood.
>

I think this is not the right mechanism for you.

Anchors:

This is intended for constraints in the discretization, such as hanging
nodes, which are
purely local, and intended to take place across the entire domain. That
determines the
interface.

Dirichlet Boundary Conditions:

For these, I would recommend using the Constraint interface in
PetscSection, which
eliminates these unknowns from the global system, but includes the values
in the local
vectors used in assembly.

You can also just alter your equations for constrained unknowns.

Constraints among Fields:

I would recommend just putting the constraint in as an equation. In your
case the effect can
be non-local, so this seems like the best strategy.

  Thanks,

     Matt


> There is also an anchorSection which is described as a map from constraint
> points
> (columns ?)  to the anchor points listed in the anchorIS. Should this not
> be a map between
> solution indices (i.e. indices appearing in the vectors and matrices) ?
>
> For example I am completely unable to set up a simple constraint matrix
> for the following (say):
>
> Point 1, Field A, B
> Point 2-10 Field A
> At point 1, Field B depends on Field A at points 1-10
>
> When I set it up it appears to create a matrix where field A depends on
> field A values at points 1-10.
>
> How does the mapping work in this case ? Will the DMPlexSetAnchors()
> routine work
> for this simple scenario ?
>
> If not, is the only recourse to create the constraint matrix oneself
> using DMSetDefaultConstraints ?
>
> Also documentation for DMSetDefaultConstraints is incomplete.
> The function accepts three arguments (dm, section and Mat) but
> what the section is is not described at all.
>
> I don't know if my question makes any sense. If it does not then it is
> only a reflection of my utter confusion regarding the routine
> DMPlexSetAnchors :-(
>
> Regards,
> Rochan
>



-- 
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-users/attachments/20170104/cc84c622/attachment.html>


More information about the petsc-users mailing list