Hi Katie,

just an idea, you can use the GridTools::find_cells_adjacent_to_vertex function 
to get a vector of iterators of active cells adjacent to your vertex

and looping over the cells in this vector, you can do something like this:

for (cell in vector_of_cells)
  for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
    if(cell->face(face)->at_boundary())
        {
          for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_face; ++v)
            if (cell->face(face)->vertices[v] == your_vertex)
              your vertex is on the boundary
        }


I have not tried it and maybe there is a more elegant way,

but maybe this helps,

Best,
Martin





________________________________
Von: Katie Leonard <[email protected]>
An: "[email protected]" <[email protected]>
Gesendet: Mittwoch, den 8. Juni 2011, 12:35:09 Uhr
Betreff: [deal.II] How to know whether a vertex is on the boundary

Hello,

Is there an easy way of working out whether a particular vertex is on the 
boundary of the mesh?  You can check this for a particular cell  with

cell->at_boundary()

and with a face
cell->face(face)->at_boundary()

but I can't seem to find out how to do this for a particular vertex.  

Many thanks

K Leonard
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to