#include <deal.II/base/index_set.h>
#include <deal.II/base/iterator_range.h>
#include <deal.II/base/smartpointer.h>
+#include <deal.II/base/types.h>
#include <deal.II/dofs/block_info.h>
#include <deal.II/dofs/dof_accessor.h>
/**
* The type in which we store the active FE index.
+ *
+ * @deprecated Use types::fe_index instead.
*/
- using active_fe_index_type = unsigned short int;
+ using active_fe_index_type DEAL_II_DEPRECATED = types::fe_index;
/**
* The type in which we store the offsets in the CRS data structures.
* Invalid active FE index which will be used as a default value to determine
* whether a future FE index has been set or not.
*/
- static const active_fe_index_type invalid_active_fe_index =
- static_cast<active_fe_index_type>(-1);
+ static const types::fe_index invalid_active_fe_index =
+ static_cast<types::fe_index>(-1);
/**
* Standard constructor, not initializing any data. After constructing an
* of the appropriate position of a cell in the vectors is done via
* hp_object_fe_ptr (CRS scheme).
*/
- mutable std::array<std::vector<active_fe_index_type>, dim + 1>
+ mutable std::array<std::vector<types::fe_index>, dim + 1>
hp_object_fe_indices;
/**
* Active FE index of an active cell (identified by level and level index).
* This vector is only used in hp-mode.
*/
- mutable std::vector<std::vector<active_fe_index_type>>
- hp_cell_active_fe_indices;
+ mutable std::vector<std::vector<types::fe_index>> hp_cell_active_fe_indices;
/**
* Future FE index of an active cell (identified by level and level index).
* This vector is only used in hp-mode.
*/
- mutable std::vector<std::vector<active_fe_index_type>>
- hp_cell_future_fe_indices;
+ mutable std::vector<std::vector<types::fe_index>> hp_cell_future_fe_indices;
/**
* An array to store the indices for level degrees of freedom located at
template <int dim, int spacedim>
-const typename DoFHandler<dim, spacedim>::active_fe_index_type
- DoFHandler<dim, spacedim>::invalid_active_fe_index;
+const types::fe_index DoFHandler<dim, spacedim>::invalid_active_fe_index;
namespace internal
dof_handler.hp_capability_enabled == true,
(typename DoFHandler<dim, spacedim>::ExcOnlyAvailableWithHP()));
- using active_fe_index_type =
- typename dealii::DoFHandler<dim, spacedim>::active_fe_index_type;
-
if (const dealii::parallel::shared::Triangulation<dim, spacedim> *tr =
dynamic_cast<
const dealii::parallel::shared::Triangulation<dim, spacedim>
// on the other cells to zero. then we add all of these vectors
// up, and because every vector entry has exactly one processor
// that owns it, the sum is correct
- std::vector<active_fe_index_type> active_fe_indices(
+ std::vector<types::fe_index> active_fe_indices(
tr->n_active_cells(), 0u);
for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->is_locally_owned())
// to have functions that can pack and unpack the data we want to
// transport -- namely, the single unsigned int active_fe_index
// objects
- auto pack =
- [](const typename dealii::DoFHandler<dim, spacedim>::
- active_cell_iterator &cell) -> active_fe_index_type {
+ auto pack = [](const typename dealii::DoFHandler<dim, spacedim>::
+ active_cell_iterator &cell) -> types::fe_index {
return cell->active_fe_index();
};
- auto unpack =
- [&dof_handler](
- const typename dealii::DoFHandler<dim, spacedim>::
- active_cell_iterator & cell,
- const active_fe_index_type active_fe_index) -> void {
+ auto unpack = [&dof_handler](
+ const typename dealii::DoFHandler<dim, spacedim>::
+ active_cell_iterator &cell,
+ const types::fe_index active_fe_index) -> void {
// we would like to say
// cell->set_active_fe_index(active_fe_index);
// but this is not allowed on cells that are not
};
GridTools::exchange_cell_data_to_ghosts<
- active_fe_index_type,
+ types::fe_index,
dealii::DoFHandler<dim, spacedim>>(dof_handler, pack, unpack);
}
else
dof_handler.hp_capability_enabled == true,
(typename DoFHandler<dim, spacedim>::ExcOnlyAvailableWithHP()));
- using active_fe_index_type =
- typename dealii::DoFHandler<dim, spacedim>::active_fe_index_type;
-
if (const dealii::parallel::shared::Triangulation<dim, spacedim> *tr =
dynamic_cast<
const dealii::parallel::shared::Triangulation<dim, spacedim>
*>(&dof_handler.get_triangulation()))
{
- std::vector<active_fe_index_type> future_fe_indices(
+ std::vector<types::fe_index> future_fe_indices(
tr->n_active_cells(), 0u);
for (const auto &cell : dof_handler.active_cell_iterators() |
IteratorFilters::LocallyOwnedCell())
DistributedTriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation()))
{
- auto pack =
- [&dof_handler](
- const typename dealii::DoFHandler<dim, spacedim>::
- active_cell_iterator &cell) -> active_fe_index_type {
+ auto pack = [&dof_handler](
+ const typename dealii::DoFHandler<dim, spacedim>::
+ active_cell_iterator &cell) -> types::fe_index {
return dof_handler
.hp_cell_future_fe_indices[cell->level()][cell->index()];
};
- auto unpack =
- [&dof_handler](
- const typename dealii::DoFHandler<dim, spacedim>::
- active_cell_iterator & cell,
- const active_fe_index_type future_fe_index) -> void {
+ auto unpack = [&dof_handler](
+ const typename dealii::DoFHandler<dim, spacedim>::
+ active_cell_iterator &cell,
+ const types::fe_index future_fe_index) -> void {
dof_handler
.hp_cell_future_fe_indices[cell->level()][cell->index()] =
future_fe_index;
};
GridTools::exchange_cell_data_to_ghosts<
- active_fe_index_type,
+ types::fe_index,
dealii::DoFHandler<dim, spacedim>>(dof_handler, pack, unpack);
}
else