From: Martin Kronbichler Date: Wed, 29 Jun 2022 07:48:01 +0000 (+0200) Subject: Add assertions for fe_index in MG case X-Git-Tag: v9.5.0-rc1~1133^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d99dd68a056082f9fba97e17c43db7a73315362;p=dealii.git Add assertions for fe_index in MG case --- diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index fdbb395ddf..982da7e0a0 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -997,11 +997,15 @@ namespace internal const dealii::DoFAccessor & accessor, const DoFIndicesType &const_dof_indices, - const unsigned int fe_index, + const unsigned int fe_index_, const DoFOperation & dof_operation, const DoFProcessor & dof_processor, const bool count_level_dofs) { + const unsigned int fe_index = + internal::DoFAccessorImplementation::get_fe_index_or_default( + accessor, fe_index_); + // we cannot rely on the template parameter level_dof_access here, since // the function get_mg_dof_indices()/set_mg_dof_indices() can be called // even if level_dof_access==false. @@ -1337,6 +1341,8 @@ namespace internal std::vector &dof_indices, const unsigned int fe_index) { + Assert((fe_index == DoFHandler::default_fe_index), + ExcMessage("MG DoF indices cannot be queried in hp case")); process_dof_indices( accessor, dof_indices, @@ -1357,6 +1363,9 @@ namespace internal const std::vector &dof_indices, const unsigned int fe_index) { + Assert((fe_index == DoFHandler::default_fe_index), + ExcMessage("MG DoF indices cannot be queried in hp case")); + // Note: this function is as general as `get_mg_dof_indices()`. This // assert is placed here since it is currently only used by the // function DoFCellAccessor::set_mg_dof_indices(), which is called by