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.

Reply via email to