[petsc-dev] DMPlexAddBoundary

Matthew Knepley knepley at gmail.com
Wed May 21 05:43:33 CDT 2014


On Wed, May 21, 2014 at 12:46 AM, Jed Brown <jed at jedbrown.org> wrote:

> Adrian Croucher <a.croucher at auckland.ac.nz> writes:
> > In the 'PhysicsCreate' functions there are calls to DMPlexAddBoundary(),
> > which takes an array of IDs; e.g. in PhysicsCreate_SW() the IDs are
> > {100,101,200,300}. It looks like these IDs define where the BCs are
> > applied, but what do these numbers actually refer to?
>
> They are numbered "face sets" on the Cubit-generated example mesh.
>

1) Cubit has a notion of Face Set, which are groups of faces in the mesh

2) These sets are written out as Face Sets in the ExodusII format

3) PETSc reads in the ExodusII format and creates a label names Face Sets,
     where the value is the set label (like 101) and the points are the set
members.

    If you look at a representative BC call:

    DMPlexAddBoundary(dm, PETSC_TRUE, "inflow",  "Face Sets", 0, (void
(*)()) PhysicsBoundary_Advect_Inflow,  ALEN(inflowids),  inflowids,  phys)

it says

    PETSC_TRUE:   This is an essential boundary condition
    "inflow":                 The boundary is named "inflow" so I can use
-bc_inflow 100,101,200
    "Face Sets":          The name of the Plex label describing the boundary
    PhysicsBoundary_Advect_Inflow: The function implementing the BC
    ALEN(inflowids): The number of label ids which are constrained
    inflowids:               The label ids which give the constrained point
(face) sets
    phys:                      The user context

You could make your own label marking faces however you wish, and then give
that name
instead of "Face Sets". Also, you can set the ids from the command line.

  Thanks,

     Matt

-- 
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/20140521/ccefdc04/attachment.html>


More information about the petsc-dev mailing list