template <int structdim, int dim, int spacedim>
const std::unique_ptr<DoFIdentities> &
ensure_existence_and_return_dof_identities(
- const FiniteElement<dim, spacedim> &fe1,
- const FiniteElement<dim, spacedim> &fe2,
- std::unique_ptr<DoFIdentities> & identities,
+ const dealii::hp::FECollection<dim, spacedim> &fes,
+ const unsigned int fe_index_1,
+ const unsigned int fe_index_2,
+ std::unique_ptr<DoFIdentities> & identities,
const unsigned int face_no = numbers::invalid_unsigned_int)
{
Assert(structdim == 2 || face_no == numbers::invalid_unsigned_int,
case 0:
{
identities = std::make_unique<DoFIdentities>(
- fe1.hp_vertex_dof_identities(fe2));
+ fes[fe_index_1].hp_vertex_dof_identities(
+ fes[fe_index_2]));
break;
}
case 1:
{
identities = std::make_unique<DoFIdentities>(
- fe1.hp_line_dof_identities(fe2));
+ fes[fe_index_1].hp_line_dof_identities(
+ fes[fe_index_2]));
break;
}
case 2:
{
identities = std::make_unique<DoFIdentities>(
- fe1.hp_quad_dof_identities(fe2, face_no));
+ fes[fe_index_1].hp_quad_dof_identities(fes[fe_index_2],
+ face_no));
break;
}
// double check whether the newly created entries make
// any sense at all
- for (unsigned int i = 0; i < identities->size(); ++i)
+ for (const auto &identity : *identities)
{
- Assert((*identities)[i].first <
- fe1.template n_dofs_per_object<structdim>(face_no),
+ Assert(identity.first <
+ fes[fe_index_1]
+ .template n_dofs_per_object<structdim>(face_no),
ExcInternalError());
- Assert((*identities)[i].second <
- fe2.template n_dofs_per_object<structdim>(face_no),
+ Assert(identity.second <
+ fes[fe_index_2]
+ .template n_dofs_per_object<structdim>(face_no),
ExcInternalError());
}
}
// table exists
const auto &identities =
*ensure_existence_and_return_dof_identities<0>(
- dof_handler.get_fe(most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
vertex_dof_identities[most_dominating_fe_index]
[other_fe_index]);
const auto &identities =
*ensure_existence_and_return_dof_identities<1>(
- dof_handler.get_fe(fe_index_1),
- dof_handler.get_fe(fe_index_2),
+ dof_handler.get_fe_collection(),
+ fe_index_1,
+ fe_index_2,
line_dof_identities[fe_index_1][fe_index_2]);
// see if these sets of dofs are identical. the
// first condition for this is that indeed there are
{
const auto &identities =
*ensure_existence_and_return_dof_identities<
- 1>(dof_handler.get_fe(
- most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ 1>(dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
line_dof_identities
[most_dominating_fe_index]
[other_fe_index]);
{
const auto &identities =
*ensure_existence_and_return_dof_identities<2>(
- dof_handler.get_fe(most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
quad_dof_identities
[most_dominating_fe_index][other_fe_index]
[cell->quad(q)->reference_cell() ==
// table exists
const auto &identities =
*ensure_existence_and_return_dof_identities<0>(
- dof_handler.get_fe(most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
vertex_dof_identities[most_dominating_fe_index]
[other_fe_index]);
const auto &identities =
*ensure_existence_and_return_dof_identities<1>(
- dof_handler.get_fe(fe_index_1),
- dof_handler.get_fe(fe_index_2),
+ dof_handler.get_fe_collection(),
+ fe_index_1,
+ fe_index_2,
line_dof_identities[fe_index_1][fe_index_2]);
// see if these sets of dofs are identical. the
// first condition for this is that indeed there are
{
const auto &identities =
*ensure_existence_and_return_dof_identities<
- 1>(dof_handler.get_fe(
- most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ 1>(dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
line_dof_identities
[most_dominating_fe_index]
[other_fe_index]);
{
const auto &identities =
*ensure_existence_and_return_dof_identities<2>(
- dof_handler.get_fe(most_dominating_fe_index),
- dof_handler.get_fe(other_fe_index),
+ dof_handler.get_fe_collection(),
+ most_dominating_fe_index,
+ other_fe_index,
quad_dof_identities
[most_dominating_fe_index][other_fe_index]
[cell->quad(q)->reference_cell() ==