<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.
+ <br>
+ The same of course is true for asking for the finite element active
+ on a non-active cell, i.e. using the functions
+ DoFAccessor::active_fe_index() and
+ DoFAccessor::get_fe(). All of these functions now produce exceptions on
+ non-active cells.
+ <br>
+ (Wolfgang Bangerth, 2014/01/24)
+ </li>
+
<li> New: deal.II now links with the
<a href="http://www.boost.org/doc/libs/1_55_0/libs/iostreams/doc/index.html">BOOST
Iostreams</a> library (at least if the libz and libbz2 libraries
<h3>Specific improvements</h3>
<ol>
- <li>Fixed: A regression where a single whitespace accidentally added to
- DEAL_II_LINKER_FLAGS internally prevented cmake-2.8.8 from configuring
- sucessfully
+ <li>Fixed: The SolutionTransfer class had all sorts of problems when
+ used with hp::DoFHandler that made its results at least questionable.
+ Several parts of this class have been rewritten to make the results
+ more predictable and, likely, more correct.
<br>
- (Matthias Maier, Krysztof Bzowski 2014/01/26)
+ (Wolfgang Bangerth, 2014/01/26)
- <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.
+ <li>Fixed: A regression where a single whitespace accidentally added to
+ DEAL_II_LINKER_FLAGS internally prevented cmake-2.8.8 from configuring
+ sucessfully.
<br>
- (Wolfgang Bangerth, 2014/01/24)
- </li>
+ (Matthias Maier, Krysztof Bzowski, 2014/01/26)
<li> Fixed: SparsityPattern::max_entries_per_row() forgot to consider
the last row of the matrix and consequently sometimes returned
* this iterator. For non-hp DoF handlers, this is of course always
* the same element, independent of the cell we are presently on,
* but for hp DoF handlers, this may change from cell to cell.
+ *
+ * @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 query the finite element on 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.
*/
const FiniteElement<DH::dimension,DH::space_dimension> &
get_fe () const;
* FiniteElement used for this cell. 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 query active FE indices on 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.
*/
unsigned int active_fe_index () const;
const FiniteElement<DH::dimension,DH::space_dimension> &
DoFCellAccessor<DH,lda>::get_fe () const
{
+ Assert ((dynamic_cast<const dealii::DoFHandler<DH::dimension,DH::space_dimension>*>
+ (this->dof_handler) != 0)
+ ||
+ (this->has_children() == false),
+ ExcMessage ("In hp::DoFHandler objects, finite elements are only associated "
+ "with active cells. Consequently, you can not ask for the "
+ "active finite element on cells with children."));
return dealii::internal::DoFAccessor::get_fe (this->dof_handler->get_fe(), active_fe_index());
}
unsigned int
DoFCellAccessor<DH,lda>::active_fe_index () const
{
+ Assert (this->has_children() == false,
+ ExcMessage ("You can not ask for the active_fe_index on a cell that has "
+ "children because no degrees of freedom are assigned "
+ "to this cell and, consequently, no finite element "
+ "is associated with it."));
return dealii::internal::DoFCellAccessor::Implementation::active_fe_index (*this);
}
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->get_dof_handler().get_fe() != 0,
typename BaseClass::ExcInvalidObject());
Assert (local_values.size() == dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
// which is both done by one
// function
{
- const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
- local_values.reinit(dofs_per_cell, true); // fast reinit, i.e. the
- // entries are not set to 0.
- // make sure that the size of the
+ const unsigned int this_fe_index = pointerstruct->second.active_fe_index;
+ const unsigned int dofs_per_cell=cell->get_dof_handler().get_fe()[this_fe_index].dofs_per_cell;
+ local_values.reinit(dofs_per_cell, true);
+
+ // make sure that the size of the
// stored indices is the same as
// dofs_per_cell. this is kind of a
// test if we use the same fe in the
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_values(i)=in((*pointerstruct->second.indices_ptr)[i]);
cell->set_dof_values_by_interpolation(local_values, out,
- cell->active_fe_index());
+ this_fe_index);
}
}
}