// forward declarations
#ifndef DOXYGEN
+template <int dim, int spacedim>
+class DoFHandler;
+
template <typename Number>
class Vector;
class Triangulation;
}
} // namespace parallel
-
-namespace hp
-{
- template <int dim, int spacedim>
- class DoFHandler;
-}
#endif
/**
* Constructor.
*
- * @param[in] dof The hp::DoFHandler on which all operations will
+ * @param[in] dof The DoFHandler on which all operations will
* happen. At the time when this constructor is called, the
* DoFHandler still points to the triangulation before the
* refinement in question happens.
*/
- ErrorPredictor(const hp::DoFHandler<dim, spacedim> &dof);
+ ErrorPredictor(const DoFHandler<dim, spacedim> &dof);
/**
* Prepare the current object for coarsening and refinement.
/**
* Pointer to the degree of freedom handler to work with.
*/
- SmartPointer<const hp::DoFHandler<dim, spacedim>,
+ SmartPointer<const DoFHandler<dim, spacedim>,
ErrorPredictor<dim, spacedim>>
dof_handler;
// functions.
template <int, int>
friend class DoFHandler;
- template <int, int>
- friend class hp::DoFHandler;
friend struct dealii::internal::DoFHandlerImplementation::Policy::
Implementation;
// functions.
template <int, int>
friend class DoFHandler;
- template <int, int>
- friend class hp::DoFHandler;
friend struct dealii::internal::DoFHandlerImplementation::Policy::
Implementation;
Assert(false,
ExcMessage(
"You are trying to assign iterators that are incompatible. "
- "Reasons for incompatibility are that they point to different "
- "types of DoFHandlers (e.g., dealii::DoFHandler and "
- "dealii::hp::DoFHandler) or that they refer to objects of "
+ "The reason for incompatibility is that they refer to objects of "
"different dimensionality (e.g., assigning a line iterator "
"to a quad iterator)."));
}
{
Assert(dof_handler.hp_capability_enabled == false,
ExcMessage(
- "hp::DoFHandler does not implement multilevel DoFs."));
+ "DoFHandler in hp-mode does not implement multilevel DoFs."));
return dof_handler.mg_vertex_dofs[vertex_index].get_index(
level, i, dof_handler.get_fe().n_dofs_per_vertex());
{
Assert(dof_handler.hp_capability_enabled == false,
ExcMessage(
- "hp::DoFHandler does not implement multilevel DoFs."));
+ "DoFHandler in hp-mode does not implement multilevel DoFs."));
return dof_handler.mg_vertex_dofs[vertex_index].set_index(
level, i, dof_handler.get_fe().n_dofs_per_vertex(), index);
AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
Assert(dof_handler->hp_capability_enabled == false,
- ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
+ ExcMessage(
+ "DoFHandler in hp-mode does not implement multilevel DoFs."));
return this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)]
.get_index(level, i, this->dof_handler->get_fe().n_dofs_per_vertex());
AssertIndexRange(i, this->dof_handler->get_fe(fe_index).n_dofs_per_vertex());
Assert(dof_handler->hp_capability_enabled == false,
- ExcMessage("hp::DoFHandler does not implement multilevel DoFs."));
+ ExcMessage(
+ "DoFHandler in hp-mode does not implement multilevel DoFs."));
this->dof_handler->mg_vertex_dofs[this->vertex_index(vertex)].set_index(
level, i, this->dof_handler->get_fe().n_dofs_per_vertex(), index);
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_active(),
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."));
+ "For DoFHandler objects in hp-mode, finite elements are only "
+ "associated with active cells. Consequently, you can not ask "
+ "for the active finite element on cells with children."));
return this->dof_handler->get_fe(active_fe_index());
}
Assert((this->dof_handler->hp_capability_enabled == false) ||
this->is_active(),
ExcMessage(
- "In hp::DoFHandler objects, finite elements are only associated "
- "with active cells. Consequently, you can not ask for the "
- "future finite element on cells with children."));
+ "For DoFHandler objects in hp-mode, finite elements are only "
+ "associated with active cells. Consequently, you can not ask "
+ "for the future finite element on cells with children."));
return this->dof_handler->get_fe(future_fe_index());
}
friend struct dealii::internal::TriaAccessorImplementation::Implementation;
- friend class hp::DoFHandler<dim, spacedim>;
-
friend struct dealii::internal::TriangulationImplementation::Implementation;
friend struct dealii::internal::TriangulationImplementation::
ImplementationMixedMesh;
# include <deal.II/distributed/tria.h>
# include <deal.II/dofs/dof_accessor.h>
+# include <deal.II/dofs/dof_handler.h>
# include <deal.II/dofs/dof_tools.h>
# include <deal.II/grid/tria_accessor.h>
# include <deal.II/grid/tria_iterator.h>
-# include <deal.II/hp/dof_handler.h>
-
# include <deal.II/lac/block_vector.h>
# include <deal.II/lac/la_parallel_block_vector.h>
# include <deal.II/lac/la_parallel_vector.h>
{
template <int dim, int spacedim>
ErrorPredictor<dim, spacedim>::ErrorPredictor(
- const hp::DoFHandler<dim, spacedim> &dof)
+ const DoFHandler<dim, spacedim> &dof)
: dof_handler(&dof, typeid(*this).name())
, handle(numbers::invalid_unsigned_int)
, gamma_p(0.)
, gamma_h(0.)
, gamma_n(0.)
{
- Assert(
- (dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim>
- *>(&dof_handler->get_triangulation()) != nullptr),
- ExcMessage(
- "parallel::distributed::ErrorPredictor requires a parallel::distributed::Triangulation object."));
+ Assert((dynamic_cast<
+ const parallel::distributed::Triangulation<dim, spacedim> *>(
+ &dof_handler->get_triangulation()) != nullptr),
+ ExcMessage("parallel::distributed::ErrorPredictor requires a "
+ "parallel::distributed::Triangulation object."));
}
const typename Triangulation<dim, spacedim>::cell_iterator &cell_,
const typename Triangulation<dim, spacedim>::CellStatus status)
{
- typename hp::DoFHandler<dim, spacedim>::cell_iterator cell(*cell_,
- dof_handler);
+ typename DoFHandler<dim, spacedim>::cell_iterator cell(*cell_,
+ dof_handler);
// create buffer for each individual input vector
std::vector<float> predicted_errors(error_indicators.size());
(fe_index != DoFHandler<dim, spacedim>::invalid_fe_index),
ExcMessage(
"You cannot call this function on non-active cells "
- "of hp::DoFHandler objects unless you provide an explicit "
+ "of DoFHandler objects unless you provide an explicit "
"finite element index because they do not have naturally "
"associated finite element spaces associated: degrees "
"of freedom are only distributed on active cells for which "
(fe_index != DoFHandler<dim, spacedim>::invalid_fe_index),
ExcMessage(
"You cannot call this function on non-active cells "
- "of hp::DoFHandler objects unless you provide an explicit "
+ "of DoFHandler objects unless you provide an explicit "
"finite element index because they do not have naturally "
"associated finite element spaces associated: degrees "
"of freedom are only distributed on active cells for which "
unsigned int parent_future_fe_index = numbers::invalid_unsigned_int;
// store all determined future finite element indices on parent cells for
// coarsening
- std::map<typename hp::DoFHandler<dim, spacedim>::cell_iterator,
- unsigned int>
+ std::map<typename DoFHandler<dim, spacedim>::cell_iterator, unsigned int>
future_fe_indices_on_coarsened_cells;
// deep copy error indicators
if (dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation()))
{
- auto pack = [](
- const typename dealii::hp::DoFHandler<dim, spacedim>::
- active_cell_iterator &cell) -> std::pair<bool, bool> {
+ auto pack =
+ [](const typename dealii::DoFHandler<dim,
+ spacedim>::active_cell_iterator
+ &cell) -> std::pair<bool, bool> {
return {cell->coarsen_flag_set(), cell->future_fe_index_set()};
};
- auto unpack = [&ghost_buffer](
- const typename dealii::hp::DoFHandler<dim, spacedim>::
- active_cell_iterator & cell,
- const std::pair<bool, bool> pair) -> void {
+ auto unpack =
+ [&ghost_buffer](const typename dealii::DoFHandler<dim, spacedim>::
+ active_cell_iterator & cell,
+ const std::pair<bool, bool> pair) -> void {
ghost_buffer.emplace(cell->id(), pair);
};
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage ("You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage ("You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception 2!
-DEAL::ExcMessage ("You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
DEAL::Yes, exception 1!
-DEAL::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.")
+DEAL::ExcMessage( "For DoFHandler objects in hp-mode, finite elements are only " "associated with active cells. Consequently, you can not ask " "for the active finite element on cells with children.")
DEAL::Yes, exception!
-DEAL::ExcMessage( "You cannot call this function on non-active cells " "of hp::DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")
+DEAL::ExcMessage( "You cannot call this function on non-active cells " "of DoFHandler objects unless you provide an explicit " "finite element index because they do not have naturally " "associated finite element spaces associated: degrees " "of freedom are only distributed on active cells for which " "the active_fe_index has been set.")