Dear all,
For a project, I try to implement a parallel distributed homogenization problem with periodic BC. A serial version is already implemented. The feature of the periodic BC in the serial case is that it is not purely periodic, but periodic with some offset. Therefore the periodic boundary pairs are collected (`dealii::GridTools::collect_periodic_faces*(* doFHandler, ...)`) and after that stored together with the DOF indices to handle the periodic BC by oneself afterwards. For the parallel implementation, I go through the following steps: 1. gather periodic face pairs for all directions using `dealii::GridTools::collect_periodic_faces(triangulation, ..., periodic_vector)` 2. add periodicity by `triangulation.add_periodicity(periodic_vector)` 3. collect periodic boundary pairs using `dealii::GridTools::collect_periodic_faces*(* 4. doFHandler, ..., periodic_vector2)` 5. store the pairs with the DOFs by looping over the `periodic_vector2` - to access the DOFs I tried the following `*for **(**const auto *&facePair : periodic*_vector2)* *{* (...) // loop over the DOFs of the boundary periodic pair cells *if **(*facePair.cell*[*0*]*->is_locally_owned*() *&& facePair.cell*[*1*]* ->is_locally_owned*())* * {* facePair.cell*[*0*]*->get_dof_indices*(*localDOFIndicesPlus*)*; facePair.cell*[*1*]*->get_dof_indices*(*localDOFIndicesMinus*)*; *}* *else if **(*facePair.cell*[*0*]*->is_locally_owned*())* * {* facePair.cell*[*0*]*->get_dof_indices*(*localDOFIndicesPlus*)*; *(*facePair.cell*[*0*]*->periodic_neighbor*(*facePair.face_idx*[*0*]))* ->get_dof_indices*(*localDOFIndicesMinus*)*; *}* *else if **(*facePair.cell*[*1*]*->is_locally_owned*())* * {* * (*facePair.cell*[*1*]*->periodic_neighbor*(*facePair.face_idx*[*1*]))* ->get_dof_indices*(*localDOFIndicesPlus*)*; facePair.cell*[*1*]*->get_dof_indices*(*localDOFIndicesMinus*)*; *}* (...) // store plus and minus point of the boundary together with dof if the periodicity of plus and minus point is fulfilled }` Unfortunately, the resulting localDOFIndicesPlus/Minus of type `std::vector *<*dealii::types::global_dof_index*> *localDOFIndicesPlus*(* nDOFsPerCell*)*;` only contain garbage values (very high numbers). My first question would be, is it possible to access the DOF indices of ghost cells, as I did? Is our procedure enough to ensure that the periodic boundary cells of a triangulation owned by one processor are ghost cells of the corresponding triangulation owned by another processor? Thanks in advance for your help. If there are any unclarities in my explanation, feel free to ask. Best, Maurice -- 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/ce15100c-7daa-410b-bc91-6cd0288c9c3an%40googlegroups.com.