From: Martin Kronbichler Date: Thu, 9 Jun 2022 14:16:44 +0000 (+0200) Subject: Do not run orientation functions for standard orientation X-Git-Tag: v9.5.0-rc1~1165^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6984abbc9e6145e654731cfc0b1e25057c9fd39;p=dealii.git Do not run orientation functions for standard orientation --- diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 799ba043eb..7bf28b8ab8 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -1047,16 +1047,28 @@ namespace internal // correct (face/cell-local) ordering. if ((structdim == 2 || structdim == 3) && fe.n_dofs_per_line() > 0) for (const auto line : accessor.line_indices()) - dof_operation.process_dofs( - *accessor.line(line), - [&](const auto d) { - return fe.adjust_line_dof_index_for_line_orientation( - d, accessor.line_orientation(line)); - }, - index, - dof_indices, - fe_index, - dof_processor); + { + const bool line_orientation = accessor.line_orientation(line); + if (line_orientation) + dof_operation.process_dofs( + *accessor.line(line), + [](const auto d) { return d; }, + index, + dof_indices, + fe_index, + dof_processor); + else + dof_operation.process_dofs( + *accessor.line(line), + [&fe, &line_orientation](const auto d) { + return fe.adjust_line_dof_index_for_line_orientation( + d, line_orientation); + }, + index, + dof_indices, + fe_index, + dof_processor); + } // 3) copy dof numbers from the FACE. for faces with the wrong // orientation, we have already made sure that we're ok by picking the @@ -1068,20 +1080,33 @@ namespace internal // or face_orientation is non-standard if (structdim == 3 && fe.max_dofs_per_quad() > 0) for (const auto quad : accessor.face_indices()) - dof_operation.process_dofs( - *accessor.quad(quad), - [&](const auto d) { - return fe.adjust_quad_dof_index_for_face_orientation( - d, - quad, - accessor.face_orientation(quad), - accessor.face_flip(quad), - accessor.face_rotation(quad)); - }, - index, - dof_indices, - fe_index, - dof_processor); + { + const unsigned int raw_orientation = TriaAccessorImplementation:: + Implementation::face_orientation_raw(accessor, quad); + if (raw_orientation == 1) + dof_operation.process_dofs( + *accessor.quad(quad), + [](const auto d) { return d; }, + index, + dof_indices, + fe_index, + dof_processor); + else + dof_operation.process_dofs( + *accessor.quad(quad), + [&](const auto d) { + return fe.adjust_quad_dof_index_for_face_orientation( + d, + quad, + accessor.face_orientation(quad), + accessor.face_flip(quad), + accessor.face_rotation(quad)); + }, + index, + dof_indices, + fe_index, + dof_processor); + } // 4) INNER dofs if (fe.template n_dofs_per_object() > 0)