void
get_dof_indices(
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Return the global multilevel indices of the degrees of freedom that live
get_mg_dof_indices(
const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Set the level DoF indices that are returned by get_mg_dof_indices.
*/
void
- set_mg_dof_indices(const int level,
- const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = numbers::invalid_fe_index);
+ set_mg_dof_indices(
+ const int level,
+ const std::vector<types::global_dof_index> &dof_indices,
+ const types::fe_index fe_index = numbers::invalid_fe_index);
/**
* Global DoF index of the <i>i</i> degree associated with the @p vertexth
*/
types::global_dof_index
vertex_dof_index(
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Return the global DoF index of the <code>i</code>th degree of freedom
*/
types::global_dof_index
mg_vertex_dof_index(
- const int level,
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Index of the <i>i</i>th degree of freedom of this object.
* the face.
*/
types::global_dof_index
- dof_index(const unsigned int i,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ dof_index(const unsigned int i,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Return the dof_index on the given level. Also see dof_index.
* n_active_fe_indices() active finite elements, and this function can be
* queried for their indices.
*/
- unsigned int
+ types::fe_index
nth_active_fe_index(const unsigned int n) const;
/**
* The size of the returned set equals the number of finite elements that
* are active on this object.
*/
- std::set<unsigned int>
+ std::set<types::fe_index>
get_active_fe_indices() const;
/**
* n_active_fe_indices()).
*/
bool
- fe_index_is_active(const unsigned int fe_index) const;
+ fe_index_is_active(const types::fe_index fe_index) const;
/**
* Return a reference to the finite element used on this object with the
* <code>fe_index_is_active(fe_index)</code> must return true.
*/
const FiniteElement<dim, spacedim> &
- get_fe(const unsigned int fe_index) const;
+ get_fe(const types::fe_index fe_index) const;
/**
* @}
* active_fe_index().
*/
void
- set_dof_index(const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ set_dof_index(
+ const unsigned int i,
+ const types::global_dof_index index,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
void
set_mg_dof_index(const int level,
const unsigned int vertex,
const unsigned int i,
const types::global_dof_index index,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
// Iterator classes need to be friends because they need to access
// operator== and operator!=.
void
get_dof_indices(
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = AccessorData::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Return the global multilevel indices of the degrees of freedom that live
get_mg_dof_indices(
const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index = AccessorData::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Global DoF index of the <i>i</i> degree associated with the @p vertexth
*/
types::global_dof_index
vertex_dof_index(
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = AccessorData::invalid_fe_index) const;
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Index of the <i>i</i>th degree of freedom of this object.
* active_fe_index().
*/
types::global_dof_index
- dof_index(const unsigned int i,
- const unsigned int fe_index = AccessorData::invalid_fe_index) const;
+ dof_index(const unsigned int i,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* @}
* calculated, this method just raises an exception and only exists to
* enable dimension-independent programming.
*/
- unsigned int
+ types::fe_index
nth_active_fe_index(const unsigned int n) const;
/**
* enable dimension-independent programming.
*/
bool
- fe_index_is_active(const unsigned int fe_index) const;
+ fe_index_is_active(const types::fe_index fe_index) const;
/**
* Return a reference to the finite element used on this object with the
* <code>fe_index_is_active(fe_index)</code> must return true.
*/
const FiniteElement<1, spacedim> &
- get_fe(const unsigned int fe_index) const;
+ get_fe(const types::fe_index fe_index) const;
/**
* @}
set_dof_index(
const unsigned int i,
const types::global_dof_index index,
- const unsigned int fe_index = AccessorData::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
// Iterator classes need to be friends because they need to access
// operator== and operator!=.
* all other functions in this class this function only throws an exception.
*/
types::global_dof_index
- dof_index(const unsigned int i,
- const unsigned int fe_index =
+ dof_index(const unsigned int i,
+ const types::fe_index fe_index =
DoFHandler<dim, spacedim>::default_fe_index) const;
/**
* all other functions in this class this function only throws an exception.
*/
void
- set_dof_index(const unsigned int i,
- const types::global_dof_index index,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ set_dof_index(
+ const unsigned int i,
+ const types::global_dof_index index,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
};
template <class InputVector, typename number>
void
get_interpolated_dof_values(
- const InputVector &values,
- Vector<number> & interpolated_values,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const InputVector & values,
+ Vector<number> & interpolated_values,
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* This function is the counterpart to get_interpolated_dof_values(): you
set_dof_values_by_interpolation(
const Vector<number> &local_values,
OutputVector & values,
- const unsigned int fe_index = numbers::invalid_fe_index,
+ const types::fe_index fe_index = numbers::invalid_fe_index,
const bool perform_check = false) const;
/**
distribute_local_to_global_by_interpolation(
const Vector<number> &local_values,
OutputVector & values,
- const unsigned int fe_index = numbers::invalid_fe_index) const;
+ const types::fe_index fe_index = numbers::invalid_fe_index) const;
/**
* Distribute a local (cell based) vector to a global one by mapping the
* this cell as a ghost cell. See the documentation of DoFHandler for more
* information.
*/
- unsigned int
+ types::fe_index
active_fe_index() const;
/**
* information.
*/
void
- set_active_fe_index(const unsigned int i) const;
+ set_active_fe_index(const types::fe_index i) const;
/**
* @}
*/
* parallel::shared::Triangulation or parallel::distributed::Triangulation
* classes, it is only allowed to call this function on locally owned cells.
*/
- unsigned int
+ types::fe_index
future_fe_index() const;
/**
* functionality.
*/
void
- set_future_fe_index(const unsigned int i) const;
+ set_future_fe_index(const types::fe_index i) const;
/**
* Return whether a future finite element has been set.
* numbers::invalid_fe_index to a right value if needed/possible.
*/
template <int structdim, int dim, int spacedim, bool level_dof_access>
- unsigned int
+ types::fe_index
get_fe_index_or_default(
const DoFAccessor<structdim, dim, spacedim, level_dof_access> &cell,
- const unsigned int fe_index)
+ const types::fe_index fe_index)
{
if (cell.get_dof_handler().has_hp_capabilities() == false)
{
process_dof_index(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const unsigned int local_index,
const std::integral_constant<int, structdim> &,
GlobalIndexType & global_index,
"You are requesting an active FE index that is not assigned "
"to any of the cells connected to this entity."));
- const unsigned int fe_index_ =
+ const types::fe_index fe_index_ =
std::distance(dof_handler.hp_object_fe_indices[structdim].begin() +
dof_handler.hp_object_fe_ptr[structdim][obj_index],
ptr);
process_object_range(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const std::integral_constant<int, structdim> &)
{
Assert(structdim == dim || obj_level == 0, ExcNotImplemented());
dof_handler.hp_object_fe_ptr[structdim][obj_index + 1],
ExcNotImplemented());
- const unsigned int fe_index_local =
+ const types::fe_index fe_index_local =
std::distance(dof_handler.hp_object_fe_indices[structdim].begin() +
dof_handler.hp_object_fe_ptr[structdim][obj_index],
fe_index_local_ptr);
static std::pair<unsigned int, unsigned int>
process_object_range(
const dealii::DoFAccessor<structdim, dim, spacedim, level_dof_access>
- accessor,
- const unsigned int fe_index)
+ accessor,
+ const types::fe_index fe_index)
{
return process_object_range(accessor.get_dof_handler(),
accessor.level(),
process_object(const DoFHandler<dim, spacedim> & dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const DoFMapping & mapping,
const std::integral_constant<int, structdim> &dd,
types::global_dof_index *&dof_indices_ptr,
set_dof_index(const DoFHandler<dim, spacedim> & dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const unsigned int local_index,
const std::integral_constant<int, structdim> &dd,
const types::global_dof_index global_index)
get_dof_index(const DoFHandler<dim, spacedim> & dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const unsigned int local_index,
const std::integral_constant<int, structdim> &dd)
{
* get a DoF index on a vertex of the indicated cell.
*/
template <int dim, int spacedim, int structdim>
- static unsigned int
+ static types::fe_index
nth_active_fe_index(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
* get a DoF index on a vertex of the indicated cell.
*/
template <int dim, int spacedim, int structdim>
- static std::set<unsigned int>
+ static std::set<types::fe_index>
get_active_fe_indices(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
return {dof_handler.hp_cell_active_fe_indices[obj_level][obj_index]};
// 3) general entity and hp is used
- std::set<unsigned int> active_fe_indices;
+ std::set<types::fe_index> active_fe_indices;
for (unsigned int i = 0;
i < n_active_fe_indices(dof_handler, obj_level, obj_index, t);
++i)
fe_index_is_active(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const std::integral_constant<int, structdim> &)
{
Assert(structdim == dim || obj_level == 0, ExcNotImplemented());
static unsigned int
n_dof_indices(
const dealii::DoFAccessor<structdim, dim, spacedim, level_dof_access>
- & accessor,
- const unsigned int fe_index_,
- const bool count_level_dofs)
+ & accessor,
+ const types::fe_index fe_index_,
+ const bool count_level_dofs)
{
// note: we cannot rely on the template parameter level_dof_access here,
// since the function get_mg_dof_indices()/set_mg_dof_indices() can be
const dealii::DoFAccessor<structdim, dim, spacedim, level_dof_access>
& accessor,
const DoFIndicesType &const_dof_indices,
- const unsigned int fe_index_,
+ const types::fe_index fe_index_,
const DoFOperation & dof_operation,
const DoFProcessor & dof_processor,
const bool count_level_dofs)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(
accessor, fe_index_);
DEAL_II_ALWAYS_INLINE void
process_vertex_dofs(DoFHandler<dim, spacedim> &dof_handler,
const unsigned int vertex_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
types::global_dof_index *& dof_indices_ptr,
const DoFProcessor & dof_processor) const
{
process_dofs(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int obj_level,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const DoFMapping & mapping,
const std::integral_constant<int, structdim>,
types::global_dof_index *&dof_indices_ptr,
DEAL_II_ALWAYS_INLINE void
process_vertex_dofs(DoFHandler<dim, spacedim> &dof_handler,
const unsigned int vertex_index,
- const unsigned int,
+ const types::fe_index,
types::global_dof_index *&dof_indices_ptr,
const DoFProcessor & dof_processor) const
{
DEAL_II_ALWAYS_INLINE void
process_dofs(const DoFHandler<dim, spacedim> &dof_handler,
const unsigned int,
- const unsigned int obj_index,
- const unsigned int fe_index,
- const DoFMapping & mapping,
+ const unsigned int obj_index,
+ const types::fe_index fe_index,
+ const DoFMapping & mapping,
const std::integral_constant<int, structdim>,
types::global_dof_index *&dof_indices_ptr,
const DoFProcessor & dof_processor) const
const dealii::DoFAccessor<structdim, dim, spacedim, level_dof_access>
& accessor,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ const types::fe_index fe_index)
{
process_dof_indices(
accessor,
const dealii::DoFAccessor<structdim, dim, spacedim, level_dof_access>
& accessor,
const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ const types::fe_index fe_index)
{
// Note: this function is as general as `get_dof_indices()`. This
// assert is placed here since it is currently only used by the
& accessor,
const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ const types::fe_index fe_index)
{
Assert((fe_index == DoFHandler<dim, spacedim>::default_fe_index),
ExcMessage("MG DoF indices cannot be queried in hp case"));
& accessor,
const int level,
const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index)
+ const types::fe_index fe_index)
{
Assert((fe_index == DoFHandler<dim, spacedim>::default_fe_index),
ExcMessage("MG DoF indices cannot be queried in hp case"));
&mg_level,
const std::unique_ptr<internal::DoFHandlerImplementation::DoFFaces<dim>>
&,
- const unsigned int obj_index,
- const unsigned int fe_index,
- const unsigned int local_index,
+ const unsigned int obj_index,
+ const types::fe_index fe_index,
+ const unsigned int local_index,
const std::integral_constant<int, dim>)
{
Assert(dof_handler.hp_capability_enabled == false,
const std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<dim>>
&,
const std::unique_ptr<internal::DoFHandlerImplementation::DoFFaces<dim>>
- & mg_faces,
- const unsigned int obj_index,
- const unsigned int fe_index,
- const unsigned int local_index,
+ & mg_faces,
+ const unsigned int obj_index,
+ const types::fe_index fe_index,
+ const unsigned int local_index,
const std::integral_constant<int, 1>)
{
return mg_faces->lines.access_dof_index(
const std::unique_ptr<internal::DoFHandlerImplementation::DoFLevel<3>>
&,
const std::unique_ptr<internal::DoFHandlerImplementation::DoFFaces<3>>
- & mg_faces,
- const unsigned int obj_index,
- const unsigned int fe_index,
- const unsigned int local_index,
+ & mg_faces,
+ const unsigned int obj_index,
+ const types::fe_index fe_index,
+ const unsigned int local_index,
const std::integral_constant<int, 2>)
{
Assert(dof_handler.hp_capability_enabled == false,
template <int structdim, int dim, int spacedim, bool level_dof_access>
inline types::global_dof_index
DoFAccessor<structdim, dim, spacedim, level_dof_access>::dof_index(
- const unsigned int i,
- const unsigned int fe_index_) const
+ const unsigned int i,
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
DoFAccessor<structdim, dim, spacedim, level_dof_access>::set_dof_index(
const unsigned int i,
const types::global_dof_index index,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
template <int structdim, int dim, int spacedim, bool level_dof_access>
-inline unsigned int
+inline types::fe_index
DoFAccessor<structdim, dim, spacedim, level_dof_access>::nth_active_fe_index(
const unsigned int n) const
{
template <int structdim, int dim, int spacedim, bool level_dof_access>
-inline std::set<unsigned int>
+inline std::set<types::fe_index>
DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_active_fe_indices()
const
{
- std::set<unsigned int> active_fe_indices;
+ std::set<types::fe_index> active_fe_indices;
for (unsigned int i = 0; i < n_active_fe_indices(); ++i)
active_fe_indices.insert(nth_active_fe_index(i));
return active_fe_indices;
template <int structdim, int dim, int spacedim, bool level_dof_access>
inline bool
DoFAccessor<structdim, dim, spacedim, level_dof_access>::fe_index_is_active(
- const unsigned int fe_index) const
+ const types::fe_index fe_index) const
{
// access the respective DoF
return dealii::internal::DoFAccessorImplementation::Implementation::
template <int structdim, int dim, int spacedim, bool level_dof_access>
inline types::global_dof_index
DoFAccessor<structdim, dim, spacedim, level_dof_access>::vertex_dof_index(
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index_) const
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index_) const
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
(((this->dof_handler->hp_capability_enabled == false) &&
(fe_index_ == numbers::invalid_fe_index)) ?
// No hp enabled, and the argument is at its default value -> we
template <int structdim, int dim, int spacedim, bool level_dof_access>
inline types::global_dof_index
DoFAccessor<structdim, dim, spacedim, level_dof_access>::mg_vertex_dof_index(
- const int level,
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index_) const
+ const int level,
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
const unsigned int vertex,
const unsigned int i,
const types::global_dof_index index,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
template <int structdim, int dim, int spacedim, bool level_dof_access>
inline const FiniteElement<dim, spacedim> &
DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_fe(
- const unsigned int fe_index) const
+ const types::fe_index fe_index) const
{
Assert(fe_index_is_active(fe_index) == true,
ExcMessage("This function can only be called for active FE indices"));
DoFAccessor<0, 1, spacedim, level_dof_access>::set_dof_index(
const unsigned int /*i*/,
const types::global_dof_index /*index*/,
- const unsigned int /*fe_index*/) const
+ const types::fe_index /*fe_index*/) const
{
Assert(false, ExcNotImplemented());
}
inline void
DoFAccessor<0, 1, spacedim, level_dof_access>::get_dof_indices(
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
DoFAccessor<0, 1, spacedim, level_dof_access>::get_mg_dof_indices(
const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
template <int spacedim, bool level_dof_access>
inline types::global_dof_index
DoFAccessor<0, 1, spacedim, level_dof_access>::vertex_dof_index(
- const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index_) const
+ const unsigned int vertex,
+ const unsigned int i,
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
template <int spacedim, bool level_dof_access>
inline types::global_dof_index
DoFAccessor<0, 1, spacedim, level_dof_access>::dof_index(
- const unsigned int i,
- const unsigned int fe_index_) const
+ const unsigned int i,
+ const types::fe_index fe_index_) const
{
const auto fe_index =
internal::DoFAccessorImplementation::get_fe_index_or_default(*this,
template <int spacedim, bool level_dof_access>
-inline unsigned int
+inline types::fe_index
DoFAccessor<0, 1, spacedim, level_dof_access>::nth_active_fe_index(
const unsigned int /*n*/) const
{
template <int spacedim, bool level_dof_access>
inline bool
DoFAccessor<0, 1, spacedim, level_dof_access>::fe_index_is_active(
- const unsigned int /*fe_index*/) const
+ const types::fe_index /*fe_index*/) const
{
Assert(false, ExcNotImplemented());
return false;
template <int spacedim, bool level_dof_access>
inline const FiniteElement<1, spacedim> &
DoFAccessor<0, 1, spacedim, level_dof_access>::get_fe(
- const unsigned int fe_index) const
+ const types::fe_index fe_index) const
{
Assert(this->dof_handler != nullptr, ExcInvalidObject());
return dof_handler->get_fe(fe_index);
* do.
*/
template <int dim, int spacedim, bool level_dof_access>
- static unsigned int
+ static types::fe_index
active_fe_index(
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor)
{
static void
set_active_fe_index(
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor,
- const unsigned int i)
+ const types::fe_index i)
{
if (accessor.dof_handler->hp_capability_enabled == false)
{
* do.
*/
template <int dim, int spacedim, bool level_dof_access>
- static unsigned int
+ static types::fe_index
future_fe_index(
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor)
{
static void
set_future_fe_index(
const DoFCellAccessor<dim, spacedim, level_dof_access> &accessor,
- const unsigned int i)
+ const types::fe_index i)
{
if (accessor.dof_handler->hp_capability_enabled == false)
{
template <int dimension_, int space_dimension_, bool level_dof_access>
-inline unsigned int
+inline types::fe_index
DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
active_fe_index() const
{
template <int dimension_, int space_dimension_, bool level_dof_access>
inline void
DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
- set_active_fe_index(const unsigned int i) const
+ set_active_fe_index(const types::fe_index i) const
{
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_active(),
template <int dimension_, int space_dimension_, bool level_dof_access>
-inline unsigned int
+inline types::fe_index
DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
future_fe_index() const
{
template <int dimension_, int space_dimension_, bool level_dof_access>
inline void
DoFCellAccessor<dimension_, space_dimension_, level_dof_access>::
- set_future_fe_index(const unsigned int i) const
+ set_future_fe_index(const types::fe_index i) const
{
Assert((this->dof_handler->hp_capability_enabled == false) ||
(this->has_children() == false),
/**
* The default index of the finite element to be used on a given cell.
*/
- static const unsigned int default_fe_index = 0;
+ static const types::fe_index default_fe_index = 0;
/**
* Invalid index of the finite element to be used on a given cell.
operator=(const DoFHandler &) = delete;
/**
- * Go through the triangulation and set the active FE indices of all
- * locally owned cells to the values given in @p active_fe_indices.
+ * For each locally owned cell, set the active finite element index to the
+ * corresponding value given in @p active_fe_indices. Indices must be in the
+ * order how we iterate over active cells.
+ *
+ * Active FE indices will only be set for locally owned cells. Ghost and
+ * artificial cells will be ignored; no active FE index will be assigned to
+ * them.
+ *
+ * The vector @p active_fe_indices is assumed to have as many entries as
+ * there are active cells.
+ */
+ void
+ set_active_fe_indices(const std::vector<types::fe_index> &active_fe_indices);
+
+ /**
+ * @copydoc set_active_fe_indices()
+ *
+ * @deprecated Use set_active_fe_indices() with the types::fe_index datatype.
*/
+ DEAL_II_DEPRECATED_EARLY
void
set_active_fe_indices(const std::vector<unsigned int> &active_fe_indices);
/**
- * Go through the triangulation and return a vector of active FE indices of
- * all locally relevant cells. Artificial cells will have the value
- * numbers::invalid_fe_index assigned.
+ * For each locally relevant cell, extract the active finite element index and
+ * return them in the order how we iterate over active cells.
+ *
+ * As we do not know the active FE index on artificial cells, they are set to
+ * the invalid value numbers::invalid_fe_index.
+ *
+ * For DoFHandler objects without hp-capabilities, the vector will consist of
+ * zeros, indicating that all cells use the same finite element. In hp-mode,
+ * the values may be different, though.
*/
- std::vector<unsigned int>
+ std::vector<types::fe_index>
get_active_fe_indices() const;
/**
- * Go through the triangulation and store the active FE indices of all
- * locally relevant cells to the vector @p active_fe_indices. This vector
- * is resized, if necessary.
+ * For each locally relevant cell, extract the active finite element index and
+ * fill the vector @p active_fe_indices in the order how we iterate over
+ * active cells. This vector is resized, if necessary.
+ *
+ * As we do not know the active FE index on artificial cells, they are set to
+ * the invalid value numbers::invalid_fe_index.
+ *
+ * For DoFHandler objects without hp-capabilities, the vector will consist of
+ * zeros, indicating that all cells use the same finite element. In hp-mode,
+ * the values may be different, though.
*
- * @deprecated Use the function that returns the result vector.
+ * @deprecated Use get_active_fe_indices() that returns the result vector.
*/
DEAL_II_DEPRECATED_EARLY
void
get_active_fe_indices(std::vector<unsigned int> &active_fe_indices) const;
/**
- * Go through the triangulation and set the future FE indices of all
- * locally owned cells to the values given in @p future_fe_indices.
- * Cells corresponding to numbers::invalid_fe_index will be skipped.
+ * For each locally owned cell, set the future finite element index to the
+ * corresponding value given in @p future_fe_indices. Indices must be in the
+ * order how we iterate over active cells.
+ *
+ * Future FE indices will only be set for locally owned cells. Ghost and
+ * artificial cells will be ignored; no future FE index will be assigned to
+ * them.
+ *
+ * The vector @p future_fe_indices is assumed to have as many entries as
+ * there are active cells.
*/
void
- set_future_fe_indices(const std::vector<unsigned int> &future_fe_indices);
+ set_future_fe_indices(const std::vector<types::fe_index> &future_fe_indices);
/**
- * Go through the triangulation and return a vector of future FE indices of
- * all locally owned cells. If no future FE index has been set on a cell,
- * its value will be numbers::invalid_fe_index.
+ * For each locally owned cell, extract the future finite element index and
+ * return them in the order how we iterate over active cells.
+ *
+ * As we do not know the future FE index on ghost and artificial cells, they
+ * are set to the invalid value numbers::invalid_fe_index. The same applies to
+ * locally owned cells that have no future FE index assigned.
*/
- std::vector<unsigned int>
+ std::vector<types::fe_index>
get_future_fe_indices() const;
/**
* used by this object.
*/
const FiniteElement<dim, spacedim> &
- get_fe(const unsigned int index = 0) const;
+ get_fe(const types::fe_index index = 0) const;
/**
* Return a constant reference to the set of finite element objects that
* Container to temporarily store the iterator and future active FE index
* of cells that persist.
*/
- std::map<const cell_iterator, const unsigned int> persisting_cells_fe_index;
+ std::map<const cell_iterator, const types::fe_index>
+ persisting_cells_fe_index;
/**
* Container to temporarily store the iterator and future active FE index
* of cells that will be refined.
*/
- std::map<const cell_iterator, const unsigned int> refined_cells_fe_index;
+ std::map<const cell_iterator, const types::fe_index> refined_cells_fe_index;
/**
* Container to temporarily store the iterator and future active FE index
* of parent cells that will remain after coarsening.
*/
- std::map<const cell_iterator, const unsigned int> coarsened_cells_fe_index;
+ std::map<const cell_iterator, const types::fe_index>
+ coarsened_cells_fe_index;
/**
* Container to temporarily store the active FE index of every locally
* owned cell for transfer across parallel::distributed::Triangulation
* objects.
*/
- std::vector<unsigned int> active_fe_indices;
+ std::vector<types::fe_index> active_fe_indices;
/**
* Helper object to transfer all active FE indices on
*/
std::unique_ptr<
parallel::distributed::
- CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>
+ CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>
cell_data_transfer;
};
template <int dim, int spacedim>
inline const FiniteElement<dim, spacedim> &
-DoFHandler<dim, spacedim>::get_fe(const unsigned int number) const
+DoFHandler<dim, spacedim>::get_fe(const types::fe_index number) const
{
Assert(fe_collection.size() > 0,
ExcMessage("No finite element collection is associated with "
types::global_dof_index &
access_dof_index(const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const unsigned int local_index);
/**
fe_index_is_active(
const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const types::global_dof_index index,
- const unsigned int fe_index) const;
+ const types::fe_index fe_index) const;
/**
* Determine an estimate for the memory consumption (in bytes) of this
DoFObjects<dim>::fe_index_is_active(
const dealii::DoFHandler<dh_dim, spacedim> &,
const types::global_dof_index,
- const unsigned int fe_index) const
+ const types::fe_index fe_index) const
{
(void)fe_index;
Assert((fe_index ==
DoFObjects<dim>::access_dof_index(
const dealii::DoFHandler<dh_dim, spacedim> &dof_handler,
const unsigned int obj_index,
- const unsigned int fe_index,
+ const types::fe_index fe_index,
const unsigned int local_index)
{
(void)fe_index;
* returned vector will consist of only zeros, indicating that all cells use
* the same finite element. In hp-mode, the values may be different, though.
*
- * @deprecated Use DoFHandler::get_active_fe_indices() instead.
+ * As we do not know the active FE index on artificial cells, we set them to
+ * the invalid value numbers::invalid_fe_index.
+ *
+ * @deprecated Use DoFHandler::get_active_fe_indices() that returns the result
+ * vector.
*/
template <int dim, int spacedim>
DEAL_II_DEPRECATED_EARLY void
loop_over_active_or_level_cells(
dof_handler_fine, mg_level_fine, [&](const auto &cell) {
min_active_fe_indices[0] =
- std::min(min_active_fe_indices[0], cell->active_fe_index());
+ std::min<unsigned int>(min_active_fe_indices[0],
+ cell->active_fe_index());
max_active_fe_indices[0] =
- std::max(max_active_fe_indices[0], cell->active_fe_index());
+ std::max<unsigned int>(max_active_fe_indices[0],
+ cell->active_fe_index());
});
loop_over_active_or_level_cells(
dof_handler_coarse, mg_level_coarse, [&](const auto &cell) {
min_active_fe_indices[1] =
- std::min(min_active_fe_indices[1], cell->active_fe_index());
+ std::min<unsigned int>(min_active_fe_indices[1],
+ cell->active_fe_index());
max_active_fe_indices[1] =
- std::max(max_active_fe_indices[1], cell->active_fe_index());
+ std::max<unsigned int>(max_active_fe_indices[1],
+ cell->active_fe_index());
});
const auto comm = dof_handler_fine.get_communicator();
types::global_dof_index
DoFInvalidAccessor<structdim, dim, spacedim>::dof_index(
const unsigned int,
- const unsigned int) const
+ const types::fe_index) const
{
Assert(false, ExcInternalError());
return 0;
DoFInvalidAccessor<structdim, dim, spacedim>::set_dof_index(
const unsigned int,
const types::global_dof_index,
- const unsigned int) const
+ const types::fe_index) const
{
Assert(false, ExcInternalError());
}
inline void
DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_dof_indices(
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
Assert(this->dof_handler != nullptr, ExcInvalidObject());
DoFAccessor<structdim, dim, spacedim, level_dof_access>::get_mg_dof_indices(
const int level,
std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
Assert(this->dof_handler != nullptr, ExcInvalidObject());
Assert(this->dof_handler->mg_vertex_dofs.size() > 0,
DoFAccessor<structdim, dim, spacedim, level_dof_access>::set_mg_dof_indices(
const int level,
const std::vector<types::global_dof_index> &dof_indices,
- const unsigned int fe_index_)
+ const types::fe_index fe_index_)
{
Assert(this->dof_handler != nullptr, ExcInvalidObject());
template <class InputVector, typename number>
void
DoFCellAccessor<dim, spacedim, lda>::get_interpolated_dof_values(
- const InputVector &values,
- Vector<number> & interpolated_values,
- const unsigned int fe_index_) const
+ const InputVector & values,
+ Vector<number> & interpolated_values,
+ const types::fe_index fe_index_) const
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
(this->dof_handler->hp_capability_enabled == false &&
fe_index_ == numbers::invalid_fe_index) ?
DoFHandler<dim, spacedim>::default_fe_index :
template void DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>::
get_interpolated_dof_values(const VEC &,
Vector<VEC::value_type> &,
- const unsigned int fe_index) const;
+ const types::fe_index) const;
#if deal_II_dimension != 3
DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>::
get_interpolated_dof_values(const VEC &,
Vector<VEC::value_type> &,
- const unsigned int fe_index) const;
+ const types::fe_index) const;
#endif
#if deal_II_dimension == 3
template void DoFCellAccessor<1, 3, lda>::get_interpolated_dof_values(
- const VEC &, Vector<VEC::value_type> &, const unsigned int fe_index)
- const;
+ const VEC &, Vector<VEC::value_type> &, const types::fe_index) const;
#endif
}
const DoFCellAccessor<dim, spacedim, lda> & cell,
const Vector<number> & local_values,
OutputVector & values,
- const unsigned int fe_index_,
+ const types::fe_index fe_index_,
const std::function<void(const DoFCellAccessor<dim, spacedim, lda> &cell,
const Vector<number> &local_values,
OutputVector & values)> &processor)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
(cell.get_dof_handler().has_hp_capabilities() == false &&
fe_index_ == numbers::invalid_fe_index) ?
DoFHandler<dim, spacedim>::default_fe_index :
DoFCellAccessor<dim, spacedim, lda>::set_dof_values_by_interpolation(
const Vector<number> &local_values,
OutputVector & values,
- const unsigned int fe_index_,
+ const types::fe_index fe_index_,
const bool perform_check) const
{
internal::process_by_interpolation<dim, spacedim, lda, OutputVector, number>(
distribute_local_to_global_by_interpolation(
const Vector<number> &local_values,
OutputVector & values,
- const unsigned int fe_index_) const
+ const types::fe_index fe_index_) const
{
internal::process_by_interpolation<dim, spacedim, lda, OutputVector, number>(
*this,
template void DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>::
set_dof_values_by_interpolation(const Vector<VEC::value_type> &,
VEC &,
- const unsigned int fe_index,
+ const types::fe_index,
const bool) const;
template void DoFCellAccessor<deal_II_dimension, deal_II_dimension, lda>::
distribute_local_to_global_by_interpolation(
- const Vector<VEC::value_type> &, VEC &, const unsigned int fe_index)
+ const Vector<VEC::value_type> &, VEC &, const types::fe_index fe_index)
const;
#if deal_II_dimension != 3
DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>::
set_dof_values_by_interpolation(const Vector<VEC::value_type> &,
VEC &,
- const unsigned int fe_index,
+ const types::fe_index,
const bool) const;
template void
DoFCellAccessor<deal_II_dimension, deal_II_dimension + 1, lda>::
distribute_local_to_global_by_interpolation(
- const Vector<VEC::value_type> &, VEC &, const unsigned int fe_index)
+ const Vector<VEC::value_type> &, VEC &, const types::fe_index fe_index)
const;
#endif
#if deal_II_dimension == 3
template void DoFCellAccessor<1, 3, lda>::set_dof_values_by_interpolation(
- const Vector<VEC::value_type> &,
- VEC &,
- const unsigned int fe_index,
- const bool) const;
+ const Vector<VEC::value_type> &, VEC &, const types::fe_index, const bool)
+ const;
template void
DoFCellAccessor<1, 3, lda>::distribute_local_to_global_by_interpolation(
- const Vector<VEC::value_type> &, VEC &, const unsigned int fe_index)
+ const Vector<VEC::value_type> &, VEC &, const types::fe_index fe_index)
const;
#endif
DEAL_II_NAMESPACE_OPEN
template <int dim, int spacedim>
-const unsigned int DoFHandler<dim, spacedim>::default_fe_index;
+const types::fe_index DoFHandler<dim, spacedim>::default_fe_index;
namespace internal
(cell->active_fe_index() ==
cell->neighbor(face)->active_fe_index())))
{
- const unsigned int fe = cell->active_fe_index();
- const unsigned int n_dofs =
+ const types::fe_index fe = cell->active_fe_index();
+ const unsigned int n_dofs =
dof_handler.get_fe(fe)
.template n_dofs_per_object<dim - 1>(face);
const unsigned int offset =
}
else
{
- unsigned int fe_1 = cell->active_fe_index();
- unsigned int face_no_1 = face;
- unsigned int fe_2 =
+ types::fe_index fe_1 = cell->active_fe_index();
+ unsigned int face_no_1 = face;
+ types::fe_index fe_2 =
cell->neighbor(face)->active_fe_index();
unsigned int face_no_2 = cell->neighbor_face_no(face);
dim>::ExcInconsistentCoarseningFlags());
#endif
- const unsigned int fe_index = dealii::internal::hp::
+ const types::fe_index fe_index = dealii::internal::hp::
DoFHandlerImplementation::Implementation::
dominated_future_fe_on_children<dim, spacedim>(
parent);
* one dominated by all children for the parent cell.
*/
template <int dim, int spacedim>
- static unsigned int
+ static types::fe_index
determine_fe_from_children(
const typename Triangulation<dim, spacedim>::cell_iterator &,
- const std::vector<unsigned int> & children_fe_indices,
+ const std::vector<types::fe_index> & children_fe_indices,
const dealii::hp::FECollection<dim, spacedim> &fe_collection)
{
Assert(!children_fe_indices.empty(), ExcInternalError());
// convert vector to set
+ // TODO: Change set to types::fe_index
const std::set<unsigned int> children_fe_indices_set(
children_fe_indices.begin(), children_fe_indices.end());
- const unsigned int dominated_fe_index =
+ const types::fe_index dominated_fe_index =
fe_collection.find_dominated_fe_extended(children_fe_indices_set,
/*codim=*/0);
- Assert(dominated_fe_index != numbers::invalid_unsigned_int,
+ Assert(dominated_fe_index != numbers::invalid_fe_index,
ExcNoDominatedFiniteElementOnChildren());
return dominated_fe_index;
* See documentation in the header file for more information.
*/
template <int dim, int spacedim>
- static unsigned int
+ static types::fe_index
dominated_future_fe_on_children(
const typename DoFHandler<dim, spacedim>::cell_iterator &parent)
{
dof_handler.has_hp_capabilities(),
(typename DoFHandler<dim, spacedim>::ExcOnlyAvailableWithHP()));
+ // TODO: Change set to types::fe_index
std::set<unsigned int> future_fe_indices_children;
for (const auto &child : parent->child_iterators())
{
// here and thus call the internal function that does not check
// for cell ownership. This requires that future FE indices have
// been communicated prior to calling this function.
- const unsigned int future_fe_index_child =
+ const types::fe_index future_fe_index_child =
dealii::internal::DoFCellAccessorImplementation::
Implementation::future_fe_index<dim, spacedim, false>(*child);
}
Assert(!future_fe_indices_children.empty(), ExcInternalError());
- const unsigned int future_fe_index =
+ const types::fe_index future_fe_index =
dof_handler.fe_collection.find_dominated_fe_extended(
future_fe_indices_children,
/*codim=*/0);
- Assert(future_fe_index != numbers::invalid_unsigned_int,
+ Assert(future_fe_index != numbers::invalid_fe_index,
ExcNoDominatedFiniteElementOnChildren());
return future_fe_index;
template <int dim, int spacedim>
void
DoFHandler<dim, spacedim>::set_active_fe_indices(
- const std::vector<unsigned int> &active_fe_indices)
+ const std::vector<types::fe_index> &active_fe_indices)
{
Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
ExcDimensionMismatch(active_fe_indices.size(),
template <int dim, int spacedim>
-std::vector<unsigned int>
+void
+DoFHandler<dim, spacedim>::set_active_fe_indices(
+ const std::vector<unsigned int> &active_fe_indices)
+{
+ set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
+ active_fe_indices.end()));
+}
+
+
+
+template <int dim, int spacedim>
+std::vector<types::fe_index>
DoFHandler<dim, spacedim>::get_active_fe_indices() const
{
- std::vector<unsigned int> active_fe_indices(
+ std::vector<types::fe_index> active_fe_indices(
this->get_triangulation().n_active_cells(), numbers::invalid_fe_index);
// we could try to extract the values directly, since they are
DoFHandler<dim, spacedim>::get_active_fe_indices(
std::vector<unsigned int> &active_fe_indices) const
{
- active_fe_indices = get_active_fe_indices();
+ std::vector<types::fe_index> indices = get_active_fe_indices();
+
+ active_fe_indices.assign(indices.begin(), indices.end());
}
template <int dim, int spacedim>
void
DoFHandler<dim, spacedim>::set_future_fe_indices(
- const std::vector<unsigned int> &future_fe_indices)
+ const std::vector<types::fe_index> &future_fe_indices)
{
Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
ExcDimensionMismatch(future_fe_indices.size(),
template <int dim, int spacedim>
-std::vector<unsigned int>
+std::vector<types::fe_index>
DoFHandler<dim, spacedim>::get_future_fe_indices() const
{
- std::vector<unsigned int> future_fe_indices(
+ std::vector<types::fe_index> future_fe_indices(
this->get_triangulation().n_active_cells(), numbers::invalid_fe_index);
// we could try to extract the values directly, since they are
// Gather all current future FE indices.
active_fe_index_transfer->active_fe_indices.resize(
- get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
+ get_triangulation().n_active_cells(), numbers::invalid_fe_index);
for (const auto &cell : active_cell_iterators())
if (cell->is_locally_owned())
active_fe_index_transfer->cell_data_transfer = std::make_unique<
parallel::distributed::
- CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>(
+ CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
*distributed_tria,
/*transfer_variable_size_data=*/false,
/*refinement_strategy=*/
&dealii::AdaptationStrategies::Refinement::
- preserve<dim, spacedim, unsigned int>,
+ preserve<dim, spacedim, types::fe_index>,
/*coarsening_strategy=*/
[this](const typename Triangulation<dim, spacedim>::cell_iterator &parent,
- const std::vector<unsigned int> &children_fe_indices)
- -> unsigned int {
+ const std::vector<types::fe_index> &children_fe_indices)
+ -> types::fe_index {
return dealii::internal::hp::DoFHandlerImplementation::Implementation::
determine_fe_from_children<dim, spacedim>(parent,
children_fe_indices,
// Unpack active FE indices.
this->active_fe_index_transfer->active_fe_indices.resize(
- this->get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
+ this->get_triangulation().n_active_cells(), numbers::invalid_fe_index);
this->active_fe_index_transfer->cell_data_transfer->unpack(
this->active_fe_index_transfer->active_fe_indices);
active_fe_index_transfer->cell_data_transfer = std::make_unique<
parallel::distributed::
- CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>(
+ CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
*distributed_tria,
/*transfer_variable_size_data=*/false,
/*refinement_strategy=*/
&dealii::AdaptationStrategies::Refinement::
- preserve<dim, spacedim, unsigned int>,
+ preserve<dim, spacedim, types::fe_index>,
/*coarsening_strategy=*/
[this](const typename Triangulation<dim, spacedim>::cell_iterator &parent,
- const std::vector<unsigned int> &children_fe_indices)
- -> unsigned int {
+ const std::vector<types::fe_index> &children_fe_indices)
+ -> types::fe_index {
return dealii::internal::hp::DoFHandlerImplementation::Implementation::
determine_fe_from_children<dim, spacedim>(parent,
children_fe_indices,
active_fe_index_transfer->cell_data_transfer = std::make_unique<
parallel::distributed::
- CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>(
+ CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
*distributed_tria,
/*transfer_variable_size_data=*/false,
/*refinement_strategy=*/
&dealii::AdaptationStrategies::Refinement::
- preserve<dim, spacedim, unsigned int>,
+ preserve<dim, spacedim, types::fe_index>,
/*coarsening_strategy=*/
[this](const typename Triangulation<dim, spacedim>::cell_iterator &parent,
- const std::vector<unsigned int> &children_fe_indices)
- -> unsigned int {
+ const std::vector<types::fe_index> &children_fe_indices)
+ -> types::fe_index {
return dealii::internal::hp::DoFHandlerImplementation::Implementation::
determine_fe_from_children<dim, spacedim>(parent,
children_fe_indices,
// Unpack active FE indices.
active_fe_index_transfer->active_fe_indices.resize(
- get_triangulation().n_active_cells(), numbers::invalid_unsigned_int);
+ get_triangulation().n_active_cells(), numbers::invalid_fe_index);
active_fe_index_transfer->cell_data_transfer->deserialize(
active_fe_index_transfer->active_fe_indices);
const std::unique_ptr<DoFIdentities> &
ensure_existence_and_return_dof_identities(
const dealii::hp::FECollection<dim, spacedim> &fes,
- const unsigned int fe_index_1,
- const unsigned int fe_index_2,
+ const types::fe_index fe_index_1,
+ const types::fe_index fe_index_2,
std::unique_ptr<DoFIdentities> & identities,
const unsigned int face_no = numbers::invalid_unsigned_int)
{
// exists
if (identities.get() == nullptr)
{
+ // TODO: Change to
+ // std::vector<std::map<types::fe_index, unsigned int>>
std::vector<std::map<unsigned int, unsigned int>>
complete_identities;
{
case 0:
{
- complete_identities =
- fes.hp_vertex_dof_identities({fe_index_1, fe_index_2});
+ // TODO: Change set to types::fe_index
+ complete_identities = fes.hp_vertex_dof_identities(
+ std::set<unsigned int>{fe_index_1, fe_index_2});
break;
}
case 1:
{
- complete_identities =
- fes.hp_line_dof_identities({fe_index_1, fe_index_2});
+ // TODO: Change set to types::fe_index
+ complete_identities = fes.hp_line_dof_identities(
+ std::set<unsigned int>{fe_index_1, fe_index_2});
break;
}
case 2:
{
- complete_identities =
- fes.hp_quad_dof_identities({fe_index_1, fe_index_2},
- face_no);
+ // TODO: Change set to types::fe_index
+ complete_identities = fes.hp_quad_dof_identities(
+ std::set<unsigned int>{fe_index_1, fe_index_2},
+ face_no);
break;
}
if (n_active_fe_indices > 1)
{
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
dealii::internal::DoFAccessorImplementation::
Implementation::get_active_fe_indices(
dof_handler,
// find out which is the most dominating finite
// element of the ones that are used on this vertex
- unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim*/ dim);
// if we haven't found a dominating finite element,
// choose the very first one to be dominant
- if (most_dominating_fe_index ==
- numbers::invalid_unsigned_int)
+ // TODO: Change assert to numbers::invalid_fe_index
+ if (most_dominating_fe_index == numbers::invalid_fe_index)
most_dominating_fe_index =
dealii::internal::DoFAccessorImplementation::
Implementation::nth_active_fe_index(
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
for (unsigned int g = f + 1; g < n_active_fe_indices; ++g)
{
- const unsigned int fe_index_1 =
- line->nth_active_fe_index(f),
- fe_index_2 =
- line->nth_active_fe_index(g);
+ const types::fe_index fe_index_1 =
+ line->nth_active_fe_index(f),
+ fe_index_2 =
+ line->nth_active_fe_index(g);
// as described in the hp-paper, we only unify on lines
// when there are at most two different FE objects
// determine which one of both finite
// elements is the dominating one.
- const std::set<unsigned int> fe_indices{
+ const std::set<types::fe_index> fe_indices{
fe_index_1, fe_index_2};
- unsigned int dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ types::fe_index dominating_fe_index =
dof_handler.get_fe_collection()
- .find_dominating_fe(fe_indices,
+ .find_dominating_fe({fe_indices.begin(),
+ fe_indices.end()},
/*codim=*/dim - 1);
- unsigned int other_fe_index =
- numbers::invalid_unsigned_int;
+ types::fe_index other_fe_index =
+ numbers::invalid_fe_index;
if (dominating_fe_index !=
- numbers::invalid_unsigned_int)
+ numbers::invalid_fe_index)
other_fe_index =
(dominating_fe_index == fe_index_1) ?
fe_index_2 :
// is not what we describe in the paper!.
if ((unique_sets_of_dofs == 2) && (dim == 2))
{
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
line->get_active_fe_indices();
// find out which is the most dominating finite element of
// the ones that are used on this line
- const unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim=*/dim - 1);
// if we found the most dominating element, then use this
// identification. otherwise, the code that computes
// hanging node constraints will have to deal with it by
// computing appropriate constraints along this face/edge
- if (most_dominating_fe_index !=
- numbers::invalid_unsigned_int)
+ if (most_dominating_fe_index != numbers::invalid_fe_index)
{
// loop over the indices of all the finite elements
// that are not dominating, and identify their dofs to
const auto quad = cell->quad(q);
quad_touched[quad->index()] = true;
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
quad->get_active_fe_indices();
// find out which is the most dominating finite
// element of the ones that are used on this quad
- const unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim=*/dim - 2);
const unsigned int most_dominating_fe_index_face_no =
// computes hanging node constraints will have to
// deal with it by computing appropriate constraints
// along this face/edge
- if (most_dominating_fe_index != numbers::invalid_unsigned_int)
+ if (most_dominating_fe_index != numbers::invalid_fe_index)
{
// loop over the indices of all the finite
// elements that are not dominating, and
if (n_active_fe_indices > 1)
{
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
dealii::internal::DoFAccessorImplementation::
Implementation::get_active_fe_indices(
dof_handler,
// find out which is the most dominating finite
// element of the ones that are used on this vertex
- unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim=*/dim);
// if we haven't found a dominating finite element,
// choose the very first one to be dominant similar
// to compute_vertex_dof_identities()
- if (most_dominating_fe_index ==
- numbers::invalid_unsigned_int)
+ if (most_dominating_fe_index == numbers::invalid_fe_index)
most_dominating_fe_index =
dealii::internal::DoFAccessorImplementation::
Implementation::nth_active_fe_index(
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
for (unsigned int g = f + 1; g < n_active_fe_indices; ++g)
{
- const unsigned int fe_index_1 =
- line->nth_active_fe_index(f),
- fe_index_2 =
- line->nth_active_fe_index(g);
+ const types::fe_index fe_index_1 =
+ line->nth_active_fe_index(f),
+ fe_index_2 =
+ line->nth_active_fe_index(g);
if ((dof_handler.get_fe(fe_index_1).n_dofs_per_line() ==
dof_handler.get_fe(fe_index_2)
// determine which one of both finite
// elements is the dominating one.
- const std::set<unsigned int> fe_indices{
+ const std::set<types::fe_index> fe_indices{
fe_index_1, fe_index_2};
- unsigned int dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ types::fe_index dominating_fe_index =
dof_handler.get_fe_collection()
- .find_dominating_fe(fe_indices,
+ .find_dominating_fe({fe_indices.begin(),
+ fe_indices.end()},
/*codim*/ dim - 1);
- unsigned int other_fe_index =
- numbers::invalid_unsigned_int;
+ types::fe_index other_fe_index =
+ numbers::invalid_fe_index;
if (dominating_fe_index !=
- numbers::invalid_unsigned_int)
+ numbers::invalid_fe_index)
other_fe_index =
(dominating_fe_index == fe_index_1) ?
fe_index_2 :
// is not what we describe in the paper!.
if ((unique_sets_of_dofs == 2) && (dim == 2))
{
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
line->get_active_fe_indices();
// find out which is the most dominating finite element of
// the ones that are used on this line
- const unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim=*/dim - 1);
// if we found the most dominating element, then use this
// identification. otherwise, the code that computes
// hanging node constraints will have to deal with it by
// computing appropriate constraints along this face/edge
- if (most_dominating_fe_index !=
- numbers::invalid_unsigned_int)
+ if (most_dominating_fe_index != numbers::invalid_fe_index)
{
// loop over the indices of all the finite elements
// that are not dominating, and identify their dofs to
const auto quad = cell->quad(q);
quad_marked[quad->index()] = false;
- const std::set<unsigned int> fe_indices =
+ const std::set<types::fe_index> fe_indices =
quad->get_active_fe_indices();
// find out which is the most dominating finite
// element of the ones that are used on this quad
- const unsigned int most_dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index most_dominating_fe_index =
dof_handler.get_fe_collection().find_dominating_fe(
- fe_indices,
+ {fe_indices.begin(), fe_indices.end()},
/*codim=*/dim - 2);
- const unsigned int most_dominating_fe_index_face_no =
+ const types::fe_index most_dominating_fe_index_face_no =
cell->active_fe_index() == most_dominating_fe_index ?
q :
cell->neighbor_face_no(q);
// computes hanging node constraints will have to
// deal with it by computing appropriate constraints
// along this face/edge
- if (most_dominating_fe_index != numbers::invalid_unsigned_int)
+ if (most_dominating_fe_index != numbers::invalid_fe_index)
{
// loop over the indices of all the finite
// elements that are not dominating, and
// us to do
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
dealii::internal::DoFAccessorImplementation::
Implementation::nth_active_fe_index(
dof_handler,
for (const auto &cell : dof_handler.active_cell_iterators())
if (!cell->is_artificial())
{
- const unsigned int fe_index = cell->active_fe_index();
+ const types::fe_index fe_index = cell->active_fe_index();
for (unsigned int d = 0;
d < dof_handler.get_fe(fe_index)
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
line->nth_active_fe_index(f);
for (unsigned int d = 0;
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
line->nth_active_fe_index(f);
for (unsigned int d = 0;
for (unsigned int f = 0; f < n_active_fe_indices; ++f)
{
- const unsigned int fe_index =
+ const types::fe_index fe_index =
quad->nth_active_fe_index(f);
for (unsigned int d = 0;
// on each cell: get dof indices
// and insert them into the global
// list using their component
- const unsigned int fe_index = cell->active_fe_index();
- const unsigned int dofs_per_cell =
+ const types::fe_index fe_index = cell->active_fe_index();
+ const unsigned int dofs_per_cell =
fe_collection[fe_index].n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_active_or_mg_dof_indices(local_dof_indices);
// on each cell: get dof indices
// and insert them into the global
// list using their component
- const unsigned int fe_index = cell->active_fe_index();
- const unsigned int dofs_per_cell =
+ const types::fe_index fe_index = cell->active_fe_index();
+ const unsigned int dofs_per_cell =
fe_collection[fe_index].n_dofs_per_cell();
local_dof_indices.resize(dofs_per_cell);
cell->get_active_or_mg_dof_indices(local_dof_indices);
for (const auto &c :
dof.active_cell_iterators() | IteratorFilters::LocallyOwnedCell())
{
- const unsigned int fe_index = c->active_fe_index();
- const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
+ const types::fe_index fe_index = c->active_fe_index();
+ const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
indices.resize(dofs_per_cell);
c->get_dof_indices(indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
for (const auto &cell : dof.active_cell_iterators())
if (cell->is_locally_owned())
{
- const unsigned int fe_index = cell->active_fe_index();
+ const types::fe_index fe_index = cell->active_fe_index();
const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
indices.resize(dofs_per_cell);
cell->get_dof_indices(indices);
AssertDimension(active_fe_indices.size(),
dof_handler.get_triangulation().n_active_cells());
- active_fe_indices = dof_handler.get_active_fe_indices();
+ std::vector<types::fe_index> indices = dof_handler.get_active_fe_indices();
+
+ active_fe_indices.assign(indices.begin(), indices.end());
}
template <int dim, int spacedim>
// ok, start up the work
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
- const unsigned int fe_index = cell->active_fe_index();
+ const types::fe_index fe_index = cell->active_fe_index();
const unsigned int n_dofs_on_mother =
2 * fe.n_dofs_per_vertex() +
// ok, start up the work
const FiniteElement<dim> &fe = cell->get_fe();
- const unsigned int fe_index = cell->active_fe_index();
+ const types::fe_index fe_index = cell->active_fe_index();
const unsigned int n_dofs_on_mother = fe.n_dofs_per_face(face);
const unsigned int n_dofs_on_children =
// auxiliary variable which holds FE indices of the mother face
// and its subfaces. This knowledge will be needed in hp-case
// with neither_element_dominates.
- std::set<unsigned int> fe_ind_face_subface;
+ std::set<types::fe_index> fe_ind_face_subface;
fe_ind_face_subface.insert(cell->active_fe_index());
if (dof_handler.has_hp_capabilities())
Assert(subface->n_active_fe_indices() == 1,
ExcInternalError());
- const unsigned int subface_fe_index =
+ const types::fe_index subface_fe_index =
subface->nth_active_fe_index(0);
// we sometime run into the situation where for
// Note that the last solution covers the first two
// scenarios, thus we stick with it assuming that we
// won't lose much time/efficiency.
- const unsigned int dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index dominating_fe_index =
fe_collection.find_dominating_fe_extended(
- fe_ind_face_subface, /*codim=*/1);
+ {fe_ind_face_subface.begin(),
+ fe_ind_face_subface.end()},
+ /*codim=*/1);
AssertThrow(
- dominating_fe_index != numbers::invalid_unsigned_int,
+ dominating_fe_index != numbers::invalid_fe_index,
ExcMessage(
"Could not find a least face dominating FE."));
->n_active_fe_indices() == 1,
ExcInternalError());
- const unsigned int subface_fe_index =
+ const types::fe_index subface_fe_index =
cell->face(face)->child(sf)->nth_active_fe_index(
0);
const FiniteElement<dim, spacedim> &subface_fe =
// to primary dofs based on the interpolation
// matrix.
- const unsigned int this_fe_index =
+ const types::fe_index this_fe_index =
cell->active_fe_index();
- const unsigned int neighbor_fe_index =
+ const types::fe_index neighbor_fe_index =
neighbor->active_fe_index();
- std::set<unsigned int> fes;
+ std::set<types::fe_index> fes;
fes.insert(this_fe_index);
fes.insert(neighbor_fe_index);
const dealii::hp::FECollection<dim, spacedim>
&fe_collection = dof_handler.get_fe_collection();
- const unsigned int dominating_fe_index =
+ // TODO: Change set to types::fe_index
+ const types::fe_index dominating_fe_index =
fe_collection.find_dominating_fe_extended(
- fes, /*codim=*/1);
+ {fes.begin(), fes.end()}, /*codim=*/1);
AssertThrow(
- dominating_fe_index !=
- numbers::invalid_unsigned_int,
+ dominating_fe_index != numbers::invalid_fe_index,
ExcMessage(
"Could not find the dominating FE for " +
cell->get_fe().get_name() + " and " +
// that is left is to match the corresponding DoFs of both faces.
//
- const unsigned int face_1_index = face_1->nth_active_fe_index(0);
- const unsigned int face_2_index = face_2->nth_active_fe_index(0);
+ const types::fe_index face_1_index = face_1->nth_active_fe_index(0);
+ const types::fe_index face_2_index = face_2->nth_active_fe_index(0);
Assert(face_1->get_fe(face_1_index) == face_2->get_fe(face_2_index),
ExcMessage(
"Matching periodic cells need to use the same finite element"));
(subdomain_id == cell->subdomain_id())) &&
cell->is_locally_owned())
{
- const unsigned int fe_index = cell->active_fe_index();
- const unsigned int dofs_per_cell =
+ const types::fe_index fe_index = cell->active_fe_index();
+ const unsigned int dofs_per_cell =
fe_collection[fe_index].n_dofs_per_cell();
dofs_on_this_cell.resize(dofs_per_cell);
}
// If we couldn't find the dominating object, return an invalid one.
- return numbers::invalid_unsigned_int;
+ return numbers::invalid_fe_index;
}
}
// If we couldn't find the dominated object, return an invalid one.
- return numbers::invalid_unsigned_int;
+ return numbers::invalid_fe_index;
}
{
unsigned int fe_index = find_dominating_fe(fes, codim);
- if (fe_index == numbers::invalid_unsigned_int)
+ if (fe_index == numbers::invalid_fe_index)
{
const std::set<unsigned int> dominating_fes =
find_common_fes(fes, codim);
{
unsigned int fe_index = find_dominated_fe(fes, codim);
- if (fe_index == numbers::invalid_unsigned_int)
+ if (fe_index == numbers::invalid_fe_index)
{
const std::set<unsigned int> dominated_fes =
find_enclosing_fes(fes, codim);
{
cell->clear_refine_flag();
cell->set_active_fe_index(
- std::min(cell->active_fe_index() + 1, fe_collection.size() - 1));
+ std::min<types::fe_index>(cell->active_fe_index() + 1,
+ fe_collection.size() - 1));
}
}
{
cell->clear_refine_flag();
cell->set_active_fe_index(
- std::min(cell->active_fe_index() + 1, fe_collection.size() - 1));
+ std::min<types::fe_index>(cell->active_fe_index() + 1,
+ fe_collection.size() - 1));
}
}
// {Q1, Q2, Q3, Q4} with {2,3} => Q3 2
// {Q1xQ1, Q2xQ2, Q3xQ4, Q4xQ3} with {2,3} => Q2xQ2 1
// {Q1xQ1, Q3xQ4, Q4xQ3} with {1,2} => Q1xQ1 0
-// {0x0, 0x0, Q1x0, 0xQ1} with {2,3} => none invalid_unsigned_int
+// {0x0, 0x0, Q1x0, 0xQ1} with {2,3} => none invalid_fe_index
// {0x0, 0x0, Q1x0, 0xQ1} with {2,3} => 0x0 0 (with dominating FE_Nothing)
// {Q1xQ1, Q1xQ1, Q2xQ1, Q1xQ2} with {2,3} => Q1xQ1 0
-// {Q4xQ4, Q5xQ5, Q3xQ4, Q4xQ3} with {2,3} => none invalid_unsigned_int
+// {Q4xQ4, Q5xQ5, Q3xQ4, Q4xQ3} with {2,3} => none invalid_fe_index
// {Q1, Q2, Q4, Q3} with {3} => Q3 3
// {Q3, Q4, Q1, Q1} with {2,3} => Q1 2 (self-domination)
/* clang-format on */
FESystem<dim>(FE_Nothing<dim>(), 1, FE_Q<dim>(1), 1));
const unsigned int ind =
fe_collection.find_dominating_fe_extended(fes, /*codim=*/1);
- if (ind == numbers::invalid_unsigned_int)
- deallog << "numbers::invalid_unsigned_int" << std::endl;
+ if (ind == numbers::invalid_fe_index)
+ deallog << "numbers::invalid_fe_index" << std::endl;
else
deallog << ind << std::endl;
}
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
const unsigned int ind =
fe_collection.find_dominating_fe_extended(fes, /*codim=*/1);
- if (ind == numbers::invalid_unsigned_int)
- deallog << "numbers::invalid_unsigned_int" << std::endl;
+ if (ind == numbers::invalid_fe_index)
+ deallog << "numbers::invalid_fe_index" << std::endl;
else
deallog << ind << std::endl;
}
DEAL::2
DEAL::1
DEAL::0
-DEAL::numbers::invalid_unsigned_int
+DEAL::numbers::invalid_fe_index
DEAL::0
DEAL::0
-DEAL::numbers::invalid_unsigned_int
+DEAL::numbers::invalid_fe_index
DEAL::3
DEAL::2
DEAL::2
DEAL::1
DEAL::0
-DEAL::numbers::invalid_unsigned_int
+DEAL::numbers::invalid_fe_index
DEAL::0
DEAL::0
-DEAL::numbers::invalid_unsigned_int
+DEAL::numbers::invalid_fe_index
DEAL::3
DEAL::2
DEAL::OK
// {Q1, Q2, Q3, Q4} with {2,3} => Q4 3
// {Q5xQ5, Q4xQ4, Q3xQ4, Q4xQ3} with {2,3} => Q4xQ4 1
// {Q5xQ5, Q3xQ4, Q4xQ3} with {2,3} => Q5xQ5 0
-// {Q1x0, 0xQ1, 0x0, 0x0} with {2,3} => none invalid_unsigned_int
+// {Q1x0, 0xQ1, 0x0, 0x0} with {2,3} => none invalid_fe_index
// {Q1x0, 0xQ1, 0x0, 0x0} with {2,3} => 0x0 2 (with dominating FE_Nothing)
// {Q2xQ2, Q2xQ2, Q2xQ1, Q1xQ2} with {2,3} => Q2xQ2 0
-// {Q2xQ2, Q3xQ3, Q3xQ4, Q4xQ3} with {2,3} => none invalid_unsigned_int
+// {Q2xQ2, Q3xQ3, Q3xQ4, Q4xQ3} with {2,3} => none invalid_fe_index
// {Q1, Q2, Q4, Q3} with {3} => Q3 3
// {Q3, Q4, Q1, Q1} with {2,3} => Q1 2 (self-domination)
/* clang-format on */
FESystem<dim>(FE_Nothing<dim>(), 1, FE_Nothing<dim>(), 1));
const unsigned int ind =
fe_collection.find_dominated_fe_extended(fes, /*codim=*/1);
- if (ind == numbers::invalid_unsigned_int)
- deallog << "numbers::invalid_unsigned_int" << std::endl;
+ if (ind == numbers::invalid_fe_index)
+ deallog << "numbers::invalid_fe_index" << std::endl;
else
deallog << ind << std::endl;
}
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
const unsigned int ind =
fe_collection.find_dominated_fe_extended(fes, /*codim=*/1);
- if (ind == numbers::invalid_unsigned_int)
- deallog << "numbers::invalid_unsigned_int" << std::endl;
+ if (ind == numbers::invalid_fe_index)
+ deallog << "numbers::invalid_fe_index" << std::endl;
else
deallog << ind << std::endl;
}
DEAL:2D::3
DEAL:2D::1
DEAL:2D::0
-DEAL:2D::numbers::invalid_unsigned_int
+DEAL:2D::numbers::invalid_fe_index
DEAL:2D::2
DEAL:2D::0
-DEAL:2D::numbers::invalid_unsigned_int
+DEAL:2D::numbers::invalid_fe_index
DEAL:2D::3
DEAL:2D::2
DEAL:3D::3
DEAL:3D::1
DEAL:3D::0
-DEAL:3D::numbers::invalid_unsigned_int
+DEAL:3D::numbers::invalid_fe_index
DEAL:3D::2
DEAL:3D::0
-DEAL:3D::numbers::invalid_unsigned_int
+DEAL:3D::numbers::invalid_fe_index
DEAL:3D::3
DEAL:3D::2
DEAL::OK
dof_handler.distribute_dofs(fe_collection);
- std::vector<unsigned int> active_fe_indices =
+ const std::vector<types::fe_index> active_fe_indices =
dof_handler.get_active_fe_indices();
for (unsigned int i = 0; i < tria.n_active_cells(); ++i)
deallog << active_fe_indices[i] << std::endl;
DoFHandler<dim> dof(tria);
{
- std::vector<unsigned> active_indices(tria.n_active_cells());
- for (unsigned i = 0; i < tria.n_active_cells() / 2; ++i)
+ std::vector<types::fe_index> active_indices(tria.n_active_cells());
+ for (unsigned int i = 0; i < tria.n_active_cells() / 2; ++i)
active_indices[i] = 1;
dof.set_active_fe_indices(active_indices);
#include <deal.II/base/conditional_ostream.h>
#include <deal.II/base/logstream.h>
-#include <deal.II/base/mpi.h>
+#include <deal.II/base/mpi.templates.h>
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/distributed/tria.h>
{
if (cell->is_locally_owned())
cell->set_active_fe_index(
- std::max(((cell)->active_fe_index() + 1) / 2 /*bisection*/,
+ std::max((cell->active_fe_index() + 1u) / 2 /*bisection*/,
1u) -
1);
}
{
if (cell->is_locally_owned())
cell->set_active_fe_index(
- std::max(((cell_other)->active_fe_index() + 1) /
- 2 /*bisection*/,
+ std::max((cell_other->active_fe_index() + 1u) / 2 /*bisection*/,
1u) -
1);
cell_other++;
// break if all cells on coarse level have active_fe_index=0
{
- unsigned int min = 0;
+ types::fe_index min = 0;
for (auto &cell : dof_handler_coarse.active_cell_iterators())
{