const std::vector<bool> & r_i_a_f,
const std::vector<ComponentMask> &nonzero_c)
: FiniteElementData<dim>(fe_data)
- , adjust_line_dof_index_for_line_orientation_table(
- dim == 3 ? this->n_dofs_per_line() : 0)
+ , adjust_line_dof_index_for_line_orientation_table(this->n_dofs_per_line())
, system_to_base_table(this->n_dofs_per_cell())
, component_to_base_table(this->components,
std::make_pair(std::make_pair(0U, 0U), 0U))
AssertIndexRange(face, this->reference_cell().n_faces());
// TODO: we could presumably solve the 3d case below using the
- // adjust_quad_dof_index_for_face_orientation_table field. for the
- // 2d case, we can't use adjust_line_dof_index_for_line_orientation_table
- // since that array is empty (presumably because we thought that
- // there are no flipped edges in 2d, but these can happen in
- // DoFTools::make_periodicity_constraints, for example). so we
- // would need to either fill this field, or rely on derived classes
+ // adjust_quad_dof_index_for_face_orientation_table field. For the 2d case, we
+ // can't use adjust_line_dof_index_for_line_orientation_table since that array
+ // is not populated for elements with quadrilateral reference cells
+ // (presumably because we thought that there are no flipped edges in 2d, but
+ // these can happen in DoFTools::make_periodicity_constraints(), for example).
+ // so we would need to either fill this field, or rely on derived classes
// implementing this function, as we currently do
// see the function's documentation for an explanation of this
const unsigned int index,
const bool line_orientation) const
{
- // general template for 1d and 2d: do
- // nothing. Do not throw an Assertion,
- // however, in order to allow to call this
- // function in 2d as well
- if (dim < 3)
+ // We orient quads (and 1D meshes are always oriented) so always skip those
+ // cases
+ //
+ // TODO - we may want to change this in the future: see also the notes in
+ // face_to_cell_index()
+ if (this->reference_cell() == ReferenceCells::Line ||
+ this->reference_cell() == ReferenceCells::Quadrilateral)
return index;
AssertIndexRange(index, this->n_dofs_per_line());