Dear all, I have a simple question. I am solving a DG problem locally and have maps established between cell-local and face-local dof numbering in a cell.
Let me explain what I mean. For a 2nd order 3D DG element, I have the following maps constructed according to documentation of FE_DGQ <https://www.dealii.org/current/doxygen/deal.II/classFE__DGQ.html> class. map[0] = { 0,3,6,9,12,15,18,21,24 } map[1] = { 2,5,8,11,14,17,20,23,26 } map[2] = { 0,1,2,9,10,11,18,19,20 } map[3] = { 6,7,8,15,16,17,24,25,26 } map[4] = { 0,1,2,3,4,5,6,7,8 } map[5] = { 18,19,20,21,22,23,24,25,26 } These are the cell's dofs lying on each face. You may note that these are also in lexicographical order. I use them for looping over a face's dofs. For example for(auto cell: dof_handler.active_cell_iterators()){ cell->get_dof_indices(dof_ids); for(int face_id = 0; face_id < 6; face_id++){ for(int i=0; i<dofs_per_face; i++){ unsigned int cell_dof_id = map[face_id][i]; unsigned int global_dof_id = dof_ids[cell_dof_id]; // do something with cell_dof_id and global_dof_id } } } My question is how do I get the neighbor's dof id which coincides with the dof lying on current face. I have tried the following and it seems to work for few meshes (additional lines highlighted in blue/red). for(auto cell: dof_handler.active_cell_iterators()){ cell->get_dof_indices(dof_ids); for(int face_id = 0; face_id < 6; face_id++){ auto neighbor = cell->neighbor(face_id); neighbor->get_dof_indices(dof_ids_neighbor); int face_id_neighbor = cell->neighbor_of_neighbor(face_id); for(int i=0; i<dofs_per_face; i++){ unsigned int cell_dof_id = map[face_id]*[i]*; unsigned int global_dof_id = dof_ids[cell_dof_id]; unsigned int neighbor_dof_id = map[face_id_neighbor]*[i]*; dof_locations[cell_dof_id] == dof_locations[neighbor_dof_id]; // will this always hold? // do something with cell_dof_id and global_dof_id } } } Will the equality in the red line hold for *all* types of meshes? Please excuse me if the terminology I am using is not standard. I would gladly provide any clarification. Is there a better strategy to do this? All I want is a map from face-local to cell-local dof numbering (because I use a local method) and a matching of dof ids of a face across cells sharing which share that face in common. Thanking in anticipation, Vachan -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/fb896379-fd40-45a8-acab-5c85b153a65dn%40googlegroups.com.