<h3>Specific improvements</h3>
<ol>
+ <li> Changed: It was possible to call DoFAccessor::set_active_fe_index()
+ on non-active cells. However, this made no sense: Since degrees of
+ freedoms only exist on active cells
+ for hp::DoFHandler (i.e., there is currently no implementation
+ of multilevel hp::DoFHandler objects), it does not make sense
+ to assign active FE indices to non-active cells since they
+ do not have finite element spaces associated with them without
+ having any degrees of freedom. Consequently, this function will
+ now produce an exception when called on non-active cells.
+ <br>
+ (Wolfgang Bangerth, 2014/01/24)
+ </li>
+
<li> Fixed: SparsityPattern::max_entries_per_row() forgot to consider
the last row of the matrix and consequently sometimes returned
wrong values. This is now fixed.
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1998 - 2013 by the deal.II authors
+// Copyright (C) 1998 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
get_fe () const;
/**
- * Returns the index inside the hp::FECollection of the
- * FiniteElement used for this cell.
+ * Returns the index inside the hp::FECollection of the
+ * FiniteElement used for this cell. This function is
+ * only useful if the DoF handler object associated with
+ * the current cell is an hp::DoFHandler.
*/
unsigned int active_fe_index () const;
/**
- * Sets the index of the FiniteElement used for this cell.
+ * Sets the index of the FiniteElement used for this cell. This
+ * determines which element in an hp::FECollection to use. This function is
+ * only useful if the DoF handler object associated with
+ * the current cell is an hp::DoFHandler.
+ *
+ * @note Since degrees of freedoms only exist on active cells
+ * for hp::DoFHandler (i.e., there is currently no implementation
+ * of multilevel hp::DoFHandler objects), it does not make sense
+ * to assign active FE indices to non-active cells since they
+ * do not have finite element spaces associated with them without
+ * having any degrees of freedom. Consequently, this function will
+ * produce an exception when called on non-active cells.
*/
void set_active_fe_index (const unsigned int i);
/**
void
DoFCellAccessor<DH,lda>::set_active_fe_index (const unsigned int i)
{
+ Assert (this->has_children() == false,
+ ExcMessage ("You can not set the active_fe_index on a cell that has "
+ "children because no degrees of freedom will be assigned "
+ "to this cell."));
dealii::internal::DoFCellAccessor::Implementation::set_active_fe_index (*this, i);
}