[petsc-users] Read and use boundaries from exodus in finite element context

Max Rietmann max.rietmann at gmail.com
Tue Mar 1 09:58:06 CST 2016


Dear all,

We are building out a new finite-element code for wave propagation and I 
am currently implementing the boundary conditions. My first pass will 
simply have dirichlet boundaries, but eventually we will have more 
sophisticated options available.

I am creating an exodus mesh in Trelis/Cubit, in which I can create one 
(or more) "side sets", which are properly read by the exodus reader. 
 From reading the petsc source (plexexodusii.c), it seems that these 
basically create a list of faces, which belong to the side set.

A call to DMPlexGetLabelValue(dm,"Face Set",face_id,&value), allows me 
to see if "face_id" is on the boundary by checking value (>=1 for 
boundary, or -1 for not in set). Additional side sets get ids = 
{2,3,etc}. This allows us to have multiple types of boundary (absorbing, 
reflecting, etc).

However, I am unsure how to determine if an element has a particular 
face_id in order to determine if one face of the element is on a 
boundary (and which value it has {-1,1,2,3, etc}).

The routine is listed here:

     PetscErrorCode DMPlexGetLabelValue(DM dm, const char name[], 
PetscInt point, PetscInt *value)

How do I determine the "point" of a face, if I'm iterating through my 
elements.

thanks!

Max Rietmann

PS I've also seen the DMPlexAddBoundary method, but I wasn't sure how to 
use it in our setting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160301/e1dc3741/attachment.html>


More information about the petsc-users mailing list