inline
unsigned int
- DoFInfo::row_length_indices (const unsigned int row) const
- {
- AssertIndexRange (row, row_starts.size()-1);
- return (row_starts[row+1][0] - row_starts[row][0]);
- }
-
-
-
- inline
- const std::pair<unsigned short,unsigned short> *
- DoFInfo::begin_indicators (const unsigned int row) const
- {
- AssertIndexRange (row, row_starts.size()-1);
- const unsigned int index = row_starts[row][1];
- AssertIndexRange (index, constraint_indicator.size()+1);
- return constraint_indicator.empty() ?
- nullptr :
- constraint_indicator.data()+index;
- }
-
-
-
- inline
- const std::pair<unsigned short,unsigned short> *
- DoFInfo::end_indicators (const unsigned int row) const
- {
- AssertIndexRange (row, row_starts.size()-1);
- const unsigned int index = row_starts[row+1][1];
- AssertIndexRange (index, constraint_indicator.size()+1);
- return constraint_indicator.empty() ?
- nullptr :
- constraint_indicator.data()+index;
- }
-
-
-
- inline
- unsigned int
- DoFInfo::row_length_indicators (const unsigned int row) const
- {
- AssertIndexRange (row, row_starts.size()-1);
- return (row_starts[row+1][1] - row_starts[row][1]);
- }
-
-
-
- inline
- const unsigned int *
- DoFInfo::begin_indices_plain (const unsigned int row) const
- {
- // if we have no constraints, should take the data from dof_indices
- if (row_length_indicators(row) == 0)
- {
- Assert (row_starts_plain_indices[row]==numbers::invalid_unsigned_int,
- ExcInternalError());
- return begin_indices(row);
- }
- else
- {
- AssertDimension (row_starts.size(), row_starts_plain_indices.size());
- const unsigned int index = row_starts_plain_indices[row];
- AssertIndexRange(index, plain_dof_indices.size()+1);
- return plain_dof_indices.empty() ?
- nullptr :
- plain_dof_indices.data()+index;
- }
- }
-
-
-
- inline
- const unsigned int *
- DoFInfo::end_indices_plain (const unsigned int row) const
- {
- return begin_indices_plain(row) +
- dofs_per_cell[(cell_active_fe_index.size()==0)?
- 0:cell_active_fe_index[row]];
- }
-
-
-
- inline
- unsigned int
- DoFInfo::fe_index_from_degree (const unsigned int fe_degree) const
+ DoFInfo::fe_index_from_degree (const unsigned int first_selected_component,
+ const unsigned int fe_degree) const
{
const unsigned int n_indices = fe_index_conversion.size();
+ if (n_indices <= 1)
+ return 0;
for (unsigned int i=0; i<n_indices; ++i)
- if (fe_index_conversion[i].first == fe_degree)
- return i;
- return n_indices;
- }
-
-
-
- inline
- unsigned int
- DoFInfo::fe_index_from_dofs_per_cell (const unsigned int dofs_per_cell) const
- {
- for (unsigned int i=0; i<fe_index_conversion.size(); ++i)
- if (fe_index_conversion[i].second == dofs_per_cell)
+ if (fe_index_conversion[i][first_selected_component] == fe_degree)
return i;
- return 0;
+ return numbers::invalid_unsigned_int;
}
+#endif // ifndef DOXYGEN
+
} // end of namespace MatrixFreeFunctions
} // end of namespace internal