(void)dof_no;
(void)first_selected_component;
+ Assert(
+ this->data->dofs_per_component_on_cell > 0,
+ ExcMessage(
+ "There is nothing useful you can do with an FEEvaluation object with "
+ "FE_Nothing, i.e., without DoFs! If you have passed to "
+ "MatrixFree::reinit() a collection of finite elements also containing "
+ "FE_Nothing, please check - before creating FEEvaluation - the category "
+ "of the current range by calling either "
+ "MatrixFree::get_cell_range_category(range) or "
+ "MatrixFree::get_face_range_category(range). The returned category "
+ "is the index of the active FE, which you can use to exclude "
+ "FE_Nothing."));
+
# ifdef DEBUG
// print error message when the dimensions do not match. Propose a possible
// fix
get_face_quadrature(const unsigned int quad_index = 0,
const unsigned int hp_active_fe_index = 0) const;
+ /**
+ * Return the category the current batch range of cells was assigned to.
+ * Categories run between the given values in the field
+ * AdditionalData::cell_vectorization_category for non-hp-DoFHandler types
+ * and return the active FE index in the hp-adaptive case.
+ */
+ unsigned int
+ get_cell_range_category(
+ const std::pair<unsigned int, unsigned int> cell_batch_range) const;
+
+ /**
+ * Return the category of the cells on the two sides of the current batch
+ * range of faces.
+ */
+ std::pair<unsigned int, unsigned int>
+ get_face_range_category(
+ const std::pair<unsigned int, unsigned int> face_batch_range) const;
+
/**
* Return the category the current batch of cells was assigned to. Categories
* run between the given values in the field
get_cell_category(const unsigned int cell_batch_index) const;
/**
- * Return the category on the cells on the two sides of the current batch of
+ * Return the category of the cells on the two sides of the current batch of
* faces.
*/
std::pair<unsigned int, unsigned int>
+template <int dim, typename Number, typename VectorizedArrayType>
+inline unsigned int
+MatrixFree<dim, Number, VectorizedArrayType>::get_cell_range_category(
+ const std::pair<unsigned int, unsigned int> range) const
+{
+ const auto result = get_cell_category(range.first);
+
+# ifdef DEBUG
+ for (unsigned int i = range.first; i < range.second; ++i)
+ Assert(result == get_cell_category(i),
+ ExcMessage(
+ "The cell batches of the range have different categories!"));
+# endif
+
+ return result;
+}
+
+
+
+template <int dim, typename Number, typename VectorizedArrayType>
+inline std::pair<unsigned int, unsigned int>
+MatrixFree<dim, Number, VectorizedArrayType>::get_face_range_category(
+ const std::pair<unsigned int, unsigned int> range) const
+{
+ const auto result = get_face_category(range.first);
+
+# ifdef DEBUG
+ for (unsigned int i = range.first; i < range.second; ++i)
+ Assert(result == get_face_category(i),
+ ExcMessage(
+ "The face batches of the range have different categories!"));
+# endif
+
+ return result;
+}
+
+
+
template <int dim, typename Number, typename VectorizedArrayType>
inline unsigned int
MatrixFree<dim, Number, VectorizedArrayType>::get_cell_category(