From: Tileuzhan Mukhamet Date: Mon, 9 Dec 2024 11:50:27 +0000 (+0100) Subject: Periodicity constraints: skip artificial cell face dofs X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=955c7def9130aa8043e3e6f98e0515403027ba74;p=dealii.git Periodicity constraints: skip artificial cell face dofs --- diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 4bc29db45a..b341f166b7 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -3146,6 +3146,17 @@ namespace DoFTools const unsigned int dofs_per_face = face_1->get_fe(face_1->nth_active_fe_index(0)) .n_dofs_per_face(face_no); + + // Skip further recursion if face_1 carries invalid dof indices, + // i.e., it is on an artificial cell. + std::vector dofs_1(dofs_per_face); + face_1->get_dof_indices(dofs_1, face_1->nth_active_fe_index(0)); + for (unsigned int i = 0; i < dofs_per_face; ++i) + if (dofs_1[i] == numbers::invalid_dof_index) + { + return; + } + FullMatrix child_transformation(dofs_per_face, dofs_per_face); FullMatrix subface_interpolation(dofs_per_face, dofs_per_face);