From: Michal Wichrowski Date: Tue, 28 Apr 2020 14:12:01 +0000 (+0200) Subject: Fix FEInterface for MG support X-Git-Tag: v9.2.0-rc1~104^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0261e1d8bbcedd732223edb88b013b2acbdbbbd;p=dealii.git Fix FEInterface for MG support Indetation --- diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index 5231b202b0..78727fb9c3 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -228,6 +228,10 @@ public: /** * Return the set of joint DoF indices. This includes indices from both cells. + * If reinit was called with an active cell iterator, the indices are based + * on the active indices (returned by `DoFCellAccessor::get_dof_indices()` ), + * in case of level cell (that is, if is_level_cell() return true ) + * the mg dof indices are returned. * * @note This function is only available after a call to reinit() and can change * from one call to reinit() to the next. @@ -542,10 +546,12 @@ FEInterfaceValues::reinit( // Get dof indices first: std::vector v( fe_face_values->get_fe().n_dofs_per_cell()); - cell->get_dof_indices(v); + cell->get_active_or_mg_dof_indices(v); std::vector v2( fe_face_values_neighbor->get_fe().n_dofs_per_cell()); - cell_neighbor->get_dof_indices(v2); + cell_neighbor->get_active_or_mg_dof_indices(v2); + + // Fill a map from the global dof index to the left and right // local index. @@ -594,7 +600,7 @@ FEInterfaceValues::reinit(const CellIteratorType &cell, fe_face_values_neighbor = nullptr; interface_dof_indices.resize(fe_face_values->get_fe().n_dofs_per_cell()); - cell->get_dof_indices(interface_dof_indices); + cell->get_active_or_mg_dof_indices(interface_dof_indices); dofmap.resize(interface_dof_indices.size());