* are $x_{28}$ and $x_{40}$. Then, requiring that the finite element
* function be continuous is equivalent to requiring that $x_{12}=
* \frac 12 (x_{28}+x_{40})$. A similar situation occurs in the
- * context of hp adaptive finite element methods.
+ * context of hp-adaptive finite element methods.
* For example, when using Q1 and Q2 elements (i.e. using
* FE_Q(1) and FE_Q(2)) on the two marked cells of the mesh
* @image html hp-refinement-simple.png
* This scheme of first building a linear system and then eliminating
* constrained degrees of freedom is inefficient, and a bottleneck if there
* are many constraints and matrices are full, i.e. especially for 3d and/or
- * higher order or hp finite elements. Furthermore, it is impossible to
+ * higher order or hp-finite elements. Furthermore, it is impossible to
* implement for %parallel computations where a process may not have access
* to elements of the matrix. We therefore offer a second way of
* building linear systems, using the
* Condensation is an expensive operation, in particular if there
* are many constraints and/or if the matrix has many nonzero entries. Both
* is typically the case for 3d, or high polynomial degree computations, as
- * well as for hp finite element methods, see for example the @ref hp_paper
- * "hp paper". This is the case discussed in the hp tutorial program, @ref
+ * well as for hp-finite element methods, see for example the @ref hp_paper
+ * "hp-paper". This is the case discussed in the hp-tutorial program, @ref
* step_27 "step-27", as well as in step-22 and @ref step_31
* "step-31".
*
* </dd>
*
*
- * <dt class="glossary">@anchor hp_paper <b>%hp paper</b></dt>
- * <dd>The "hp paper" is a paper by W. Bangerth and O. Kayser-Herold, titled
+ * <dt class="glossary">@anchor hp_paper <b>%hp-paper</b></dt>
+ * <dd>The "hp-paper" is a paper by W. Bangerth and O. Kayser-Herold, titled
* "Data Structures and Requirements for hp Finite Element Software", that
* describes many of the algorithms and data structures used in the implementation
- * of the hp framework of deal.II. In particular, it summarizes many of the
- * tricky points that have to be considered for %hp finite elements using continuous
+ * of the hp-framework of deal.II. In particular, it summarizes many of the
+ * tricky points that have to be considered for %hp-finite elements using continuous
* elements.
*
* The full reference for this paper is as follows:
/**
- * @defgroup hp hp finite element support
+ * @defgroup hp hp-finite element support
*
- * Classes and functions that have to do with hp finite elements. The step-27
+ * Classes and functions that have to do with hp-finite elements. The step-27
* tutorial program gives an overview of how to use the classes in this
* namespace. A slightly more exotic application is given in step-46.
*
- * The hp namespace implements the algorithms and data structures used for
- * the hp framework in deal.II. An overview over the details of how these
+ * The hp-namespace implements the algorithms and data structures used for
+ * the hp-framework in deal.II. An overview over the details of how these
* algorithms work and what data structures are used is given in the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
*/
/**
- * @defgroup hpcollection hp Collections
+ * @defgroup hpcollection hp-Collections
*
- * In the implementation of the hp finite element method, each cell might have
+ * In the implementation of the hp-finite element method, each cell might have
* a different finite element associated with it. To handle this, the
* hp::DoFHandler must have a whole set of finite element classes associated
* with it. This concept is represented by the hp::FECollection class: Objects
* element object. This same observation also holds for the other collection
* classes.
*
- * It is customary that within an hp finite element program, one keeps
+ * It is customary that within an hp-finite element program, one keeps
* collections of finite elements and quadrature formulas with the same number
* of elements, each element of the one collection matching the element in the
* other. This is not necessary, but it often makes coding a lot simpler. If a
* collection of mappings is used, the same holds for hp::MappingCollection
* objects as well.
*
- * Whenever p adaptivity is considered in an hp finite element program,
+ * Whenever p-adaptivity is considered in an hp-finite element program,
* a hierarchy of finite elements needs to be established to determine
* succeeding finite elements for refinement and preceding ones for coarsening.
* Typically, this hierarchy considers how finite element spaces are nested:
/**
- * A namespace for the implementation of hp finite element specific algorithms
+ * A namespace for the implementation of hp-finite element specific algorithms
* and data structures.
*
* @ingroup hp
*
* The DoFHandler class and its associates are described in the @ref
* dofs module. In addition, there are specialized versions that can
- * handle multilevel and hp discretizations. These are described in
+ * handle multilevel and hp-discretizations. These are described in
* the @ref mg and @ref hp modules. Finite element methods frequently
* imply constraints on degrees of freedom, such as for hanging nodes
* or nodes at which boundary conditions apply; dealing with such
* array. The access granularity in terms of a <i>cell index</i> is controlled
* by the auxiliary field internal::MatrixFreeFunctions::DoFInfo::row_starts
* that is similar to the rowstart index in a compressed matrix storage. The
- * scheme supports variable lengths because we support hp adaptivity and index
+ * scheme supports variable lengths because we support hp-adaptivity and index
* indirections due to constraints that are contained in the main index
* array. Due to vectorization over cells, the access granularity would
* initially be in terms of <i>cell batches</i>. However, we must be able to
* </ol>
* </li>
*
- * <li>Information to extract the FE index in hp adaptive computations.</li>
+ * <li>Information to extract the FE index in hp-adaptive computations.</li>
* <li>Information about the 'first access' into a particular vector entry
* that is used to zero out the entries in a destination vectors within the
* MatrixFree::loop shortly before accessing them the first time. This is used
* element. We use an auxiliary index array that points to the start of the
* data for each cell, namely the `data_index_offsets` field for the
* Jacobians, JxW values, and normal vectors, and `quadrature_point_offsets`
- * for the quadrature points. This offset enables hp adaptivity with variable
+ * for the quadrature points. This offset enables hp-adaptivity with variable
* lengths of fields similar to what is done for DoFInfo, but it also enables
* something we call <i>geometry compression</i>. In order to reduce the data
* access, we detect simple geometries of cells where Jacobians are constant
*
* <tr valign="top">
* <td>step-27</td>
- * <td> The hp finite element method.
+ * <td> The hp-finite element method.
* <br/> Keywords: hp::DoFHandler, hp::FECollection, hp::QCollection,
* FESeries::Fourier, Triangulation::create_triangulation()
* </td></tr>
* </tr>
*
* <tr valign="top">
- * <td> hp finite elements
+ * <td> hp-finite elements
* </td>
* <td>
* step-27,
program should do, not exactly how all this is going to happen.
In deal.II, the $hp$ functionality is largely packaged into
-the hp namespace. This namespace provides classes that handle
+the hp-namespace. This namespace provides classes that handle
$hp$ discretizations, assembling matrices and vectors, and other
tasks. We will get to know many of them further down below. In
addition, most of the functions in the DoFTools, and VectorTools
It may be worth giving a slightly larger perspective at the end of
this first part of the introduction. $hp$ functionality has been
implemented in a number of different finite element packages (see, for
-example, the list of references cited in the @ref hp_paper "hp paper").
+example, the list of references cited in the @ref hp_paper "hp-paper").
However, by and large, most of these packages have implemented it only
for the (i) the 2d case, and/or (ii) the discontinuous Galerkin
method. The latter is a significant simplification because
constraints (similar to hanging node constraints) of elements of
different degree meeting at a face or edge. The many algorithmic and
data structure techniques necessary for this are described in the
-@ref hp_paper "hp paper" for those interested in such detail.
+@ref hp_paper "hp-paper" for those interested in such detail.
We hope that providing such a general implementation will help explore
the potential of $hp$ methods further.
-<h3>Assembling matrices and vectors with hp objects</h3>
+<h3>Assembling matrices and vectors with hp-objects</h3>
Following this, we have to set up matrices and vectors for the linear system
of the correct size and assemble them. Setting them up works in exactly the
-<h3>A simple indicator for hp refinement and estimating smoothness</h3>
+<h3>A simple indicator for hp-refinement and estimating smoothness</h3>
One of the central pieces of the adaptive finite element method is that we
inspect the computed solution (a posteriori) with an indicator that tells us
In any case, as long as the decision is only "refine this cell" or "do not
refine this cell", the actual refinement step is not particularly
-challenging. However, here we have a code that is capable of hp refinement,
+challenging. However, here we have a code that is capable of hp-refinement,
i.e. we suddenly have two choices whenever we detect that the error on a
certain cell is too large for our liking: we can refine the cell by splitting
it into several smaller ones, or we can increase the polynomial degree of the
-<h3>Complications with linear systems for hp discretizations</h3>
+<h3>Complications with linear systems for hp-discretizations</h3>
<h4>Creating the sparsity pattern</h4>
removing entries in the sparsity pattern corresponding to constrained degrees of
freedom does not have a large impact on the overall number of zeros explicitly
stored by the matrix. However, since as many as a third of the degrees of
-freedom may be constrained in an hp discretization (and, with higher degree
+freedom may be constrained in an hp-discretization (and, with higher degree
elements, these constraints can couple one DoF to as many as ten or twenty other
DoFs), it is worthwhile to take these constraints into consideration since the
resulting matrix will be much sparser (and, therefore, matrix-vector products or
-Using the hp finite element method for an elliptic problem.
+Using the hp-finite element method for an elliptic problem.
// This function is again a verbatim copy of what we already did in
// step-6. Despite function calls with exactly the same names and arguments,
// the algorithms used internally are different in some aspect since the
- // dof_handler variable here is an hp object.
+ // dof_handler variable here is an hp-object.
template <int dim>
void LaplaceProblem<dim>::setup_system()
{
requested refinement, using the requested isotropic and anisotropic flags.
</ol>
This approach is similar to the one we have used in step-27
-for hp refinement and
+for hp-refinement and
has the great advantage of flexibility: Any error indicator can be
used in the anisotropic process, i.e. if you have quite involved a posteriori
goal-oriented error indicators available you can use them as easily as a simple
number of vector components but have different polynomial degrees — this
smells very much like what one would do in $hp$ finite element methods, and it
is exactly what we are going to do here: we are going to (ab)use the classes
-and facilities of the hp namespace to assign different elements to different
+and facilities of the hp-namespace to assign different elements to different
cells. In other words, we will use collect the two finite elements in an
hp::FECollection, will integrate with an appropriate hp::QCollection using an
hp::FEValues object, and our DoFHandler will be in <i>hp</i>-mode. You
Before going on describing the testcase, let us clarify a bit <i>why</i> this
approach of extending the functions by zero to the entire domain and then
-mapping the problem on to the hp framework makes sense:
+mapping the problem on to the hp-framework makes sense:
- It makes things uniform: On all cells, the number of vector components is
the same (here, <code>2*dim+1</code>). This makes all sorts of
Secondly, we use an object of type DoFHandler operating in <i>hp</i>-mode. This
class needs to know which cells will use the Stokes and which the elasticity
finite element. At the beginning of each refinement cycle we will therefore
-have to walk over all cells and set the (in hp parlance) active FE index to
+have to walk over all cells and set the (in hp-parlance) active FE index to
whatever is appropriate in the current situation. While we can use symbolic
names for the material id, the active FE index is in fact a number that will
frequently be used to index into collections of objects (e.g. of type
* @endcode
*
*
- * <h3>Note on usage with DoFHandler with hp capabilities</h3>
+ * <h3>Note on usage with DoFHandler with hp-capabilities</h3>
*
- * Since data on DoFHandler objects with hp capabilities is associated with
+ * Since data on DoFHandler objects with hp-capabilities is associated with
* many different FiniteElement objects, each cell's data has to be
* processed with its corresponding `future_fe_index`. Further, if
* refinement is involved, data will be packed on the parent cell with its
* hp::FECollection::find_dominated_fe_extended() for more information).
*
* Transferring a solution across refinement works exactly like in the
- * non-hp case. However, when considering serialization, we also have to
+ * non-hp-case. However, when considering serialization, we also have to
* store the active_fe_indices in an additional step. A code snippet
* demonstrating serialization with the
* parallel::distributed::SolutionTransfer class with DoFHandler objects
- * with hp capabilities is provided in the following. Here VectorType is
+ * with hp-capabilities is provided in the following. Here VectorType is
* your favorite vector type, e.g. PETScWrappers::MPI::Vector,
* TrilinosWrappers::MPI::Vector, or corresponding block vectors.
*
* assembly and solving. In practice, determining this cost is of course
* not trivial since we don't solve on isolated cells, but on the entire
* mesh. In such cases, one could, for example, choose the weight equal
- * to the number of unknowns per cell (in the context of hp finite
+ * to the number of unknowns per cell (in the context of hp-finite
* element methods), or using a heuristic that estimates the cost on
* each cell depending on whether, for example, one has to run some
* expensive algorithm on some cells but not others (such as forming
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler object has hp capabilities enabled,
+ * However, when the relevant DoFHandler object has hp-capabilities enabled,
* different finite element objects may be used on different cells. On faces
* between two cells, as well as vertices, there may therefore be two sets
* of degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when hp capabilities are enabled, different finite element
+ * However, when hp-capabilities are enabled, different finite element
* objects may be used on different cells. On faces between two cells, as
* well as vertices, there may therefore be two sets of degrees of freedom,
* one for each of the finite elements used on the adjacent cells. In order
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when hp capabilities are enabled, different finite element
+ * However, when hp-capabilities are enabled, different finite element
* objects may be used on different cells. On faces between two cells, as
* well as vertices, there may therefore be two sets of degrees of freedom,
* one for each of the finite elements used on the adjacent cells. In order
/**
* Return the number of finite elements that are active on a given object.
*
- * When hp capabilities are disabled the answer is, of course, always one.
- * However, when hp capabilities are enabled, this isn't the case: If this
+ * When hp-capabilities are disabled the answer is, of course, always one.
+ * However, when hp-capabilities are enabled, this isn't the case: 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
/**
* Return the @p n-th active fe index on this object. For cells and all non-
- * hp objects, there is only a single active fe index, so the argument must
- * be equal to zero. For lower-dimensional hp objects, there are
+ * hp-objects, there is only a single active fe index, so the argument must
+ * be equal to zero. For lower-dimensional hp-objects, there are
* n_active_fe_indices() active finite elements, and this function can be
* queried for their indices.
*/
/**
* Return true if the finite element with given index is active on the
- * present object. When the current DoFHandler does not have hp
+ * present object. When the current DoFHandler does not have hp-
* capabilities, this is of course the case only if @p fe_index equals
* zero. For cells, it is the case if @p fe_index equals active_fe_index()
* of this cell. For faces and other lower- dimensional objects, there may
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* ::DoFHandler class, this value must be equal to its default value since
* that class only supports the same finite element on all cells anyway.
*
- * However, when the relevant DoFHandler has hp capabilities, different
+ * However, when the relevant DoFHandler has hp-capabilities, different
* finite element objects may be used on different cells. On faces between
* two cells, as well as vertices, there may therefore be two sets of
* degrees of freedom, one for each of the finite elements used on the
* we use the restriction matrices provided by the finite element class to
* compute the interpolation from the children to the present cell.
*
- * If the cell is part of a DoFHandler with hp capabilities, cells only have
+ * If the cell is part of a DoFHandler with hp-capabilities, cells only have
* an associated finite element space if they are active. However, this
* function is supposed to also provide information on inactive cells with
* children. Consequently, it carries a third argument that can be used in
- * the hp context that denotes the finite element space we are supposed to
+ * the hp-context that denotes the finite element space we are supposed to
* interpolate onto. If the cell is active, this function then obtains the
* finite element function from the <code>values</code> vector on this cell
* and interpolates it onto the space described by the
* the children of this cell. These requirements are not taken care of and
* must be enforced by the user afterward.
*
- * If the cell is part of a DoFHandler with hp capabilities, cells only have
+ * If the cell is part of a DoFHandler with hp-capabilities, cells only have
* an associated finite element space if they are active. However, this
* function is supposed to also work on inactive cells with children.
- * Consequently, it carries a third argument that can be used in the hp
+ * Consequently, it carries a third argument that can be used in the hp-
* context that denotes the finite element space we are supposed to
* interpret the input vector of this function in. If the cell is active,
* this function then interpolates the input vector interpreted as an
/**
* Return the finite element that is used on the cell pointed to by this
- * iterator. For DoFHandler objects without hp capabilities, this is of
+ * iterator. For DoFHandler objects without hp-capabilities, this is of
* course always the same element, independent of the cell we are presently
- * on, but for hp DoFHandler objects this may change from cell to cell.
+ * on, but for hp-DoFHandler objects this may change from cell to cell.
*
* @note Since degrees of freedom only exist on active cells for DoFHandler
- * objects with hp capabilities (i.e., there is currently no implementation
+ * objects with hp-capabilities (i.e., there is currently no implementation
* of multilevel such 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,
/**
* Return the index inside the hp::FECollection of the FiniteElement used
* for this cell. This function is only useful if the DoFHandler object
- * associated with the current cell has hp capabilities enabled.
+ * associated with the current cell has hp-capabilities enabled.
*
* @note Since degrees of freedom only exist on active cells for DoFHandler
- * objects with hp capabilities (i.e., there is currently no implementation
+ * objects with hp-capabilities (i.e., there is currently no implementation
* of multilevel such 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,
/**
* Set 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 has hp
+ * if the DoF handler object associated with the current cell has hp-
* capabilities enabled.
*
* @note Since degrees of freedom only exist on active cells for DoFHandler
- * objects with hp capabilities (i.e., there is currently no implementation
+ * objects with hp-capabilities (i.e., there is currently no implementation
* of multilevel such 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,
* active one will remain unchanged, in which case the active finite element
* will be returned.
*
- * For DoFHandlers without hp capabilities enabled, this is of course always
- * the same element, independent of the cell we are presently on, but for hp
+ * For DoFHandlers without hp-capabilities enabled, this is of course always
+ * the same element, independent of the cell we are presently on, but for hp-
* DoFHandler objects this may change from cell to cell.
*
* @note Since degrees of freedom only exist on active cells for DoFHandler
- * objects with hp capabilities (i.e., there is currently no implementation
+ * objects with hp-capabilities (i.e., there is currently no implementation
* of multilevel such 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,
* which case the fe_index of the active finite element will be returned.
*
* @note Since degrees of freedom only exist on active cells for DoFHandler
- * objects with hp capabilities (i.e., there is currently no implementation
+ * objects with hp-capabilities (i.e., there is currently no implementation
* of multilevel such 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,
* The whole process of working with objects of this type is explained in
* step-27. Many of the algorithms this class implements are described in
* the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
*
*
* <h3>Active FE indices and their behavior under mesh refinement</h3>
distribute_mg_dofs();
/**
- * Returns whether this DoFHandler has hp capabilities.
+ * Returns whether this DoFHandler has hp-capabilities.
*/
bool
has_hp_capabilities() const;
/**
* Exception used when a certain feature doesn't make sense when
- * DoFHandler does not hp capabilities.
+ * DoFHandler does not hp-capabilities.
*/
DeclExceptionMsg(ExcNotAvailableWithoutHP,
"The current function doesn't make sense when used with a "
- "DoFHandler without hp capabilities.");
+ "DoFHandler without hp-capabilities.");
/**
* Exception used when a certain feature is not implemented when the
- * DoFHandler has hp capabilities.
+ * DoFHandler has hp-capabilities.
*/
DeclExceptionMsg(ExcNotImplementedWithHP,
"The current function has not yet been implemented for a "
- "DoFHandler with hp capabilities.");
+ "DoFHandler with hp-capabilities.");
private:
/**
BlockInfo block_info_object;
/**
- * Boolean indicating whether or not the current DoFHandler has hp
+ * Boolean indicating whether or not the current DoFHandler has hp-
* capabilities.
*/
bool hp_capability_enabled;
* relevant active finite elements.
*
* @note In normal mode it is possible to access this data strucutre directly.
- * In hp mode, an indirection via hp_object_fe_indices/hp_object_fe_ptr is
+ * In hp-mode, an indirection via hp_object_fe_indices/hp_object_fe_ptr is
* necessary.
*/
mutable std::vector<std::array<std::vector<offset_type>, dim + 1>>
/**
* Active fe index of an active cell (identified by level and level index).
- * This vector is only used in hp mode.
+ * This vector is only used in hp-mode.
*/
mutable std::vector<std::vector<active_fe_index_type>>
hp_cell_active_fe_indices;
/**
* Future fe index of an active cell (identified by level and level index).
- * This vector is only used in hp mode.
+ * This vector is only used in hp-mode.
*/
mutable std::vector<std::vector<active_fe_index_type>>
hp_cell_future_fe_indices;
*
* The third argument, @p fe_index, must equal zero. It is otherwise
* unused, but we retain the argument so that we can use the same
- * interface for non-hp and hp finite element methods, in effect making
- * it possible to share the DoFAccessor class hierarchy between hp and
- * non-hp classes.
+ * interface for non-hp- and hp-finite element methods, in effect making
+ * it possible to share the DoFAccessor class hierarchy between hp- and
+ * non-hp-classes.
*/
template <int dh_dim, int spacedim>
void
*
* The third argument, @p fe_index, must equal zero. It is otherwise
* unused, but we retain the argument so that we can use the same
- * interface for non-hp and hp finite element methods, in effect making
- * it possible to share the DoFAccessor class hierarchy between hp and
- * non-hp classes.
+ * interface for non-hp- and hp-finite element methods, in effect making
+ * it possible to share the DoFAccessor class hierarchy between hp- and
+ * non-hp-classes.
*/
template <int dh_dim, int spacedim>
types::global_dof_index
Assert((fe_index ==
dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage("Only zero fe_index values are allowed for "
- "non-hp DoFHandlers."));
+ "non-hp-DoFHandlers."));
return true;
}
Assert(
(fe_index == dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage(
- "Only the default FE index is allowed for non-hp DoFHandler objects"));
+ "Only the default FE index is allowed for non-hp-DoFHandler objects"));
Assert(
local_index < dof_handler.get_fe().template n_dofs_per_object<dim>(),
ExcIndexRange(local_index,
const ComponentMask &mask = ComponentMask());
/**
- * Same as the previous function but for the hp case.
+ * Same as the previous function but for the hp-case.
*/
template <int dim, int spacedim>
void
const ComponentMask & mask = ComponentMask());
/**
- * Same as the previous function but for the hp case.
+ * Same as the previous function but for the hp-case.
*/
template <int dim, int spacedim>
void
* particular feature is implemented. An example is whether an element
* implements the information necessary to use it in the $hp$ finite element
* context (see
- * @ref hp "hp finite element support").
+ * @ref hp "hp-finite element support").
*
*
* <h3>Nomenclature</h3>
* neighboring (but differently refined) cells. The case that the finite
* element spaces on different sides of a face are different, i.e., the $hp$
* case (see
- * @ref hp "hp finite element support")
+ * @ref hp "hp-finite element support")
* is handled by separate functions. See the
* FiniteElement::get_face_interpolation_matrix() and
* FiniteElement::get_subface_interpolation_matrix() functions.
/**
* This operator returns a reference to the present object if the argument
* given equals to zero. While this does not seem particularly useful, it is
- * helpful in writing code that works with both ::DoFHandler and the hp
+ * helpful in writing code that works with both ::DoFHandler and the hp-
* version hp::DoFHandler, since one can then write code like this:
* @code
* dofs_per_cell =
* doesn't offer a <code>dofs_per_cell</code> member variable: one first has
* to select which finite element to work on, which is done using the
* operator[]. Fortunately, <code>cell-@>active_fe_index()</code> also works
- * for non-hp classes and simply returns zero in that case. The present
+ * for non-hp-classes and simply returns zero in that case. The present
* operator[] accepts this zero argument, by returning the finite element
* with index zero within its collection (that, of course, consists only of
* the present finite element anyway).
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible". That
+ * the new way, which has to be used to make elements "hp-compatible". That
* means, the element properly implements the get_face_interpolation_matrix
* and get_subface_interpolation_matrix methods. Therefore the return value
* also indicates whether a call to the get_face_interpolation_matrix()
*
* Currently the main purpose of this function is to allow the
* make_hanging_node_constraints method to decide whether the new
- * procedures, which are supposed to work in the hp framework can be used,
- * or if the old well verified but not hp capable functions should be used.
+ * procedures, which are supposed to work in the hp-framework can be used,
+ * or if the old well verified but not hp-capable functions should be used.
* Once the transition to the new scheme for computing the interface
* constraints is complete, this function will be superfluous and will
* probably go away.
*
* Derived classes should implement this function accordingly. The default
- * assumption is that a finite element does not provide hp capable face
+ * assumption is that a finite element does not provide hp-capable face
* interpolation, and the default implementation therefore returns @p false.
*/
virtual bool
/**
- * @name Functions to support hp
+ * @name Functions to support hp-
* @{
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
*
* For a definition of domination, see FiniteElementDomination::Domination
* and in particular the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
*/
virtual FiniteElementDomination::Domination
compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
* Q(k') if $k\le k'$.
*
* This enum is used in the FiniteElement::compare_for_domination() function
- * that is used in the context of hp finite element methods when determining
+ * that is used in the context of hp-finite element methods when determining
* what to do at faces where two different finite elements meet (see the
- * @ref hp_paper "hp paper"
+ * @ref hp_paper "hp-paper"
* for a more detailed description of the following). In that case, the
* degrees of freedom of one side need to be constrained to those on the
* other side. The determination which side is which is based on the outcome
* to the dominating one.
*
* Note that there are situations where neither side dominates. The
- * @ref hp_paper "hp paper"
+ * @ref hp_paper "hp-paper"
* lists two case, with the simpler one being that a $Q_2\times Q_1$ vector-
* valued element (i.e. a <code>FESystem(FE_Q(2),1,FE_Q(1),1)</code>) meets
* a $Q_1\times Q_2$ element: here, for each of the two vector-components,
* could also be used by discontinuous elements, for example.
*
* More details on domination can be found in the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
*/
enum Domination
{
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*/
virtual bool
hp_constraints_are_implemented() const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_DGP class the result is always true (independent of the degree
* of the element), as it has no hanging nodes (being a discontinuous
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_DGPMonomial class the result is always true (independent of
* the degree of the element), as it has no hanging nodes (being a
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_DGPNonparametric class the result is always true (independent
* of the degree of the element), as it has no hanging nodes (being a
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_DGQ class the result is always true (independent of the degree
* of the element), as it has no hanging nodes (being a discontinuous
*
* In most applications it is beneficial to introduce enrichments only in
* some part of the domain (e.g. around a crack tip) and use standard FE (e.g.
- * FE_Q) elsewhere. This can be achieved by using the hp finite element
+ * FE_Q) elsewhere. This can be achieved by using the hp-finite element
* framework in deal.II that allows for the use of different elements on
* different cells. To make the resulting space $C^0$ continuous, it is then
* necessary for the DoFHandler class and
* element within a DoFHandler with hp-capabilities.
*
* See the discussion in the class documentation on how to use this element
- * in the context of hp finite element methods.
+ * in the context of hp-finite element methods.
*/
FE_Enriched(const FiniteElement<dim, spacedim> &fe_base);
*/
/**
- * Return whether this element implements hp constraints.
+ * Return whether this element implements hp-constraints.
*
* This function returns @p true if and only if all its base elements return @p true
* for this function.
const unsigned int face_no = 0) const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
*/
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*/
virtual bool
hp_constraints_are_implemented() const override;
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*/
virtual bool
hp_constraints_are_implemented() const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*/
virtual bool
hp_constraints_are_implemented() const override;
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the <tt>FE_Nedelec</tt> class the result is always true (independent
* of the degree of the element), as it implements the complete set of
- * functions necessary for hp capability.
+ * functions necessary for hp-capability.
*/
virtual bool
hp_constraints_are_implemented() const override;
const unsigned int codim = 0) const override final;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
* Definition of a finite element space with zero degrees of freedom and that,
* consequently, can only represent a single function: the zero function.
*
- * This class is useful (in the context of an hp method) to represent empty
+ * This class is useful (in the context of an hp-method) to represent empty
* cells in the triangulation on which no degrees of freedom should be
* allocated, or to describe a field that is extended by zero to a part of the
* domain where we don't need it. Thus a triangulation may be divided into two
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_Q class the result is always true (independent of the degree
* of the element), as it implements the complete set of functions necessary
- * for hp capability.
+ * for hp-capability.
*/
virtual bool
hp_constraints_are_implemented() const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* For the FE_Q_Hierarchical class the result is always true (independent of
* the degree of the element), as it implements the complete set of
- * functions necessary for hp capability.
+ * functions necessary for hp-capability.
*/
virtual bool
hp_constraints_are_implemented() const override;
RefinementCase<dim>::isotropic_refinement) const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*
* This function returns @p true if and only if all its base elements return
* @p true for this function.
const unsigned int face_no = 0) const override;
/**
- * If, on a vertex, several finite elements are active, the hp code first
+ * If, on a vertex, several finite elements are active, the hp-code first
* assigns the degrees of freedom of each of these FEs different global
* indices. It then calls this function to find out which of them should get
* identical values, and consequently can receive the same global DoF index.
/**
* Return whether this element implements its hanging node constraints in
- * the new way, which has to be used to make elements "hp compatible".
+ * the new way, which has to be used to make elements "hp-compatible".
*/
virtual bool
hp_constraints_are_implemented() const override;
*
* Though it seems that it is not very useful, this function is there to
* provide capability to the hp::FEValues class, in which case it provides
- * the FEValues object for the present cell (remember that for hp finite
+ * the FEValues object for the present cell (remember that for hp-finite
* elements, the actual FE object used may change from cell to cell, so we
* also need different FEValues objects for different cells; once you
* reinitialize the hp::FEValues object for a specific cell, it retrieves
*
* Though it seems that it is not very useful, this function is there to
* provide capability to the hp::FEValues class, in which case it provides
- * the FEValues object for the present cell (remember that for hp finite
+ * the FEValues object for the present cell (remember that for hp-finite
* elements, the actual FE object used may change from cell to cell, so we
* also need different FEValues objects for different cells; once you
* reinitialize the hp::FEValues object for a specific cell, it retrieves
*
* Though it seems that it is not very useful, this function is there to
* provide capability to the hp::FEValues class, in which case it provides
- * the FEValues object for the present cell (remember that for hp finite
+ * the FEValues object for the present cell (remember that for hp-finite
* elements, the actual FE object used may change from cell to cell, so we
* also need different FEValues objects for different cells; once you
* reinitialize the hp::FEValues object for a specific cell, it retrieves
/**
* Another version where we use that mapping on a given
* cell that corresponds to the active finite element index of that cell.
- * This is obviously only useful for hp problems, since the active finite
+ * This is obviously only useful for hp-problems, since the active finite
* element index for all other DoF handlers is always zero.
*/
template <int dim, int spacedim>
* The whole process of working with objects of this type is explained in
* step-27. Many of the algorithms this class implements are described in
* the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
*
*
* <h3>Active FE indices and their behavior under mesh refinement</h3>
{
public:
/**
- * Whenever p adaptivity is considered in an hp finite element program,
+ * Whenever p-adaptivity is considered in an hp-finite element program,
* a hierarchy of finite elements needs to be established to determine
* succeeding finite elements for refinement and preceding ones for
* coarsening.
/**
* Return whether all elements in this collection implement the hanging
* node constraints in the new way, which has to be used to make elements
- * "hp compatible". If this is not the case, the function returns false,
+ * "hp-compatible". If this is not the case, the function returns false,
* which implies, that at least one element in the FECollection does not
* support the new face interface constraints. On the other hand, if this
- * method does return true, this does not imply that the hp method will
+ * method does return true, this does not imply that the hp-method will
* work!
*
* This behavior is related to the fact, that FiniteElement classes,
* second the dimensionality of the object that we integrate on, i.e. for
* usual @p hp::FEValues it is equal to the first one, while for face
* integration it is one less. The third template parameter indicates the
- * type of underlying non-hp FE*Values base type, i.e. it could either be
+ * type of underlying non-hp-FE*Values base type, i.e. it could either be
* ::FEValues, ::FEFaceValues, or ::FESubfaceValues.
*
* @ingroup hp
namespace hp
{
/**
- * An hp equivalent of the ::FEValues class. See the step-27 tutorial
+ * An hp-equivalent of the ::FEValues class. See the step-27 tutorial
* program for examples of use.
*
* The idea of this class is as follows: when one assembled matrices in the
- * hp finite element method, there may be different finite elements on
+ * hp-finite element method, there may be different finite elements on
* different cells, and consequently one may also want to use different
* quadrature formulas for different cells. On the other hand, the
* ::FEValues efficiently handles pre-evaluating whatever information is
* ::FEValues object that then fits the finite element and quadrature
* formula for the current cell can then be accessed using the
* get_present_fe_values() function, and one would work with it just like
- * with any ::FEValues object for non-hp DoF handler objects.
+ * with any ::FEValues object for non-hp-DoFHandler objects.
*
* The reinit() functions have additional arguments with default values. If
* not specified, the function takes the index into the hp::FECollection,
* quadrature formula for each finite element in the hp::FECollection. As
* a special case, if the quadrature collection contains only a single
* element (a frequent case if one wants to use the same quadrature object
- * for all finite elements in an hp discretization, even if that may not
+ * for all finite elements in an hp-discretization, even if that may not
* be the most efficient), then this single quadrature is used unless a
* different value for this argument is specified. On the other hand, if a
* value is given for this argument, it overrides the choice of
* <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
* the finite element. As above, if the mapping collection contains only a
* single element (a frequent case if one wants to use a $Q_1$ mapping for
- * all finite elements in an hp discretization), then this single mapping
+ * all finite elements in an hp-discretization), then this single mapping
* is used unless a different value for this argument is specified.
*/
template <bool lda>
* quadrature formula for each finite element in the hp::FECollection. As
* a special case, if the quadrature collection contains only a single
* element (a frequent case if one wants to use the same quadrature object
- * for all finite elements in an hp discretization, even if that may not
+ * for all finite elements in an hp-discretization, even if that may not
* be the most efficient), then this single quadrature is used unless a
* different value for this argument is specified. On the other hand, if a
* value is given for this argument, it overrides the choice of
* <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
* the finite element. As above, if the mapping collection contains only a
* single element (a frequent case if one wants to use a $Q_1$ mapping for
- * all finite elements in an hp discretization), then this single mapping
+ * all finite elements in an hp-discretization), then this single mapping
* is used unless a different value for this argument is specified.
*/
template <bool lda>
* quadrature formula for each finite element in the hp::FECollection. As
* a special case, if the quadrature collection contains only a single
* element (a frequent case if one wants to use the same quadrature object
- * for all finite elements in an hp discretization, even if that may not
+ * for all finite elements in an hp-discretization, even if that may not
* be the most efficient), then this single quadrature is used unless a
* different value for this argument is specified. On the other hand, if a
* value is given for this argument, it overrides the choice of
* <code>cell-@>active_fe_index()</code>, i.e. the same index as that of
* the finite element. As above, if the mapping collection contains only a
* single element (a frequent case if one wants to use a $Q_1$ mapping for
- * all finite elements in an hp discretization), then this single mapping
+ * all finite elements in an hp-discretization), then this single mapping
* is used unless a different value for this argument is specified.
*/
template <bool lda>
*
* @note The function Triangulation::prepare_coarsening_and_refinement()
* will clean up all h-coarsening flags if they are not shared among
- * all siblings. In the hp case, we need to bring forward this decision:
+ * all siblings. In the hp-case, we need to bring forward this decision:
* If the cell will not be coarsened, but qualifies for p-adaptivity,
* we have to set all flags accordingly. So this function anticipates
* the decision that Triangulation::prepare_coarsening_and_refinement()
*
* The algorithms used in the implementation of this class are described in
* some detail in the
- * @ref hp_paper "hp paper".
+ * @ref hp_paper "hp-paper".
* There is also a significant amount of documentation on how to use this
* class in the
* @ref constraints
* sparsity pattern entries.
*
* As explained in the
- * @ref hp_paper "hp paper"
+ * @ref hp_paper "hp-paper"
* and in step-27, first allocating a sparsity pattern and later coming back
* and allocating additional entries for those matrix entries that will be
* written to due to the elimination of constrained degrees of freedom
clear();
/**
- * Return the FE index for a given finite element degree. If not in hp
+ * Return the FE index for a given finite element degree. If not in hp-
* mode, this function always returns index 0. If an index is not found
- * in hp mode, it returns numbers::invalid_unsigned_int.
+ * in hp-mode, it returns numbers::invalid_unsigned_int.
*/
unsigned int
fe_index_from_degree(const unsigned int first_selected_component,
* account. This information is encoded in the row_starts variables
* directly.
*
- * The outer vector goes through the various fe indices in the hp case,
+ * The outer vector goes through the various fe indices in the hp-case,
* similarly to the @p dofs_per_cell variable.
*/
std::vector<std::vector<unsigned int>> component_dof_indices_offset;
bool store_plain_indices;
/**
- * Stores the index of the active finite element in the hp case.
+ * Stores the index of the active finite element in the hp-case.
*/
std::vector<unsigned int> cell_active_fe_index;
/**
- * Stores the maximum degree of different finite elements for the hp
+ * Stores the maximum degree of different finite elements for the hp-
* case.
*/
unsigned int max_fe_index;
/**
- * To each of the slots in an hp adaptive case, the inner vector stores
+ * To each of the slots in an hp-adaptive case, the inner vector stores
* the corresponding element degree. This is used by the constructor of
- * FEEvaluationBase to identify the correct data slot in the hp case.
+ * FEEvaluationBase to identify the correct data slot in the hp-case.
*/
std::vector<std::vector<unsigned int>> fe_index_conversion;
get_current_cell_index() const;
/**
- * Return the active fe index for this class for efficient indexing in the hp
+ * Return the active fe index for this class for efficient indexing in the hp-
* case.
*/
unsigned int
/**
* Return the active quadrature index for this class for efficient indexing in
- * the hp case.
+ * the hp-case.
*/
unsigned int
get_active_quadrature_index() const;
VectorizedArrayType> *mapping_data;
/**
- * The active fe index for this class for efficient indexing in the hp case.
+ * The active fe index for this class for efficient indexing in the hp-case.
*/
const unsigned int active_fe_index;
/**
* The active quadrature index for this class for efficient indexing in the
- * hp case.
+ * hp-case.
*/
const unsigned int active_quad_index;
* The third component is a descriptor of data from the unit cells, called
* QuadratureDescriptor, which contains the quadrature weights and
* permutations of how to go through quadrature points in case of face
- * data. The latter comes in a vector for the support of hp adaptivity,
+ * data. The latter comes in a vector for the support of hp-adaptivity,
* with several data fields for the individual quadrature formulas.
*
* @ingroup matrixfree
/**
* A class describing the layout of the sections in the @p data_storage
* field and also includes some data that depends on the number of
- * quadrature points in the hp context such as the inner quadrature
+ * quadrature points in the hp-context such as the inner quadrature
* formula and re-indexing for faces that are not in the standard
* orientation.
*/
/**
* Returns the quadrature index for a given number of quadrature
- * points. If not in hp mode or if the index is not found, this
+ * points. If not in hp-mode or if the index is not found, this
* function always returns index 0. Hence, this function does not
* check whether the given degree is actually present.
*/
/**
* Internal function to compute the geometry for the case the mapping is
- * a MappingQ and a single quadrature formula per slot (non-hp case) is
+ * a MappingQ and a single quadrature formula per slot (non-hp-case) is
* used. This method computes all data from the underlying cell
* quadrature points using the fast operator evaluation techniques from
* the matrix-free framework itself, i.e., it uses a polynomial
}
}
- // In case we have no hp adaptivity (active_fe_index is empty), we have
+ // In case we have no hp-adaptivity (active_fe_index is empty), we have
// cells, and the mapping is MappingQGeneric or a derived class, we can
// use the fast method.
if (active_fe_index.empty() && !cells.empty() && mapping->size() == 1 &&
GeometryType cell_t_prev = general;
// fe_values object that is used to compute the mapping data. for
- // the hp case there might be more than one finite element. since we
+ // the hp-case there might be more than one finite element. since we
// manually select the active FE index and not via a
// DoFHandler<dim>::active_cell_iterator, we need to manually
// select the correct finite element, so just hold a vector of
++my_q)
{
#ifndef DEAL_II_WITH_SIMPLEX_SUPPORT
- // currently only non-hp case...
+ // currently only non-hp-case...
AssertDimension(mapping_in.size(), 1);
AssertDimension(mapping_info.face_data[my_q].descriptor.size(),
1);
* The two parameters `cell_vectorization_categories` and
* `cell_vectorization_categories_strict` control the formation of batches
* for vectorization over several cells. It is used implicitly when working
- * with hp adaptivity but can also be useful in other contexts, such as in
+ * with hp-adaptivity but can also be useful in other contexts, such as in
* local time stepping where one would like to control which elements
* together form a batch of cells. The array `cell_vectorization_categories`
* is accessed by the number given by cell->active_cell_index() when working
/**
* This data structure allows to assign a fraction of cells to different
* categories when building the information for vectorization. It is used
- * implicitly when working with hp adaptivity but can also be useful in
+ * implicitly when working with hp-adaptivity but can also be useful in
* other contexts, such as in local time stepping where one would like to
* control which elements together form a batch of cells.
*
DataAccessOnFaces::unspecified) const;
/**
- * In the hp adaptive case, a subrange of cells as computed during the cell
+ * In the hp-adaptive case, a subrange of cells as computed during the cell
* loop might contain elements of different degrees. Use this function to
* compute what the subrange for an individual finite element degree is. The
* finite element degree is associated to the vector component given in the
const unsigned int dof_handler_index = 0) const;
/**
- * In the hp adaptive case, a subrange of cells as computed during the cell
+ * In the hp-adaptive case, a subrange of cells as computed during the cell
* loop might contain elements of different degrees. Use this function to
- * compute what the subrange for a given index the hp finite element, as
+ * compute what the subrange for a given index the hp-finite element, as
* opposed to the finite element degree in the other function.
*/
std::pair<unsigned int, unsigned int>
const unsigned int dof_handler_index = 0) const;
/**
- * In the hp adaptive case, a subrange of internal faces as computed during
+ * In the hp-adaptive case, a subrange of internal faces as computed during
* loop() might contain internal faces with elements of different active
* fe indices. Use this function to compute what the subrange for a given pair
* of active fe indices is.
const unsigned int dof_handler_index = 0) const;
/**
- * In the hp adaptive case, a subrange of boundary faces as computed during
+ * In the hp-adaptive case, a subrange of boundary faces as computed during
* loop() might contain boundary faces with elements of different active
* fe indices. Use this function to compute what the subrange for a given
* active fe indices is.
const unsigned int dof_handler_index = 0) const;
/**
- * In the hp adaptive case, return number of active_fe_indices.
+ * In the hp-adaptive case, return number of active_fe_indices.
*/
unsigned int
n_active_fe_indices() const;
/**
- * In the hp adaptive case, return the active_fe_index of a cell range.
+ * In the hp-adaptive case, return the active_fe_index of a cell range.
*/
unsigned int
get_cell_active_fe_index(
const std::pair<unsigned int, unsigned int> range) const;
/**
- * In the hp adaptive case, return the active_fe_index of a face range.
+ * In the hp-adaptive case, return the active_fe_index of a face range.
*/
unsigned int
get_face_active_fe_index(const std::pair<unsigned int, unsigned int> range,
n_active_entries_per_face_batch(const unsigned int face_batch_index) const;
/**
- * Return the number of degrees of freedom per cell for a given hp index.
+ * Return the number of degrees of freedom per cell for a given hp-index.
*/
unsigned int
get_dofs_per_cell(const unsigned int dof_handler_index = 0,
const unsigned int hp_active_fe_index = 0) const;
/**
- * Return the number of quadrature points per cell for a given hp index.
+ * Return the number of quadrature points per cell for a given hp-index.
*/
unsigned int
get_n_q_points(const unsigned int quad_index = 0,
/**
* Return the number of degrees of freedom on each face of the cell for
- * given hp index.
+ * given hp-index.
*/
unsigned int
get_dofs_per_face(const unsigned int dof_handler_index = 0,
/**
* Return the number of quadrature points on each face of the cell for
- * given hp index.
+ * given hp-index.
*/
unsigned int
get_n_q_points_face(const unsigned int quad_index = 0,
const unsigned int hp_active_fe_index = 0) const;
/**
- * Return the quadrature rule for given hp index.
+ * Return the quadrature rule for given hp-index.
*/
const Quadrature<dim> &
get_quadrature(const unsigned int quad_index = 0,
const unsigned int hp_active_fe_index = 0) const;
/**
- * Return the quadrature rule for given hp index.
+ * Return the quadrature rule for given hp-index.
*/
const Quadrature<dim - 1> &
get_face_quadrature(const unsigned int quad_index = 0,
/**
* Return the category the current batch of cells was assigned to. Categories
* run between the given values in the field
- * AdditionalData::cell_vectorization_category for non-hp DoFHandler types
+ * AdditionalData::cell_vectorization_category for non-hp-DoFHandler types
* and return the active FE index in the hp-adaptive case.
*/
unsigned int
constraint_pool_end(const unsigned int pool_index) const;
/**
- * Return the unit cell information for given hp index.
+ * Return the unit cell information for given hp-index.
*/
const internal::MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> &
get_shape_info(const unsigned int dof_handler_index_component = 0,
Assert(
fe_indices[i] >= fe_indices[i - 1],
ExcMessage(
- "Cell range must be over sorted range of fe indices in hp case!"));
+ "Cell range must be over sorted range of fe indices in hp-case!"));
AssertIndexRange(range.first, fe_indices.size() + 1);
AssertIndexRange(range.second, fe_indices.size() + 1);
#endif
{
if (dof_handler.size() > 1)
{
- // check if all DoHandlers are in the same hp mode; and if hp
+ // check if all DoHandlers are in the same hp-mode; and if hp-
// capabilities are enabled: check if active_fe_indices of all
// DoFHandler are the same.
for (unsigned int i = 1; i < dof_handler.size(); ++i)
* interleaving cell and face integrals.
*
* @param categories_are_hp Defines whether
- * `cell_vectorization_categories` is originating from a hp adaptive
+ * `cell_vectorization_categories` is originating from a hp-adaptive
* computation with variable polynomial degree or a user-defined
* variant.
*
* some SIMD lanes in VectorizedArray would not be filled for a given
* cell batch index.
*
- * @param hp_bool Defines whether we are in hp mode or not
+ * @param hp_bool Defines whether we are in hp-mode or not
*/
void
make_thread_graph_partition_color(
* some SIMD lanes in VectorizedArray would not be filled for a given
* cell batch index.
*
- * @param hp_bool Defines whether we are in hp mode or not
+ * @param hp_bool Defines whether we are in hp-mode or not
*/
void
make_thread_graph_partition_partition(
* some SIMD lanes in VectorizedArray would not be filled for a given
* cell batch index.
*
- * @param hp_bool Defines whether we are in hp mode or not
+ * @param hp_bool Defines whether we are in hp-mode or not
*/
void
make_thread_graph(const std::vector<unsigned int> &cell_active_fe_index,
/**
- * Class for transfer between two multigrid levels for p or global coarsening.
+ * Class for transfer between two multigrid levels for p- or global coarsening.
*/
template <int dim, typename VectorType>
class MGTwoLevelTransfer
/**
- * Class for transfer between two multigrid levels for p or global coarsening.
+ * Class for transfer between two multigrid levels for p- or global coarsening.
* Specialization for LinearAlgebra::distributed::Vector.
*/
template <int dim, typename Number>
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
/**
* Equivalent to the set of functions above, except that this one takes a
- * quadrature collection for hp finite element dof handlers.
+ * quadrature collection for hp-finite element dof handlers.
*/
template <typename InputVector>
static void
* needs not allocate memory itself, or synchronize with other threads.
*
* The sizes of the arrays are initialized with the maximal number of
- * entries necessary for the hp case. Within the loop over individual
+ * entries necessary for the hp-case. Within the loop over individual
* cells, we then resize the arrays as necessary. Since for std::vector
* resizing to a smaller size doesn't imply memory allocation, this is
* fast.
/**
* Resize the arrays so that they fit the number of quadrature points
- * associated with the given finite element index into the hp
+ * associated with the given finite element index into the hp-
* collections.
*/
void
ExcInternalError());
// get restriction of finite element function of @p{neighbor} to the
- // common face. in the hp case, use the quadrature formula that
+ // common face. in the hp-case, use the quadrature formula that
// matches the one we would use for the present cell
fe_face_values_neighbor.reinit(neighbor,
neighbor_neighbor,
const AffineConstraints<number> &constraints = AffineConstraints<number>());
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
const AffineConstraints<number> &constraints = AffineConstraints<number>());
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
const AffineConstraints<number> &constraints = AffineConstraints<number>());
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
const AffineConstraints<number> &constraints = AffineConstraints<number>());
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
std::vector<unsigned int> component_mapping = {});
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
std::vector<unsigned int> component_mapping = {});
/**
- * Same function as above, but for hp objects.
+ * Same function as above, but for hp-objects.
*/
template <int dim, int spacedim, typename number>
void
const AffineConstraints<double> &constraints = AffineConstraints<double>());
/**
- * Like the functions above, but for hp dof handlers, mappings, and
- * quadrature collections.
+ * Like the functions above, but for hp-objects.
*/
template <int dim, int spacedim>
void
const AffineConstraints<double> &constraints = AffineConstraints<double>());
/**
- * Like the functions above, but for hp dof handlers, mappings, and
- * quadrature collections.
+ * Like the functions above, but for hp-objects.
*/
template <int dim, int spacedim>
void
const AffineConstraints<double> &constraints = AffineConstraints<double>());
/**
- * Like the functions above, but for hp dof handlers, mappings, and
- * quadrature collections.
+ * Like the functions above, but for hp-objects.
*/
template <int dim, int spacedim>
void
const AffineConstraints<double> &constraints = AffineConstraints<double>());
/**
- * Like the functions above, but for hp dof handlers, mappings, and
- * quadrature collections.
+ * Like the functions above, but for hp-objects.
*/
template <int dim, int spacedim>
void
* necessary to call AffineConstraints::distribute().
*
*
- * <h3>Implementation in the context of hp finite elements</h3>
+ * <h3>Implementation in the context of hp-finite elements</h3>
*
* In the case of DoFHandlers with hp-capabilities, nothing defines which of the
* finite elements that are part of the hp::FECollection associated with the
* active_fe_index for a different space post-refinement and before calling
* DoFHandler::distribute_dofs()).
*
- * @note In the context of hp refinement, if cells are coarsened or the
+ * @note In the context of hp-refinement, if cells are coarsened or the
* polynomial degree is lowered on some cells, then the old finite element
* space is not a subspace of the new space and you may run into the same
* situation as discussed above with hanging nodes. You may want to consider
* a problem when using the previous function in conjunction with non-
* rectangular geometries (i.e. elements with non-rectangular faces). The
* L2-projection method used has been taken from the paper "Electromagnetic
- * scattering simulation using an H (curl) conforming hp finite element
+ * scattering simulation using an H (curl) conforming hp-finite element
* method in three dimensions" by PD Ledger, K Morgan and O Hassan ( Int. J.
* Num. Meth. Fluids, Volume 53, Issue 8, pages 1267-1296).
*
// compute_face_projection_curl_conforming_l2
//
// For details see (for example) section 4.2:
- // Electromagnetic scattering simulation using an H (curl) conforming hp
+ // Electromagnetic scattering simulation using an H (curl) conforming hp-
// finite element method in three dimensions, PD Ledger, K Morgan, O
// Hassan, Int. J. Num. Meth. Fluids, Volume 53, Issue 8, pages
// 1267-1296, 20 March 2007:
// http://onlinelibrary.wiley.com/doi/10.1002/fld.1223/abstract
- // Create hp FEcollection, dof_handler can be either hp or standard type.
+ // Create hp-FEcollection, dof_handler can be either hp- or standard type.
// From here on we can treat it like a hp-namespace object.
const hp::FECollection<dim> &fe_collection(
dof_handler.get_fe_collection());
AffineConstraints<number> & constraints,
const Mapping<dim> & mapping)
{
- // non-hp version - calls the internal
+ // non-hp-version - calls the internal
// compute_project_boundary_values_curl_conforming_l2() function
// above after recasting the mapping.
AffineConstraints<number> & constraints,
const hp::MappingCollection<dim, dim> &mapping_collection)
{
- // hp version - calls the internal
+ // hp-version - calls the internal
// compute_project_boundary_values_curl_conforming_l2() function above.
internals::compute_project_boundary_values_curl_conforming_l2(
dof_handler,
const ComponentMask &component_mask = ComponentMask());
/**
- * Same as above but in an hp context.
+ * Same as above but in an hp-context.
*/
template <int dim, int spacedim, typename VectorType>
void
AffineConstraints<typename VectorType::value_type>());
/**
- * Like the previous set of functions, but for hp objects.
+ * Like the previous set of functions, but for hp-objects.
*/
template <int dim, int spacedim, typename VectorType>
void
AffineConstraints<typename VectorType::value_type>());
/**
- * Like the previous set of functions, but for hp objects.
+ * Like the previous set of functions, but for hp-objects.
*/
template <int dim, int spacedim, typename VectorType>
void
std::set<types::boundary_id>());
/**
- * Same as the set of functions above, but for hp objects.
+ * Same as the set of functions above, but for hp-objects.
*
* @see
* @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
// children recursively.
{
// we are on a non-active cell. these do not have any finite
- // element associated with them in the hp context (in the non-hp
+ // element associated with them in the hp-context (in the non-hp-
// context, we can simply assume that the FE space to which we
// want to interpolate is the same as for all elements in the
// mesh). consequently, we cannot interpolate from children's FE
AssertThrow(
hp_capability_enabled || !contains_multiple_fes,
ExcMessage(
- "You cannot re-enable hp capabilities after you registered a single "
+ "You cannot re-enable hp-capabilities after you registered a single "
"finite element. Please create a new DoFHandler object instead."));
}
AssertThrow(
hp_capability_enabled || !contains_multiple_fes,
ExcMessage(
- "You cannot re-enable hp capabilities after you registered a single "
+ "You cannot re-enable hp-capabilities after you registered a single "
"finite element. Please call reinit() or create a new DoFHandler "
"object instead."));
}
dof_handler.get_triangulation())
.clear_user_flags_line();
- // An implementation of the algorithm described in the hp paper,
+ // An implementation of the algorithm described in the hp-paper,
// including the modification mentioned later in the "complications in
// 3-d" subsections
//
fe_index_2 =
line->nth_active_fe_index(g);
- // as described in the hp paper, we only unify on lines
+ // as described in the hp-paper, we only unify on lines
// when there are at most two different FE objects
// assigned on it.
// however, more than two 'active_fe_indices' can be
dof_handler.get_triangulation())
.clear_user_flags_quad();
- // An implementation of the algorithm described in the hp
+ // An implementation of the algorithm described in the hp-
// paper, including the modification mentioned later in the
// "complications in 3-d" subsections
//
/**
* Once degrees of freedom have been distributed on all cells, see if
* we can identify DoFs on neighboring cells. This function does
- * nothing unless the DoFHandler has hp capabilities.
+ * nothing unless the DoFHandler has hp-capabilities.
*
* Return the final number of degrees of freedom, which is the old one
* minus however many were identified.
for (const auto l : cell->line_indices())
cell->line(l)->set_user_flag();
- // An implementation of the algorithm described in the hp paper,
+ // An implementation of the algorithm described in the hp-paper,
// including the modification mentioned later in the "complications in
// 3-d" subsections
//
for (const auto q : cell->face_indices())
cell->quad(q)->set_user_flag();
- // An implementation of the algorithm described in the hp
+ // An implementation of the algorithm described in the hp-
// paper, including the modification mentioned later in the
// "complications in 3-d" subsections
//
* know the indices of all dominating DoFs, and we have to assign those
* invalid entries to their corresponding global value.
*
- * This function does nothing unless the DoFHandler has hp
+ * This function does nothing unless the DoFHandler has hp-
* capabilities.
*/
template <int dim, int spacedim>
// non-locally owned DoF for which we don't know the
// new number yet and so set it to an invalid index.
// This will later be fixed up after the first ghost
- // exchange phase when we unify hp DoFs on neighboring
+ // exchange phase when we unify hp-DoFs on neighboring
// cells.
if (indices_we_care_about.size() == 0)
dealii::internal::DoFAccessorImplementation::
// DoF for which we don't know the new number yet and so
// set it to an invalid index. This will later be fixed
// up after the first ghost exchange phase when we unify
- // hp DoFs on neighboring cells.
+ // hp-DoFs on neighboring cells.
if (indices_we_care_about.size() == 0)
cell->set_dof_index(d,
new_numbers[old_dof_index],
// for which we don't know the new number yet
// and so set it to an invalid index. This
// will later be fixed up after the first
- // ghost exchange phase when we unify hp DoFs
+ // ghost exchange phase when we unify hp-DoFs
// on neighboring cells.
if (indices_we_care_about.size() == 0)
line->set_dof_index(
// for which we don't know the new number yet
// and so set it to an invalid index. This
// will later be fixed up after the first
- // ghost exchange phase when we unify hp DoFs
+ // ghost exchange phase when we unify hp-DoFs
// on neighboring cells.
if (indices_we_care_about.size() == 0)
line->set_dof_index(
// for which we don't know the new number yet
// and so set it to an invalid index. This
// will later be fixed up after the first
- // ghost exchange phase when we unify hp DoFs
+ // ghost exchange phase when we unify hp-DoFs
// on neighboring cells.
if (indices_we_care_about.size() == 0)
quad->set_dof_index(
// return a sequential, complete index set. take into account that the
// number of DoF indices may in fact be smaller than there were before
// if some previously separately numbered dofs have been identified.
- // this is, for example, what we do when the DoFHandler has hp
+ // this is, for example, what we do when the DoFHandler has hp-
// capabilities enabled: it first enumerates all DoFs on cells
// independently, and then unifies some located at vertices or faces;
// this leaves us with fewer DoFs than there were before, so use the
// --------- Phase 2: eliminate dof duplicates on all cells:
// - un-numerate dofs on interfaces to ghost cells
// that we don't own
- // - in case of hp support, unify dofs
+ // - in case of hp-support, unify dofs
std::vector<dealii::types::global_dof_index> renumbering(
n_initial_local_dofs, enumeration_dof_index);
invalidate_dof_indices_on_weaker_ghost_cells_for_renumbering(
renumbering, subdomain_id, *dof_handler);
- // then, we identify DoF duplicates if the DoFHandler has hp
+ // then, we identify DoF duplicates if the DoFHandler has hp-
// capabilities
std::vector<std::map<types::global_dof_index, types::global_dof_index>>
all_constrained_indices(dim);
// done twice
communicate_dof_indices_on_marked_cells(*dof_handler);
- // If the DoFHandler has hp capabilities enabled, then we may have
+ // If the DoFHandler has hp-capabilities enabled, then we may have
// received valid indices of degrees of freedom that are dominated
// by a fe object adjacent to a ghost interface. thus, we overwrite
// the remaining invalid indices with the valid ones in this step.
//
// This is the same as phase 5+6 in the distribute_dofs() algorithm,
// taking into account that we have to unify a few DoFs in between
- // then communication phases if we do hp numbering
+ // then communication phases if we do hp-numbering
{
std::vector<bool> user_flags;
triangulation->save_user_flags(user_flags);
// done twice
communicate_dof_indices_on_marked_cells(*dof_handler);
- // if the DoFHandler has hp capabilities then we may have
+ // if the DoFHandler has hp-capabilities then we may have
// received valid indices of degrees of freedom that are
// dominated by a fe object adjacent to a ghost interface.
// thus, we overwrite the remaining invalid indices with the
Assert(
(fe_index == dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage(
- "Only the default FE index is allowed for non-hp DoFHandler objects"));
+ "Only the default FE index is allowed for non-hp-DoFHandler objects"));
Assert(
local_index < dof_handler.get_fe().template n_dofs_per_object<dim>(),
ExcIndexRange(local_index,
\{
namespace boost
\{
- // TODO[WB]: also implement the following boost for hp DoFHandlers etc.
+ // TODO[WB]: also implement the following boost for hp-DoFHandlers etc.
\}
\{
namespace boost
\{
- // TODO[WB]: also implement the following boost for hp DoFHandlers etc.
+ // TODO[WB]: also implement the following boost for hp-DoFHandlers etc.
template void
Cuthill_McKee(DoFHandler<deal_II_dimension> &, bool, bool);
/**
* When restricting, on a face, the degrees of freedom of fe1 to the space
* described by fe2 (for example for the complex case described
- * in the @ref hp_paper "hp paper"), we have to select fe2.dofs_per_face
+ * in the @ref hp_paper "hp-paper"), we have to select fe2.dofs_per_face
* out of the fe1.dofs_per_face face DoFs as the
* primary dofs, and the rest become dependent dofs. This function selects
* which ones will be primary, and which ones will be dependents.
/**
* Given the face interpolation matrix between two elements, split it into
* its primary and dependent parts and invert the primary part as
- * explained in the @ref hp_paper "hp paper".
+ * explained in the @ref hp_paper "hp-paper".
*/
void
ensure_existence_of_split_face_matrix(
/**
* A function that returns how many different finite elements a dof
- * handler uses. This is one for non-hp DoFHandlers and
+ * handler uses. This is one for non-hp-DoFHandlers and
* dof_handler.get_fe().size() for the hp-versions.
*/
template <int dim, int spacedim>
* Copy constraints into an AffineConstraints object.
*
* This function removes zero constraints and those, which constrain a DoF
- * which was already eliminated in one of the previous steps of the hp
+ * which was already eliminated in one of the previous steps of the hp-
* hanging node procedure.
*
* It also suppresses very small entries in the AffineConstraints object
AffineConstraints<number> & constraints)
{
// note: this function is going to be hard to understand if you haven't
- // read the hp paper. however, we try to follow the notation laid out
+ // read the hp-paper. however, we try to follow the notation laid out
// there, so go read the paper before you try to understand what is going
// on here
// primary and dependent parts, and for which the primary part is
// inverted. these two matrices are derived from the face interpolation
// matrix
- // as described in the @ref hp_paper "hp paper"
+ // as described in the @ref hp_paper "hp-paper"
Table<2,
std::unique_ptr<std::pair<FullMatrix<double>, FullMatrix<double>>>>
split_face_interpolation_matrices(n_finite_elements(dof_handler),
ExcInternalError());
// first find out whether we can constrain each of the subfaces
- // to the mother face. in the lingo of the hp paper, this would
+ // to the mother face. in the lingo of the hp-paper, this would
// be the simple case. note that we can short-circuit this
// decision if the dof_handler doesn't support hp at all
//
case FiniteElementDomination::either_element_can_dominate:
{
// Case 1 (the simple case and the only case that can
- // happen for non-hp DoFHandlers): The coarse element
+ // happen for non-hp-DoFHandlers): The coarse element
// dominates the elements on the subfaces (or they are
// all the same)
//
{
// Case 2 (the "complex" case): at least one (the
// neither_... case) of the finer elements or all of
- // them (the other_... case) is dominating. See the hp
+ // them (the other_... case) is dominating. See the hp-
// paper for a way how to deal with this situation
//
- // since this is something that can only happen for hp
+ // since this is something that can only happen for hp-
// dof handlers, add a check here...
Assert(dof_handler.has_hp_capabilities() == true,
ExcInternalError());
// next we have to deal with the subfaces. do as
- // discussed in the hp paper
+ // discussed in the hp-paper
for (unsigned int sf = 0;
sf < cell->face(face)->n_children();
++sf)
// our best bet is to find the common space among
// other FEs in FECollection and then constrain both
// FEs to that one. More precisely, we follow the
- // strategy outlined on page 17 of the hp paper:
+ // strategy outlined on page 17 of the hp-paper:
// First we find the dominant FE space S. Then we
// divide our dofs in primary and dependent such
// that I^{face,primary}_{S^{face}->S} is
Assert(coarse_grid.get_fe_collection().size() == 1 &&
fine_grid.get_fe_collection().size() == 1,
ExcMessage("This function is not yet implemented for DoFHandlers "
- "using hp capabilities."));
+ "using hp-capabilities."));
// store the weights with which a dof on the parameter grid contributes to a
// dof on the fine grid. see the long doc below for more info
//
Assert(coarse_grid.get_fe_collection().size() == 1 &&
fine_grid.get_fe_collection().size() == 1,
ExcMessage("This function is not yet implemented for DoFHandlers "
- "using hp capabilities."));
+ "using hp-capabilities."));
// store the weights with which a dof on the parameter grid contributes to a
// dof on the fine grid. see the long doc below for more info
//
namespace
{
// implementation of the same function in namespace DoFTools for
- // non-hp DoFHandlers
+ // non-hp-DoFHandlers
template <int dim,
int spacedim,
typename SparsityPatternType,
{
// while the implementation above is quite optimized and caches a
// lot of data (see e.g. the int/flux_dof_mask tables), this is no
- // longer practical for the hp version since we would have to have
+ // longer practical for the hp-version since we would have to have
// it for all combinations of elements in the hp::FECollection.
// consequently, the implementation here is simpler and probably
// less efficient but at least readable...
if (!face_has_flux_coupling(cell, face))
continue;
- // Like the non-hp case: If the cells are on the same
+ // Like the non-hp-case: If the cells are on the same
// level (and both are active, locally-owned cells)
// then only add to the sparsity pattern if the
// current cell is 'greater' in the total ordering.
neighbor->is_active() &&
neighbor->is_locally_owned())
continue;
- // Again, like the non-hp case: If we are more refined
+ // Again, like the non-hp-case: If we are more refined
// then the neighbor, then we will automatically find
// the active neighbor cell when we call 'neighbor
// (face)' above. The opposite is not true; if the
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// will work also if this assertion is not satisfied. But the matrices
- // produced in that case might lead to problems in the hp procedures,
+ // produced in that case might lead to problems in the hp-procedures,
// which use this method.
Assert(
this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// will work also if this assertion is not satisfied. But the matrices
- // produced in that case might lead to problems in the hp procedures,
+ // produced in that case might lead to problems in the hp-procedures,
// which use this method.
Assert(
this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// will work also if this assertion is not satisfied. But the matrices
- // produced in that case might lead to problems in the hp procedures,
+ // produced in that case might lead to problems in the hp-procedures,
// which use this method.
Assert(
this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// will work also if this assertion is not satisfied. But the matrices
- // produced in that case might lead to problems in the hp procedures,
+ // produced in that case might lead to problems in the hp-procedures,
// which use this method.
Assert(
this->n_dofs_per_face(face_no) <= source_fe->n_dofs_per_face(face_no),
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
// TODO: There are tests that check that the following few functions don't
// produce assertion failures, but none that actually check whether they do the
// right thing. one example for such a test would be to project a function onto
-// an hp space and make sure that the convergence order is correct with regard
+// an hp-space and make sure that the convergence order is correct with regard
// to the lowest used polynomial degree
template <int dim>
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
// satisfied. But the matrices
// produced in that case might
// lead to problems in the
- // hp procedures, which use this
+ // hp-procedures, which use this
// method.
Assert(this->n_dofs_per_face(face_no) <= source_fe.n_dofs_per_face(face_no),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
namespace Refinement
{
/**
- * Setting p adaptivity flags
+ * Setting p-adaptivity flags
*/
template <int dim, int spacedim>
void
/**
- * Decide between h and p adaptivity
+ * Decide between h- and p-adaptivity
*/
template <int dim, int spacedim>
void
cell->clear_refine_flag();
// A cell will only be coarsened into its parent if all of its
- // siblings are flagged for h coarsening as well. We must take this
- // into account for our decision whether we would like to impose h
- // or p adaptivity.
+ // siblings are flagged for h-coarsening as well. We must take this
+ // into account for our decision whether we would like to impose h-
+ // or p-adaptivity.
if (cell->coarsen_flag_set())
{
const auto & parent = cell->parent();
if (h_flagged_children == n_children &&
p_flagged_children != n_children)
{
- // Perform pure h coarsening and
- // drop all p adaptation flags.
+ // Perform pure h-coarsening and
+ // drop all p-adaptation flags.
for (const auto &child : parent->child_iterators())
{
// h_flagged_children == n_children implies
}
else
{
- // Perform p adaptation on all children and
- // drop all h coarsening flags.
+ // Perform p-adaptation on all children and
+ // drop all h-coarsening flags.
for (const auto &child : parent->child_iterators())
{
if (child->is_active() && child->is_locally_owned())
// a. Only cells belonging to the same category (or next higher if the
// cell_vectorization_categories_strict is false) can be grouped into
// the same SIMD batch
- // b. hp adaptive computations must form contiguous ranges for the same
+ // b. hp-adaptive computations must form contiguous ranges for the same
// degree (category) in cell_partition_data
// c. We want to group the cells with the same parent in the same SIMD
// lane if possible
// Step 5: Sort the batches of cells by their last cell index to get
// good locality, assuming that the initial cell order is of good
- // locality. In case we have hp calculations with categories, we need to
+ // locality. In case we have hp-calculations with categories, we need to
// sort also by the category.
std::vector<std::array<unsigned int, 3>> batch_order;
std::vector<std::array<unsigned int, 3>> batch_order_comm;
// create collection objects from
// single quadratures,
// and finite elements. if we have
- // an hp DoFHandler,
+ // an hp-DoFHandler,
// dof_handler.get_fe() returns a
// collection of which we do a
// shallow copy instead
// create collection objects from
// single quadratures, mappings,
// and finite elements. if we have
- // an hp DoFHandler,
+ // an hp-DoFHandler,
// dof_handler.get_fe() returns a
// collection of which we do a
// shallow copy instead
deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
- // non-hp version of create_mass_matrix
+ // non-hp-version of create_mass_matrix
template void MatrixCreator::
create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
const Mapping<deal_II_dimension, deal_II_space_dimension> & mapping,
const Function<deal_II_space_dimension, scalar> *const coefficient,
const AffineConstraints<scalar> & constraints);
- // hp versions of functions
+ // hp-versions of functions
template void MatrixCreator::
create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
const hp::MappingCollection<deal_II_dimension, deal_II_space_dimension>
deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension <= deal_II_space_dimension
- // non-hp version of create_mass_matrix
+ // non-hp-version of create_mass_matrix
template void MatrixCreator::
create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
const Mapping<deal_II_dimension, deal_II_space_dimension> & mapping,
const Function<deal_II_space_dimension, scalar> *const coefficient,
const AffineConstraints<scalar> & constraints);
- // hp version
+ // hp-version
template void MatrixCreator::
create_mass_matrix<deal_II_dimension, deal_II_space_dimension, scalar>(
const hp::MappingCollection<deal_II_dimension, deal_II_space_dimension>
{
#if deal_II_dimension == deal_II_space_dimension
- // non-hp versions of create_laplace_matrix
+ // non-hp-versions of create_laplace_matrix
template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
const DoFHandler<deal_II_dimension> & dof,
const Quadrature<deal_II_dimension> & q,
const Function<deal_II_dimension> *const coefficient,
const AffineConstraints<double> & constraints);
- // hp versions of create_laplace_matrix
+ // hp-versions of create_laplace_matrix
template void MatrixCreator::create_laplace_matrix<deal_II_dimension>(
const DoFHandler<deal_II_dimension> & dof,
const hp::QCollection<deal_II_dimension> &q,
for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
{
#if deal_II_dimension < deal_II_space_dimension
- // non-hp version of create_laplace_matrix
+ // non-hp-version of create_laplace_matrix
template void MatrixCreator::create_laplace_matrix<deal_II_dimension,
deal_II_space_dimension>(
const Mapping<deal_II_dimension, deal_II_space_dimension> & mapping,
else if (cell->has_children() && cell->child(0)->coarsen_flag_set())
{
// we will need to interpolate from the children of this cell
- // to the current one. in the hp context, this also means
+ // to the current one. in the hp-context, this also means
// we need to figure out which finite element space to interpolate
- // to since that is not implied by the global FE as in the non-hp
+ // to since that is not implied by the global FE as in the non-hp-
// case. we choose the 'least dominant fe' on all children from
// the associated FECollection.
std::set<unsigned int> fe_indices_children;
{
// 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 hp case. to really do that test we would have to
+ // fe in the hp-case. to really do that test we would have to
// store the fe_index of all cells
const Vector<typename VectorType::value_type> *data = nullptr;
const unsigned int active_fe_index = cell->active_fe_index();
-// check that computation of hp constraints works for DGP elements correctly
+// check that computation of hp-constraints works for DGP elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for DGP_Monomial elements
+// check that computation of hp-constraints works for DGP_Monomial elements
// correctly
char logname[] = "output";
-// check that computation of hp constraints works for DGPNonparametric elements
+// check that computation of hp-constraints works for DGPNonparametric elements
// correctly on a uniformly refined mesh for functions of degree q
char logname[] = "output";
-// check that computation of hp constraints works for DGQ elements correctly
+// check that computation of hp-constraints works for DGQ elements correctly
char logname[] = "output";
// check
// DoFTools::
// count_dofs_per_component (...);
-// for the hp case
+// for the hp-case
using namespace std;
// check
// DoFTools::
// count_dofs_per_component (...);
-// for the hp case
+// for the hp-case
//
// in contrast to the _01 test also check that this works if the element
// collection has more than one element
// then build hanging node
// constraints. this should trip the
- // new code using the hp constraints,
+ // new code using the hp-constraints,
// added in late July 2006
AffineConstraints<double> constraints;
DoFTools::make_hanging_node_constraints(dof, constraints);
// check
// DoFTools::
// map_dofs_to_support_points(...);
-// for the hp case
+// for the hp-case
using namespace std;
// check
// DoFTools::
// map_dofs_to_support_points(...);
-// for the hp case with different finite elements
+// for the hp-case with different finite elements
// on different cells.
// ---------------------------------------------------------------------
-// check VectorTools::point_gradient for a hp dofhandler.
+// check VectorTools::point_gradient for a hp-dofhandler.
// ---------------------------------------------------------------------
-// check VectorTools::point_value for a hp dofhandler.
+// check VectorTools::point_value for a hp-dofhandler.
-// check that computation of hp constraints works for Q elements correctly
+// check that computation of hp-constraints works for Q elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for FESystem(FE_Q) elements
+// check that computation of hp-constraints works for FESystem(FE_Q) elements
// correctly on a uniformly refined mesh for functions of degree q
char logname[] = "output";
-// check that computation of hp constraints works for FESystem(FE_Q) elements
+// check that computation of hp-constraints works for FESystem(FE_Q) elements
// correctly on a uniformly refined mesh for functions of degree q
// these tests check that we can deal with FESystem(FE_Q(p),FE_DGQ(q)) for
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
-// like deal.II/vectors_boundary_rhs_02, but for hp objects. here, each hp
+// like deal.II/vectors_boundary_rhs_02, but for hp-objects. here, each hp-
// object has only a single component, so we expect exactly the same output as
// for the old test. vectors_boundary_rhs_hp_02_hp tests for different finite
// elements
-// like deal.II/vectors_rhs_hp_02, but for hp objects. here, each hp object has
+// like deal.II/vectors_rhs_hp_02, but for hp-objects. here, each hp-object has
// only a single component, so we expect exactly the same output as for the old
// test. vectors_rhs_hp_02_hp tests for different finite elements
fe_collection.push_back(FE_Enriched<dim>(FE_Q<dim>(p_feq)));
fe_collection.push_back(
FE_Enriched<dim>(FE_Q<dim>(p_feen), FE_Q<dim>(1), &function));
- // push back to be able to resolve hp constrains:
+ // push back to be able to resolve hp-constrains:
fe_collection.push_back(FE_Enriched<dim>(FE_Q<dim>(p_feen)));
GridGenerator::hyper_cube(triangulation);
// ---------------------------------------------------------------------
-// check constraints on hp dofhandler with 2 neighboring cells where one
+// check constraints on hp-dofhandler with 2 neighboring cells where one
// cell is enriched and nother is not.
#include <deal.II/base/function.h>
fe_collection.push_back(FE_Enriched<dim>(FE_Q<dim>(p_feq)));
fe_collection.push_back(
FE_Enriched<dim>(FE_Q<dim>(p_feen), FE_Q<dim>(1), &function));
- // push back to be able to resolve hp constrains:
+ // push back to be able to resolve hp-constrains:
fe_collection.push_back(FE_Enriched<dim>(FE_Q<dim>(p_feen)));
dof_handler.begin_active()->set_active_fe_index(1); // POU
FESystem<dim>(FE_Q<dim>(p_feq), 1, FE_Nothing<dim>(), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(p_feen), 1, FE_Q<dim>(1), 1));
- // push back to be able to resolve hp constrains:
+ // push back to be able to resolve hp-constrains:
fe_collection.push_back(
FESystem<dim>(FE_Q<dim>(p_feen), 1, FE_Nothing<dim>(), 1));
// adapted from hp/crash_06, which itself is from
-// make_hanging_node_constraints for hp elements. used to crash. triggers the
+// make_hanging_node_constraints for hp-elements. used to crash. triggers the
// crash that at the time of writing the test afflicts all
// hp/hp_constraints_*_03 tests
// verify that we can do things like cell->face() in 1d as well. here:
// test cell->face(0)->get_dof_indices()
-// compared to _06, we now test for an hp DoFHandler
+// compared to _06, we now test for an hp-DoFHandler
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
// Like hp/matrices, but only the boundary mass matrices for vector-valued
-// (non-primitive) hp objects are being tested.
+// (non-primitive) hp-objects are being tested.
#include <deal.II/base/function_lib.h>
// Same as hp/boundary_matrices, but with different FE objects. Tests
-// the boundary mass matrces for vector-valued (non-primiteve) hp
+// the boundary mass matrces for vector-valued (non-primiteve) hp-
// FE objects.
// a test adapted from little programs by Markus Buerg that makes sure
-// we compute the same solution for hp and non-hp cases
+// we compute the same solution for hp- and non-hp-cases
#include <deal.II/base/function.h>
-// the crash_08 testcase discussed in the hp paper. this produces a cyclic
+// the crash_08 testcase discussed in the hp-paper. this produces a cyclic
// constraint between degrees of freedom 3->14->17->6->3 with the algorithm
// that is presently in make_hanging_node_constraints
// a test where a degree of freedom was constrained multiple times,
-// but with different weights. see the hp paper for more on this
+// but with different weights. see the hp-paper for more on this
char logname[] = "output";
// a test where a degree of freedom was constrained multiple times,
-// but with different weights. see the hp paper for more on this
+// but with different weights. see the hp-paper for more on this
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
-// check the complex case described in the hp paper by playing through all
+// check the complex case described in the hp-paper by playing through all
// sorts of arrangements of finite elements on one coarse and one refined cell
//
// this code in particular tests some compensating code in
// apparently, what is happening is that we don't unify more than 2 finite
// elements on an edge in 3d, according to a comment at the top of
// hp::DoFHandler::compute_line_dof_identities at the time of this writing
-// (and referring to a comment in the hp paper). there is now code that deals
+// (and referring to a comment in the hp-paper). there is now code that deals
// with the more narrow special case we have here
#include <deal.II/dofs/dof_accessor.h>
// a problem uncovered by Baerbel Janssen in that
// DoFTools::make_flux_sparsity_pattern aborted in 1d with adaptively refined
-// meshes and hp DoFHandlers. this actually uncovered all sorts of other
+// meshes and hp-DoFHandlers. this actually uncovered all sorts of other
// problems that led to a long sequence of assertions triggered every time one
// of them was fixed. this test cumulatively makes sure everything is ok
// Check the consistency of the number cache of DoFHandler for a sequential
-// object. Like deal.II/dof_handler_number_cache but for an hp object
+// object. Like deal.II/dof_handler_number_cache but for an hp-object
#include <deal.II/base/tensor.h>
// validate combination of error prediction and cell data transfer algorithms
-// for hp adaptive methods
+// for hp-adaptive methods
#include <deal.II/dofs/dof_handler.h>
// test that FE_Nothing can be called with interpolate_boundary_values
-// with vector elements in the hp context with each element active
+// with vector elements in the hp-context with each element active
// only in a subdomain
-// interpolate() can not deal with FE_Nothing in an hp setting
+// interpolate() can not deal with FE_Nothing in an hp-setting
#include <deal.II/base/function.h>
// ---------------------------------------------------------------------
// A test that checks make_flux_sparsity_pattern
-// with vector-valued hp objects and coupling masks
+// with vector-valued hp-objects and coupling masks
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
// ---------------------------------------------------------------------
// A second test that checks make_flux_sparsity_pattern
-// with scalar valued hp objects.
+// with scalar valued hp-objects.
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
// ---------------------------------------------------------------------
-// cell->get_interpolated_dof_values can not work properly in the hp
+// cell->get_interpolated_dof_values can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
// ---------------------------------------------------------------------
-// cell->get_interpolated_dof_values can not work properly in the hp
+// cell->get_interpolated_dof_values can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
//
// ---------------------------------------------------------------------
-// cell->get_interpolated_dof_values can not work properly in the hp
+// cell->get_interpolated_dof_values can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
//
-// validate hp decision algorithms on grid coarsening
-// that depend on the composition of h and p adaptivity flags
+// validate hp-decision algorithms on grid coarsening
+// that depend on the composition of h- and p-adaptivity flags
#include <deal.II/dofs/dof_handler.h>
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
- // Set h and p flags on all cells.
+ // Set h- and p-flags on all cells.
for (const auto &cell : dh.active_cell_iterators())
{
cell->set_coarsen_flag();
-// check that computation of hp constraints works for Bernstein elements
+// check that computation of hp-constraints works for Bernstein elements
// correctly
char logname[] = "output";
// ---------------------------------------------------------------------
-// common framework to check hp constraints
+// common framework to check hp-constraints
#include <deal.II/base/function.h>
#include <deal.II/base/function_lib.h>
// ---------------------------------------------------------------------
-// common framework to check hp constraints for fe without support points
+// common framework to check hp-constraints for fe without support points
#include <deal.II/base/function.h>
#include <deal.II/base/function_lib.h>
-// check that computation of hp constraints works for DGP elements correctly
+// check that computation of hp-constraints works for DGP elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for DGP_Monomial elements
+// check that computation of hp-constraints works for DGP_Monomial elements
// correctly
char logname[] = "output";
-// check that computation of hp constraints works for DGPNonparametric elements
+// check that computation of hp-constraints works for DGPNonparametric elements
// correctly on a uniformly refined mesh for functions of degree q
char logname[] = "output";
-// check that computation of hp constraints works for DGQ elements correctly
+// check that computation of hp-constraints works for DGQ elements correctly
char logname[] = "output";
fe_collection.push_back(
FESystem<dim>(FE_Q<dim>(p1), 1, FE_Nothing<dim>(1, true), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(p2), 1, FE_Q<dim>(1), 1));
- // push back to be able to resolve hp constrains no matter what:
+ // push back to be able to resolve hp-constrains no matter what:
fe_collection.push_back(
FESystem<dim>(FE_Q<dim>(p2), 1, FE_Nothing<dim>(1, true), 1));
-// check that computation of hp constraints works for Q elements correctly
+// check that computation of hp-constraints works for Q elements correctly
char logname[] = "output";
-// check that computation of hp constraints works for DGP_Monomial elements
+// check that computation of hp-constraints works for DGP_Monomial elements
// correctly
char logname[] = "output";
-// check that computation of hp constraints works for FESystem(FE_Q) elements
+// check that computation of hp-constraints works for FESystem(FE_Q) elements
// correctly on a uniformly refined mesh for functions of degree q
char logname[] = "output";
-// check that computation of hp constraints works for FESystem(FE_Q) elements
+// check that computation of hp-constraints works for FESystem(FE_Q) elements
// correctly on a uniformly refined mesh for functions of degree q
// these tests check that we can deal with FESystem(FE_Q(p),FE_DGQ(q)) for
-// check that computation of hp constraints works for RT elements correctly
+// check that computation of hp-constraints works for RT elements correctly
char logname[] = "output";
#include "../tests.h"
-// This a test for the hp capable version of the make_hanging_node_constraints
+// This a test for the hp-capable version of the make_hanging_node_constraints
// method. It uses a triangulation with one refined element beside an
// unrefined element to create the constraints for this configuration.
// 3.2. Mark cells for h-refinement
mark_h_cells();
- // 3.3. Substitute h for p refinement
+ // 3.3. Substitute h- for p-refinement
substitute_h_for_p();
// prepare refinement and store number of flagged cells
// 3.5. h-refinement and p-refinement
triangulation.execute_coarsening_and_refinement();
- // FIXME: some hp strategies might need:
+ // FIXME: some hp-strategies might need:
// post_execute_coarsening_and_refinement();
// 3.6. Setup
-// like deal.II/matrices, but for hp objects. here, each hp object has only a
+// like deal.II/matrices, but for hp-objects. here, each hp-object has only a
// single component, so we expect exactly the same output as for the old test.
// matrices_hp tests for different finite elements
// Check the consistency of the number cache of DoFHandler for a sequential
-// object. Like deal.II/n_boundary_dofs but for an hp object
+// object. Like deal.II/n_boundary_dofs but for an hp-object
#include <deal.II/base/tensor.h>
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
const unsigned int n_active = tria.n_active_cells();
// ---------------------------------------------------------------------
-// cell->set_dof_values_by_interpolation can not work properly in the hp
+// cell->set_dof_values_by_interpolation can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
// ---------------------------------------------------------------------
-// cell->set_dof_values_by_interpolation can not work properly in the hp
+// cell->set_dof_values_by_interpolation can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
//
// ---------------------------------------------------------------------
-// cell->set_dof_values_by_interpolation can not work properly in the hp
+// cell->set_dof_values_by_interpolation can not work properly in the hp-
// context when called on non-active cells because these do not have a
// finite element associated with them
//
std::fabs(func.value(fe_val.quadrature_point(q), 0) - vals[q]);
}
}
- deallog << "Error in interpolating hp FE_Q: " << error << std::endl;
+ deallog << "Error in interpolating hp-FE_Q: " << error << std::endl;
}
{
double error = 0;
std::fabs(func.value(fe_val.quadrature_point(q), 0) - vals[q]);
}
}
- deallog << "Error in interpolating hp FE_DGQ: " << error << std::endl;
+ deallog << "Error in interpolating hp-FE_DGQ: " << error << std::endl;
}
}
DEAL:: 1D solution transfer
-DEAL::Error in interpolating hp FE_Q: 0
-DEAL::Error in interpolating hp FE_DGQ: 0
+DEAL::Error in interpolating hp-FE_Q: 0
+DEAL::Error in interpolating hp-FE_DGQ: 0
DEAL:: 2D solution transfer
-DEAL::Error in interpolating hp FE_Q: 0
-DEAL::Error in interpolating hp FE_DGQ: 0
+DEAL::Error in interpolating hp-FE_Q: 0
+DEAL::Error in interpolating hp-FE_DGQ: 0
DEAL:: 3D solution transfer
-DEAL::Error in interpolating hp FE_Q: 0
-DEAL::Error in interpolating hp FE_DGQ: 0
+DEAL::Error in interpolating hp-FE_Q: 0
+DEAL::Error in interpolating hp-FE_DGQ: 0
// SolutionTransfer wanted to compute interpolation matrices between
-// all pairs of elements used on a mesh in the hp case. unfortunately,
+// all pairs of elements used on a mesh in the hp-case. unfortunately,
// not all pairs are actually supported, e.g. between FE_Nothing and
// FE_Q, but that shouldn't matter as long as these combinations are
// never exercised on actual cells
std::fabs(func.value(fe_val.quadrature_point(q), 0) - vals[q]);
}
}
- deallog << "Error in interpolating hp FE_Q_Hierarchical: " << error
+ deallog << "Error in interpolating hp-FE_Q_Hierarchical: " << error
<< std::endl;
}
}
DEAL:: 1D solution transfer
-DEAL::Error in interpolating hp FE_Q_Hierarchical: 0
+DEAL::Error in interpolating hp-FE_Q_Hierarchical: 0
DEAL:: 2D solution transfer
-DEAL::Error in interpolating hp FE_Q_Hierarchical: 0
+DEAL::Error in interpolating hp-FE_Q_Hierarchical: 0
DEAL:: 3D solution transfer
-DEAL::Error in interpolating hp FE_Q_Hierarchical: 0
+DEAL::Error in interpolating hp-FE_Q_Hierarchical: 0
-// like deal.II/vectors_boundary_rhs, but for hp objects. here, each hp object
+// like deal.II/vectors_boundary_rhs, but for hp-objects. here, each hp-object
// has only a single component, so we expect exactly the same output as for the
// old test. vectors_boundary_rhs_hp tests for different finite elements
-// like deal.II/vectors_boundary_rhs_02_02, but for hp objects. here, each hp
+// like deal.II/vectors_boundary_rhs_02_02, but for hp-objects. here, each hp-
// object has only a single component, so we expect exactly the same output as
// for the old test. vectors_boundary_rhs_02_hp tests for different finite
// elements
-// like deal.II/vectors_boundary_rhs_03, but for hp objects. here, each hp
+// like deal.II/vectors_boundary_rhs_03, but for hp-objects. here, each hp-
// object has only a single component, so we expect exactly the same output as
// for the old test. vectors_boundary_rhs_03_hp tests for different finite
// elements
-// like deal.II/vectors_boundary_rhs, but for hp objects. here, each hp object
+// like deal.II/vectors_boundary_rhs, but for hp-objects. here, each hp-object
// has only a single component, so we expect exactly the same output as for the
// old test. vectors_boundary_rhs_hp_hp tests for different finite elements
-// like deal.II/vectors_boundary_rhs_03, but for hp objects. here, each hp
+// like deal.II/vectors_boundary_rhs_03, but for hp-objects. here, each hp-
// object has only a single component, so we expect exactly the same output as
// for the old test. vectors_boundary_rhs_hp_03_hp tests for different finite
// elements
-// like deal.II/vectors_point_source, but for hp objects. here, each hp object
+// like deal.II/vectors_point_source, but for hp-objects. here, each hp-object
// has only a single component, so we expect exactly the same output as for the
// old test. vectors_point_source_hp tests for different finite elements
-// like deal.II/vectors_point_source_hp, but for hp objects. here, each hp
+// like deal.II/vectors_point_source_hp, but for hp-objects. here, each hp-
// object has only a single component, so we expect exactly the same output as
// for the old test. vectors_point_source_hp_hp tests for different finite
// elements
-// like deal.II/vectors_rhs, but for hp objects. here, each hp object has only a
+// like deal.II/vectors_rhs, but for hp-objects. here, each hp-object has only a
// single component, so we expect exactly the same output as for the old test.
// vectors_rhs_hp tests for different finite elements
-// like deal.II/vectors_rhs_02_02, but for hp objects. here, each hp object has
+// like deal.II/vectors_rhs_02_02, but for hp-objects. here, each hp-object has
// only a single component, so we expect exactly the same output as for the old
// test. vectors_rhs_02_hp tests for different finite elements
-// like deal.II/vectors_rhs_03, but for hp objects. here, each hp object has
+// like deal.II/vectors_rhs_03, but for hp-objects. here, each hp-object has
// only a single component, so we expect exactly the same output as for the old
// test. vectors_rhs_03_hp tests for different finite elements
-// like deal.II/vectors_rhs_hp, but for hp objects. here, each hp object has
+// like deal.II/vectors_rhs_hp, but for hp-objects. here, each hp-object has
// only a single component, so we expect exactly the same output as for the old
// test. vectors_rhs_hp_hp tests for different finite elements
-// like deal.II/vectors_rhs_hp_03, but for hp objects. here, each hp object has
+// like deal.II/vectors_rhs_hp_03, but for hp-objects. here, each hp-object has
// only a single component, so we expect exactly the same output as for the old
// test. vectors_rhs_hp_03_hp tests for different finite elements
// this function tests the correctness of the implementation of
// inhomogeneous constraints. The program is a modification of the step-27
-// tutorial program with hp elements and the constraints arising in that
+// tutorial program with hp-elements and the constraints arising in that
// situation. the idea of the test is to set up a matrix with standard tools
// (i.e., constraints and the boundary value list), and compare that with
// the new function.
// this function tests the correctness of the implementation of matrix free
// matrix-vector products by comparing with the result of deal.II sparse
-// matrix for hp DoFHandler on a hyperball mesh with hanging nodes and finite
+// matrix for hp-DoFHandler on a hyperball mesh with hanging nodes and finite
// elements orders distributed randomly.
#include <deal.II/base/function.h>
// this function tests the correctness of the implementation of matrix free
// matrix-vector products by comparing with the result of deal.II sparse
-// matrix for hp DoFHandler on a hyperball mesh with hanging nodes and finite
+// matrix for hp-DoFHandler on a hyperball mesh with hanging nodes and finite
// elements orders distributed randomly.
#include <deal.II/base/function.h>
// this function tests the correctness of the implementation of parallel
-// matrix free matrix-vector products for hp elements by comparing to the
+// matrix free matrix-vector products for hp-elements by comparing to the
// serial version
#include <deal.II/base/function.h>
DoFTools::make_zero_boundary_constraints(dof_handler, constraints);
#ifdef DEBUG
- // We did not think about hp constraints on ghost cells yet.
+ // We did not think about hp-constraints on ghost cells yet.
// Thus, we are content with verifying their consistency for now.
IndexSet locally_active_dofs;
DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
-// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp
+// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp-
// case with an FECollection that contains multiple copies of the same
-// FE_Q(2) element. the hp code will unify DoF indices on boundaries
+// FE_Q(2) element. the hp-code will unify DoF indices on boundaries
// between all subdomains.
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains multiple copies of the same
-// FE_Q(2) element. the hp code will unify DoF indices on boundaries
+// FE_Q(2) element. the hp-code will unify DoF indices on boundaries
// between all subdomains.
//
// in this testcase, three FE objects are distributed on four cells,
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains a FE_Q(4) and a FE_Q(2) element.
-// the hp code will unify DoF indices on boundaries between all subdomains.
+// the hp-code will unify DoF indices on boundaries between all subdomains.
//
// in this testcase, each cell has a face neighbor with a different
// active_fe_index, which is either locally owned or a ghost cell.
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains a FE_Q(4) and a FE_Q(2) element.
-// the hp code will unify DoF indices on boundaries between all subdomains.
+// the hp-code will unify DoF indices on boundaries between all subdomains.
//
// in this testcase, each cell has a face neighbor which is
// - locally owned with the same active_fe_index
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains a FE_Q(4) and a FE_Q(2) element.
-// the hp code will unify DoF indices on boundaries between all subdomains.
+// the hp-code will unify DoF indices on boundaries between all subdomains.
//
// in this testcase, each cell has a face neighbor which is
// - locally owned with a different active_fe_index
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains multiple copies of the same
-// FE_Q(2) element. the hp code will unify DoF indices on boundaries
+// FE_Q(2) element. the hp-code will unify DoF indices on boundaries
// between all subdomains.
//
// in this testcase, the dominating FE object is located on a cell
-// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp
+// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp-
// case with an FECollection that contains multiple copies of the same
-// FE_Q(2) element. in the sequential case, the hp code will unify DoF
+// FE_Q(2) element. in the sequential case, the hp-code will unify DoF
// indices on boundaries between locally owned subdomains; in early
-// versions of the parallel hp support, we don't do that, but the
+// versions of the parallel hp-support, we don't do that, but the
// final version now does
//
// this test gives a different perspective on this issue. in the _01
-// Read in a large grid from a file and distribute hp DoFs on it using
+// Read in a large grid from a file and distribute hp-DoFs on it using
// FE_Q elements of different orders on different cells. The
// active_fe_index on each cell is determined in a mostly random way,
// but so that it is the same regardless of the number of processors.
//
-// We used to treat hp DoF unification on vertices and faces
+// We used to treat hp-DoF unification on vertices and faces
// differently depending on whether we are in the interior of a
// subdomain or at a processor boundary. But later versions of the
// code did away with this distinction, and now the total number of
-// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp
+// have a 2x2 coarse mesh (or 2x2x1) and verify DoF indices in the hp-
// case with an FECollection that contains multiple copies of the same
-// FESystem object, consisting of two FE_Q(2) elements. the hp code will
+// FESystem object, consisting of two FE_Q(2) elements. the hp-code will
// unify DoF indices on boundaries between all subdomains.
//
// in this testcase, three FESystem objects are distributed on four
-// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp
+// have a 2x1 coarse mesh (or 2x1x1) and verify DoF indices in the hp-
// case with a FECollection that contains two finite elements that do
// not dominate each other. Here, a (FE_Q(1) x FE_Q(2)) and a
// (FE_Q(2) x FE_Q(1)) element on two separate subdomains face each
-// other. the hp code will unify DoF indices on boundaries between all
+// other. the hp-code will unify DoF indices on boundaries between all
// subdomains.
// We flag the first half of all cells to be refined and the last half of all
- // cells to be coarsened for p adapativity. Ultimately, the first quarter of
- // all cells will be flagged for p refinement, and the last quarter for p
+ // cells to be coarsened for p-adapativity. Ultimately, the first quarter of
+ // all cells will be flagged for p-refinement, and the last quarter for p-
// coarsening.
Vector<double> indicators(tria.n_active_cells());
Functions::ZeroFunction<dim>(),
constraints);
#ifdef DEBUG
- // We did not think about hp constraints on ghost cells yet.
+ // We did not think about hp-constraints on ghost cells yet.
// Thus, we are content with verifying their consistency for now.
IndexSet locally_active_dofs;
DoFTools::extract_locally_active_dofs(dof_handler, locally_active_dofs);
// check interpolation of boundary values for complex-valued
-// objects and the hp case
+// objects and the hp-case
#include <deal.II/base/function_lib.h>