const dealii::internal::int2type<1> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
- fe_index,
- obj_level);
+ fe_index);
}
template <int spacedim>
static
unsigned int
- n_active_fe_indices (const dealii::hp::DoFHandler<1,spacedim> &dof_handler,
+ n_active_fe_indices (const dealii::hp::DoFHandler<1,spacedim> &,
const unsigned int obj_level,
const unsigned int obj_index,
const dealii::internal::int2type<1> &)
{
- return dof_handler.levels[obj_level]->n_active_fe_indices (obj_index);
+ // on a cell, the number of active elements is one
+ return 1;
}
const unsigned int n,
const dealii::internal::int2type<1> &)
{
- return dof_handler.levels[obj_level]->nth_active_fe_index (obj_level,
- obj_index,
- n);
+ Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
+ return dof_handler.levels[obj_level]->active_fe_index (obj_index);
}
const dealii::internal::int2type<2> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
- fe_index,
- obj_level);
+ fe_index);
}
template <int spacedim>
static
unsigned int
- n_active_fe_indices (const dealii::hp::DoFHandler<2,spacedim> &dof_handler,
+ n_active_fe_indices (const dealii::hp::DoFHandler<2,spacedim> &,
const unsigned int obj_level,
const unsigned int obj_index,
const dealii::internal::int2type<2> &)
{
- return dof_handler.levels[obj_level]->n_active_fe_indices (obj_index);
+ // on a cell, the number of active elements is one
+ return 1;
}
const unsigned int n,
const dealii::internal::int2type<2> &)
{
- return dof_handler.levels[obj_level]->nth_active_fe_index (obj_level,
- obj_index,
- n);
+ Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
+ return dof_handler.levels[obj_level]->active_fe_index (obj_index);
}
const dealii::internal::int2type<3> &)
{
return dof_handler.levels[obj_level]->fe_index_is_active(obj_index,
- fe_index,
- obj_level);
+ fe_index);
}
template <int spacedim>
static
unsigned int
- n_active_fe_indices (const dealii::hp::DoFHandler<3,spacedim> &dof_handler,
+ n_active_fe_indices (const dealii::hp::DoFHandler<3,spacedim> &,
const unsigned int obj_level,
const unsigned int obj_index,
const dealii::internal::int2type<3> &)
{
- return dof_handler.levels[obj_level]->n_active_fe_indices (obj_index);
+ // on a cell, the number of active elements is one
+ return 1;
}
const unsigned int n,
const dealii::internal::int2type<3> &)
{
- return dof_handler.levels[obj_level]->nth_active_fe_index (obj_level,
- obj_index,
- n);
+ Assert (n==0, ExcMessage("On cells, there can only be one active FE index"));
+ return dof_handler.levels[obj_level]->active_fe_index (obj_index);
}
/**
const unsigned int local_index,
const unsigned int obj_level) const;
- /**
- * Return the number of
- * finite elements that are
- * active on a given
- * object. If this is a cell,
- * the answer is of course
- * one. If it is a face, the
- * answer may be one or two,
- * depending on whether the
- * two adjacent cells use the
- * same finite element or
- * not. If it is an edge in
- * 3d, the possible return
- * value may be one or any
- * other value larger than
- * that.
- *
- * If the object is not part
- * of an active cell, then no
- * degrees of freedom have
- * been distributed and zero
- * is returned.
- */
- unsigned int
- n_active_fe_indices (const unsigned int obj_index) const;
-
/**
* Return the fe_index of the
* n-th active finite element
* on this object.
*/
- types::global_dof_index
- nth_active_fe_index (const unsigned int obj_level,
- const unsigned int obj_index,
- const unsigned int n) const;
+ unsigned int
+ active_fe_index (const unsigned int obj_index) const;
/**
* Check whether a given
*/
bool
fe_index_is_active (const unsigned int obj_index,
- const unsigned int fe_index,
- const unsigned int obj_level) const;
+ const unsigned int fe_index) const;
/**
* Determine an estimate for the
inline
unsigned int
DoFLevel<dim>::
- n_active_fe_indices (const unsigned int obj_index) const
- {
- Assert (obj_index < dof_offsets.size(),
- ExcIndexRange (obj_index, 0, dof_offsets.size()));
-
- // make sure we are on an
- // object for which DoFs have
- // been allocated at all
- if (dof_offsets[obj_index] == numbers::invalid_dof_index)
- return 0;
-
- // we are on a cell, so the only set of indices we store is the
- // one for the cell, which is unique
- return 1;
- }
-
-
-
- template <int dim>
- inline
- types::global_dof_index
- DoFLevel<dim>::
- nth_active_fe_index (const unsigned int obj_level,
- const unsigned int obj_index,
- const unsigned int n) const
+ active_fe_index (const unsigned int obj_index) const
{
Assert (obj_index < dof_offsets.size(),
ExcIndexRange (obj_index, 0, dof_offsets.size()));
"information for an object on which no such "
"information is available"));
- // this is a cell, so there is only a single fe_index
- Assert (n == 0, ExcIndexRange (n, 0, 1));
-
return active_fe_indices[obj_index];
}
bool
DoFLevel<dim>::
fe_index_is_active (const unsigned int obj_index,
- const unsigned int fe_index,
- const unsigned int obj_level) const
+ const unsigned int fe_index) const
{
Assert ((fe_index != dealii::hp::DoFHandler<1,1>::default_fe_index),
ExcMessage ("You need to specify a FE index when working "