<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 21, 2014 at 12:46 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">Adrian Croucher <<a href="mailto:a.croucher@auckland.ac.nz">a.croucher@auckland.ac.nz</a>> writes:<br>
> In the 'PhysicsCreate' functions there are calls to DMPlexAddBoundary(),<br>
> which takes an array of IDs; e.g. in PhysicsCreate_SW() the IDs are<br>
> {100,101,200,300}. It looks like these IDs define where the BCs are<br>
> applied, but what do these numbers actually refer to?<br>
<br>
</div>They are numbered "face sets" on the Cubit-generated example mesh.<br>
</blockquote></div><br>1) Cubit has a notion of Face Set, which are groups of faces in the mesh</div><div class="gmail_extra"><br></div><div class="gmail_extra">2) These sets are written out as Face Sets in the ExodusII format</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">3) PETSc reads in the ExodusII format and creates a label names Face Sets,</div><div class="gmail_extra"> where the value is the set label (like 101) and the points are the set members.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"> If you look at a representative BC call:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"> DMPlexAddBoundary(dm, PETSC_TRUE, "inflow", "Face Sets", 0, (void (*)()) PhysicsBoundary_Advect_Inflow, ALEN(inflowids), inflowids, phys)</div>
<div><br></div><div>it says</div><div><br></div><div> PETSC_TRUE: This is an essential boundary condition</div><div> "inflow": The boundary is named "inflow" so I can use -bc_inflow 100,101,200</div>
<div> "Face Sets": The name of the Plex label describing the boundary</div><div> PhysicsBoundary_Advect_Inflow: The function implementing the BC</div><div> ALEN(inflowids): The number of label ids which are constrained</div>
<div> inflowids: The label ids which give the constrained point (face) sets</div><div> phys: The user context</div><div><br></div><div>You could make your own label marking faces however you wish, and then give that name</div>
<div>instead of "Face Sets". Also, you can set the ids from the command line.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><br>-- </div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>