--- /dev/null
+Deprecated: FiniteElement::compare_for_face_domination() has been
+deprecated and will be replaced by the more versatile function
+FiniteElement::compare_for_domination().
+<br>
+(Marc Fehling, 2018/10/11)
--- /dev/null
+New: Function FiniteElement::compare_for_domination() inspects two
+FiniteElement objects upon FiniteElementDomination, and uses a codim
+parameter that determines in which subspace we actually compare them.
+<br>
+(Marc Fehling, 2018/10/11)
* For a definition of domination, see FiniteElementDomination::Domination
* and in particular the
* @ref hp_paper "hp paper".
+ *
+ * @deprecated Use compare_for_domination() with `codim=1` instead.
*/
- virtual FiniteElementDomination::Domination
+ DEAL_II_DEPRECATED virtual FiniteElementDomination::Domination
compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const;
+ const FiniteElement<dim, spacedim> &fe_other) const final;
+
+ /**
+ * Return whether this element dominates another one given as argument
+ * @p fe_other, whether it is the other way around, whether neither dominates,
+ * or if either could dominate. The @p codim parameter describes the codimension
+ * of the investigated subspace and specifies that it is subject to this
+ * comparison. For example, if `codim==0` then this function compares which
+ * element dominates at the cell level. If `codim==1`, then the elements are
+ * compared at faces, i.e., the comparison happens between the function spaces
+ * of the two finite elements as restricted to a face. Larger values of
+ * `codim` work correspondingly.
+ *
+ * For a definition of domination, see FiniteElementDomination::Domination
+ * and in particular the
+ * @ref hp_paper "hp paper".
+ */
+ virtual FiniteElementDomination::Domination
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const;
//@}
* strictly larger than that of the dominating element. For example, in 2-d
* Q(2) elements dominate Q(4) elements, because the traces of Q(4) elements
* are quartic polynomials which is a space strictly larger than the
- * quadratic polynomials (the restriction of the Q(2) element). In general,
- * Q(k) dominates Q(k') if $k\le k'$.
+ * quadratic polynomials (the restriction of the Q(2) element). Similar
+ * reasonings apply for vertices and cells as well. In general, Q(k) dominates
+ * Q(k') if $k\le k'$.
*
- * This enum is used in the FiniteElement::compare_for_face_domination()
- * function 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
+ * This enum is used in the FiniteElement::compare_for_domination() function
+ * 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"
* 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
* of a comparison for mutual domination: the dominated side is constrained
* to the dominating one.
*
- * A similar situation happens in 3d, where we have to consider different
- * elements meeting at only an edge, not an entire face. Such comparisons
- * are then implemented in the FiniteElement::compare_for_line_domination()
- * function.
- *
* Note that there are situations where neither side dominates. The
* @ref hp_paper "hp paper"
* lists two case, with the simpler one being that a $Q_2\times Q_1$ vector-
const FiniteElement<dim, spacedim> &fe_other) const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
-
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* Return a string that uniquely identifies a finite element. This class
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* @}
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* @}
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* @}
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* @}
const FiniteElement<dim, spacedim> &fe_other) const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementBase::Domination and in
- * particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
//@}
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
/**
* @}
*/
hp_quad_dof_identities(
const FiniteElement<1, spacedim> &fe_other) const override;
- /**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
- */
- virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<1, spacedim> &fe_other) const override;
-
/**
* Return a list of constant modes of the element. For this element, it
* simply returns one row with all entries set to true.
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* Return a list of constant modes of the element. For this element, the
hp_constraints_are_implemented() const override;
/**
- * Return whether this element dominates the one, which is given as
- * argument.
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim = 0) const override final;
/**
* If, on a vertex, several finite elements are active, the hp code first
get_subface_interpolation_matrix(const FiniteElement<dim> &source,
const unsigned int subface,
FullMatrix<double> &matrix) const override;
+
/**
* Projection from a fine grid space onto a coarse grid space. If this
* projection operator is associated with a matrix @p P, then the
* finite element (default = 1).
*
* Second argument decides whether FE_Nothing will dominate any other FE in
- * compare_for_face_domination() (default = false). Therefore at interfaces
- * where, for example, a Q1 meets an FE_Nothing, we will force the traces of
- * the two functions to be the same. Because the FE_Nothing encodes a space
- * that is zero everywhere, this means that the Q1 field will be forced to
- * become zero at this interface.
+ * compare_for_domination() (default = false). Therefore at interfaces where,
+ * for example, a Q1 meets an FE_Nothing, we will force the traces of the two
+ * functions to be the same. Because the FE_Nothing encodes a space that is
+ * zero everywhere, this means that the Q1 field will be forced to become zero
+ * at this interface.
*/
FE_Nothing(const unsigned int n_components = 1, const bool dominate = false);
&output_data) const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*
* In the current case, this element is assumed to dominate if the second
* argument in the constructor @p dominate is true. When this argument is
* dominate. Otherwise there are no_requirements.
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
private:
/**
* If true, this element will dominate any other apart from itself in
- * compare_for_face_domination();
+ * compare_for_domination(). This is because a space that only contains the
+ * zero function is definitely smaller (and consequently dominant) when
+ * compared to any other finite element space.
*/
const bool dominate;
};
convert_generalized_support_point_values_to_dof_values(
const std::vector<Vector<double>> &support_point_values,
std::vector<double> & nodal_values) const override;
+
+ /**
+ * @copydoc FiniteElement::compare_for_domination()
+ */
+ virtual FiniteElementDomination::Domination
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
};
hp_quad_dof_identities(
const FiniteElement<dim, spacedim> &fe_other) const override;
- /**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
- */
- virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
//@}
/**
virtual std::unique_ptr<FiniteElement<dim, spacedim>>
clone() const override;
+ /**
+ * @copydoc FiniteElement::compare_for_domination()
+ */
+ virtual FiniteElementDomination::Domination
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
private:
/**
* Return the restriction_is_additive flags. Only the last components for
virtual std::unique_ptr<FiniteElement<dim, spacedim>>
clone() const override;
+ /**
+ * @copydoc FiniteElement::compare_for_domination()
+ */
+ virtual FiniteElementDomination::Domination
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
private:
/**
* Return the restriction_is_additive flags. Only the last component is
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_quad_dof_identities(const FiniteElement<dim> &fe_other) const override;
+ /**
+ * @copydoc FiniteElement::compare_for_domination()
+ */
+ virtual FiniteElementDomination::Domination
+ compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
/*@}*/
/**
const unsigned int subface,
FullMatrix<double> &matrix) const override;
- /**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
- */
- virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const override;
-
/**
* Determine an estimate for the memory consumption (in bytes) of this
* object.
*/
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
//@}
};
virtual std::vector<std::pair<unsigned int, unsigned int>>
hp_quad_dof_identities(const FiniteElement<dim> &fe_other) const override;
+ /**
+ * @copydoc FiniteElement::compare_for_domination()
+ */
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim = 0) const override final;
private:
/**
const FiniteElement<dim, spacedim> &fe_other) const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
+
//@}
/**
FullMatrix<double> &matrix) const override;
/**
- * Return whether this element dominates the one given as argument when they
- * meet at a common face, whether it is the other way around, whether
- * neither dominates, or if either could dominate.
- *
- * For a definition of domination, see FiniteElementDomination::Domination
- * and in particular the
- * @ref hp_paper "hp paper".
+ * @copydoc FiniteElement::compare_for_domination()
*/
virtual FiniteElementDomination::Domination
- compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const override;
+ compare_for_domination(const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim = 0) const override final;
private:
/**
* within that set of dominating elements, we find the <i>least</i>
* dominant one.
*
- * For example, if
- * an FECollection consists of `{FE_Q(1),FE_Q(2),FE_Q(3),FE_Q(4)}` elements
+ * For example, if an FECollection consists of
+ * `{FE_Q(1),FE_Q(2),FE_Q(3),FE_Q(4)}` elements
* and the argument @p fes equals `{2,3}`, then the set of dominating
* elements consists of `{0,1,2}`, of which `2` (i.e., the `FE_Q(3)`) is the
* least dominant one, and then that's what the function returns.
*
- * On the other hand, if the
- * FECollection consists of
- * `{FE_Q(1)xFE_Q(1),FE_Q(2)xFE_Q(2),FE_Q(2)xFE_Q(3), FE_Q(3)xFE_Q(2)}`
- * elements and the argument is again
- * @p fes equal to `{2,3}`, then the set of dominating
+ * On the other hand, if the FECollection consists of
+ * `{FE_Q(1)xFE_Q(1),FE_Q(2)xFE_Q(2),FE_Q(2)xFE_Q(3),FE_Q(3)xFE_Q(2)}`
+ * elements and the argument is again @p fes equal to `{2,3}`, then the set of dominating
* elements consists of `{0,1}` because now neither of the last two
* elements dominates the other, of which `1` (i.e., the `FE_Q(2)xFE_Q(2)`)
* is the least dominant one -- so that's what the function returns in
* a single element `{3}`, then the function returns 3.
*
* If the function is not able to find a finite element that satisfies
- * the description above, the function
- * returns numbers::invalid_unsigned_int. An example would go like this:
- * If the FECollection consists of `{FE_Nothing
- * x FE_Nothing, FE_Q(1)xFE_Q(2), FE_Q(2)xFE_Q(1)}` with @p fes as `{1}`,
+ * the description above, the function returns
+ * numbers::invalid_unsigned_int. An example would go like this:
+ * If the FECollection consists of `{FE_Nothing x FE_Nothing, FE_Q(1)xFE_Q(2), FE_Q(2)xFE_Q(1)}` with @p fes as `{1}`,
* the function will not find a most dominating element as the default
* behavior of FE_Nothing is to return
* FiniteElementDomination::no_requirements when comparing for face
- * domination with any other element. In other words, the set of
- * dominating elements is empty, and we can not find a least dominant
- * one among it. The return value is therefore
- * numbers::invalid_unsigned_int.
+ * domination with any other element. In other words, the set of dominating
+ * elements is empty, and we can not find a least dominant one among it. The
+ * return value is therefore numbers::invalid_unsigned_int.
+ *
+ * @deprecated Use
+ * hp::FECollection::find_least_face_dominating_fe_in_collection(fes, 1)
+ * instead.
*/
- unsigned int
- find_least_face_dominating_fe_in_collection(
- const std::set<unsigned int> &fes) const;
+ DEAL_II_DEPRECATED unsigned int
+ find_least_face_dominating_fe(const std::set<unsigned int> &fes) const;
/**
- * @copydoc FECollection::find_least_face_dominating_fe_in_collection()
+ * Try to find a least dominant finite element inside this FECollection
+ * which dominates all of those finite elements in the current collection
+ * indexed by the numbers provided through @p fes . In other words, we
+ * first form the set of elements in this collection that dominate
+ * all of the ones that are indexed by the argument @p fes, and then
+ * within that set of dominating elements, we find the <i>least</i>
+ * dominant one.
+ *
+ * For example, if an FECollection consists of
+ * `{FE_Q(1),FE_Q(2),FE_Q(3),FE_Q(4)}` elements
+ * and the argument @p fes equals `{2,3}`, then the set of dominating
+ * elements consists of `{0,1,2}`, of which `2` (i.e., the `FE_Q(3)`) is the
+ * least dominant one, and then that's what the function returns.
+ *
+ * On the other hand, if the FECollection consists of
+ * `{FE_Q(1)xFE_Q(1),FE_Q(2)xFE_Q(2),FE_Q(2)xFE_Q(3),FE_Q(3)xFE_Q(2)}`
+ * elements and the argument is again @p fes equal to `{2,3}`, then the set of dominating
+ * elements consists of `{0,1}` because now neither of the last two
+ * elements dominates the other, of which `1` (i.e., the `FE_Q(2)xFE_Q(2)`)
+ * is the least dominant one -- so that's what the function returns in
+ * this case.
+ *
+ * For the purpose of this function by domination we consider either
+ * FiniteElementDomination::Domination::this_element_dominates or
+ * FiniteElementDomination::Domination::either_element_can_dominate;
+ * therefore the element can dominate itself. Thus, if an FECollection
+ * contains `{FE_Q(1),FE_Q(2),FE_Q(3),FE_Q(4)}` and @p fes only has
+ * a single element `{3}`, then the function returns 3.
*
- * @deprecated This function has been renamed. Use
- * hp::FECollection::find_least_face_dominating_fe_in_collection() instead.
+ * If the function is not able to find a finite element that satisfies
+ * the description above, the function returns
+ * numbers::invalid_unsigned_int. An example would go like this:
+ * If the FECollection consists of `{FE_Nothing x FE_Nothing, FE_Q(1)xFE_Q(2), FE_Q(2)xFE_Q(1)}` with @p fes as `{1}`,
+ * the function will not find a most dominating element as the default
+ * behavior of FE_Nothing is to return
+ * FiniteElementDomination::no_requirements when comparing for face
+ * domination with any other element. In other words, the set of dominating
+ * elements is empty, and we can not find a least dominant one among it. The
+ * return value is therefore numbers::invalid_unsigned_int.
+ *
+ * The @p codim parameter describes the codimension of of the investigated
+ * subspace and specifies that it is subject to this comparison.
*/
- DEAL_II_DEPRECATED unsigned int
- find_least_face_dominating_fe(const std::set<unsigned int> &fes) const;
+ unsigned int
+ find_least_dominating_fe_in_collection(const std::set<unsigned int> &fes,
+ const unsigned int codim = 0) const;
/**
* Try to find a most face dominating finite element inside the subset of
* answer is FE_Q(3) and therefore this function will return its index in
* the FECollection, namely `2`.
*
- * This function differs from find_least_face_dominating_fe() in such a way
- * that it looks for the most dominating finite element within the given
+ * This function differs from find_least_dominating_fe_in_collection() in
+ * such a way that it looks for the most dominating finite element within
+ * the given
* subset @p fes, instead of finding a finite element in the whole
* FECollection that dominates all elements of the subset @p fes.
*
*
* If the function is not able to find a finite element, the function
* returns numbers::invalid_unsigned_int.
+ *
+ * The @p codim parameter describes the codimension of of the investigated
+ * subspace and specifies that it is subject to this comparison.
*/
unsigned int
- find_face_dominating_fe_in_subset(const std::set<unsigned int> &fes) const;
+ find_dominating_fe_in_subset(const std::set<unsigned int> &fes,
+ const unsigned int codim = 0) const;
/**
* Return a component mask with as many elements as this object has vector
fe_indices_children.insert(child->active_fe_index());
}
- fe_index = dof_handler->get_fe()
- .find_least_face_dominating_fe_in_collection(
- fe_indices_children);
+ fe_index =
+ dof_handler->get_fe_collection()
+ .find_least_dominating_fe_in_collection(fe_indices_children,
+ /*codim=*/0);
Assert(fe_index != numbers::invalid_unsigned_int,
ExcMessage(
cell->child(child_index)->active_fe_index());
fe_index =
- dof_handler->get_fe().find_least_face_dominating_fe_in_collection(
- fe_indices_children);
+ dof_handler->get_fe_collection()
+ .find_least_dominating_fe_in_collection(fe_indices_children,
+ /*codim=*/0);
Assert(fe_index != numbers::invalid_unsigned_int,
ExcMessage(
cell->child(child_index)->active_fe_index());
fe_index = dof_handler->get_fe_collection()
- .find_least_face_dominating_fe_in_collection(
- fe_indices_children);
+ .find_least_dominating_fe_in_collection(
+ fe_indices_children, /*codim=*/0);
Assert(
fe_index != numbers::invalid_unsigned_int,
// the ones that are used on this line
const unsigned int most_dominating_fe_index =
dof_handler.get_fe_collection()
- .find_face_dominating_fe_in_subset(fe_indices);
+ .find_dominating_fe_in_subset(fe_indices,
+ /*codim=*/dim - 1);
// if we found the most dominating element, then use this
// to eliminate some of the degrees of freedom by
// element of the ones that are used on this quad
const unsigned int most_dominating_fe_index =
dof_handler.get_fe_collection()
- .find_face_dominating_fe_in_subset(fe_indices);
+ .find_dominating_fe_in_subset(fe_indices,
+ /*codim=*/dim - 2);
// if we found the most dominating element, then use
// this to eliminate some of the degrees of freedom
// the ones that are used on this line
const unsigned int most_dominating_fe_index =
dof_handler.get_fe_collection()
- .find_face_dominating_fe_in_subset(fe_indices);
+ .find_dominating_fe_in_subset(fe_indices,
+ /*codim=*/dim - 1);
// if we found the most dominating element, then use this
// to eliminate some of the degrees of freedom by
// element of the ones that are used on this quad
const unsigned int most_dominating_fe_index =
dof_handler.get_fe_collection()
- .find_face_dominating_fe_in_subset(fe_indices);
+ .find_dominating_fe_in_subset(fe_indices,
+ /*codim=*/dim - 2);
// if we found the most dominating element, then use
// this to eliminate some of the degrees of freedom
{
mother_face_dominates =
mother_face_dominates &
- (cell->get_fe().compare_for_face_domination(
- subcell->get_fe()));
+ (cell->get_fe().compare_for_domination(
+ subcell->get_fe(), /*codim=*/1));
fe_ind_face_subface.insert(
subcell->active_fe_index());
}
// subface between FE_Q(1) and FE_Nothing, there are
// no constraints that we need to take care of. in
// that case, just continue
- if (cell->get_fe().compare_for_face_domination(
- subface->get_fe(subface_fe_index)) ==
+ if (cell->get_fe().compare_for_domination(
+ subface->get_fe(subface_fe_index),
+ /*codim=*/1) ==
FiniteElementDomination::no_requirements)
continue;
// 2) there is no dominating FE among sub faces (e.g.
// Q1xQ2 vs Q2xQ1), but subfaces still dominate mother
// face (e.g. Q2xQ2). To cover this case we would have
- // to use find_least_face_dominating_fe_in_collection()
+ // to use find_least_dominating_fe_in_collection()
// of FECollection with fe_indices of sub faces. 3)
// Finally, it could happen that we got here because
// neither_element_dominates (e.g. Q1xQ1xQ2 and Q1xQ2xQ1
// for subfaces and Q2xQ1xQ1 for mother face). This
// requires usage of
- // find_least_face_dominating_fe_in_collection() with
+ // find_least_dominating_fe_in_collection() with
// fe_indices of sub-faces and the mother face.
// Note that the last solution covers the first two
// scenarios, thus we stick with it assuming that we
// won't lose much time/efficiency.
const unsigned int dominating_fe_index =
- fe_collection
- .find_least_face_dominating_fe_in_collection(
- fe_ind_face_subface);
+ fe_collection.find_least_dominating_fe_in_collection(
+ fe_ind_face_subface, /*codim=*/1);
AssertThrow(
dominating_fe_index != numbers::invalid_unsigned_int,
ExcMessage(
neighbor = cell->neighbor(face);
// see which side of the face we have to constrain
- switch (cell->get_fe().compare_for_face_domination(
- neighbor->get_fe()))
+ switch (
+ cell->get_fe().compare_for_domination(neighbor->get_fe(),
+ /*codim=*/1))
{
case FiniteElementDomination::this_element_dominates:
{
&fe_collection = dof_handler.get_fe_collection();
const unsigned int dominating_fe_index =
fe_collection
- .find_least_face_dominating_fe_in_collection(
- fes);
+ .find_least_dominating_fe_in_collection(
+ fes, /*codim=*/1);
AssertThrow(
dominating_fe_index !=
template <int dim, int spacedim>
FiniteElementDomination::Domination
FiniteElement<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &) const
+ const FiniteElement<dim, spacedim> &fe_other) const
+{
+ return this->compare_for_domination(fe_other, 1);
+}
+
+
+
+template <int dim, int spacedim>
+FiniteElementDomination::Domination
+FiniteElement<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &,
+ const unsigned int) const
{
Assert(false, ExcNotImplemented());
return FiniteElementDomination::neither_element_dominates;
#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/fe/fe_bernstein.h>
+#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/fe_tools.h>
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_Bernstein<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_Bernstein<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
if (const FE_Bernstein<dim, spacedim> *fe_b_other =
dynamic_cast<const FE_Bernstein<dim, spacedim> *>(&fe_other))
{
else
return FiniteElementDomination::other_element_dominates;
}
- else if (const FE_Nothing<dim> *fe_nothing =
- dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ else if (const FE_Nothing<dim, spacedim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim, spacedim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/fe/fe_dgp.h>
+#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_tools.h>
#include <sstream>
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_DGP<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_DGP<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- // check whether both are discontinuous elements, see the description of
- // FiniteElementDomination::Domination
- if (dynamic_cast<const FE_DGP<dim, spacedim> *>(&fe_other) != nullptr)
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // ---------------------------
+ if (codim > 0)
+ // this is a discontinuous element, so by definition there will
+ // be no constraints wherever this element comes together with
+ // any other kind of element
return FiniteElementDomination::no_requirements;
+ // cell domination
+ // ---------------
+ if (const FE_DGP<dim, spacedim> *fe_dgp_other =
+ dynamic_cast<const FE_DGP<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_dgp_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_dgp_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
Assert(false, ExcNotImplemented());
return FiniteElementDomination::neither_element_dominates;
}
#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/fe/fe_dgp_monomial.h>
+#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_tools.h>
#include <sstream>
template <int dim>
FiniteElementDomination::Domination
-FE_DGPMonomial<dim>::compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const
+FE_DGPMonomial<dim>::compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim) const
{
- // check whether both are discontinuous
- // elements, see
- // the description of
- // FiniteElementDomination::Domination
- if (dynamic_cast<const FE_DGPMonomial<dim> *>(&fe_other) != nullptr)
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // ---------------------------
+ if (codim > 0)
+ // this is a discontinuous element, so by definition there will
+ // be no constraints wherever this element comes together with
+ // any other kind of element
return FiniteElementDomination::no_requirements;
+ // cell domination
+ // ---------------
+ if (const FE_DGPMonomial<dim> *fe_monomial_other =
+ dynamic_cast<const FE_DGPMonomial<dim> *>(&fe_other))
+ {
+ if (this->degree < fe_monomial_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_monomial_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
Assert(false, ExcNotImplemented());
return FiniteElementDomination::neither_element_dominates;
}
#include <deal.II/fe/fe.h>
#include <deal.II/fe/fe_dgp_nonparametric.h>
+#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_values.h>
#include <deal.II/fe/mapping.h>
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_DGPNonparametric<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_DGPNonparametric<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- // check whether both are discontinuous
- // elements, see the description of
- // FiniteElementDomination::Domination
- if (dynamic_cast<const FE_DGPNonparametric<dim, spacedim> *>(&fe_other) !=
- nullptr)
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // ---------------------------
+ if (codim > 0)
+ // this is a discontinuous element, so by definition there will
+ // be no constraints wherever this element comes together with
+ // any other kind of element
return FiniteElementDomination::no_requirements;
+ // cell domination
+ // ---------------
+ if (const FE_DGPNonparametric<dim, spacedim> *fe_nonparametric_other =
+ dynamic_cast<const FE_DGPNonparametric<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_nonparametric_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_nonparametric_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
Assert(false, ExcNotImplemented());
return FiniteElementDomination::neither_element_dominates;
}
#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/fe/fe.h>
+#include <deal.II/fe/fe_bernstein.h>
#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_nothing.h>
+#include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_q_bubbles.h>
+#include <deal.II/fe/fe_q_dg0.h>
+#include <deal.II/fe/fe_q_hierarchical.h>
+#include <deal.II/fe/fe_q_iso_q1.h>
#include <deal.II/fe/fe_tools.h>
#include <deal.II/lac/vector.h>
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_DGQ<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> & /*fe_other*/) const
+FE_DGQ<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- // this is a discontinuous element, so by definition there will
- // be no constraints wherever this element comes together with
- // any other kind of element
- return FiniteElementDomination::no_requirements;
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // ---------------------------
+ if (codim > 0)
+ // this is a discontinuous element, so by definition there will
+ // be no constraints wherever this element comes together with
+ // any other kind of element
+ return FiniteElementDomination::no_requirements;
+
+ // cell domination
+ // ---------------
+ // The following block of conditionals is rather ugly, but there is currently
+ // no other way how to deal with a robust comparison of FE_DGQ elements with
+ // relevant others in the current implementation.
+ if (const FE_DGQ<dim, spacedim> *fe_dgq_other =
+ dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_dgq_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_dgq_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Q<dim, spacedim> *fe_q_other =
+ dynamic_cast<const FE_Q<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_q_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_q_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Bernstein<dim, spacedim> *fe_bernstein_other =
+ dynamic_cast<const FE_Bernstein<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_bernstein_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_bernstein_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Q_Bubbles<dim, spacedim> *fe_bubbles_other =
+ dynamic_cast<const FE_Q_Bubbles<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_bubbles_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_bubbles_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Q_DG0<dim, spacedim> *fe_dg0_other =
+ dynamic_cast<const FE_Q_DG0<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_dg0_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_dg0_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Q_iso_Q1<dim, spacedim> *fe_q_iso_q1_other =
+ dynamic_cast<const FE_Q_iso_Q1<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_q_iso_q1_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_q_iso_q1_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Q_Hierarchical<dim> *fe_hierarchical_other =
+ dynamic_cast<const FE_Q_Hierarchical<dim> *>(&fe_other))
+ {
+ if (this->degree < fe_hierarchical_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_hierarchical_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
+ Assert(false, ExcNotImplemented());
+ return FiniteElementDomination::neither_element_dominates;
}
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_Enriched<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_Enriched<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face/cell domination
+ // --------------------------------
// need to decide which element constrain another.
// for example Q(2) dominate Q(4) and thus some DoFs of Q(4) will be
// constrained. If we have Q(2) and Q(4)+POU, then it's clear that Q(2)
// However, we need to check for situations like Q(4) vs Q(2)+POU.
// In that case the domination for the underlying FEs should be the other way,
// but this implies that we can't constrain POU dofs to make the field
- // continuous. In that case, through an error
+ // continuous. In that case, throw an error
// if it's also enriched, do domination based on each one's FESystem
if (const FE_Enriched<dim, spacedim> *fe_enr_other =
dynamic_cast<const FE_Enriched<dim, spacedim> *>(&fe_other))
{
- return fe_system->compare_for_face_domination(
- fe_enr_other->get_fe_system());
+ return fe_system->compare_for_domination(fe_enr_other->get_fe_system(),
+ codim);
}
else
{
}
}
+
template <int dim, int spacedim>
const FullMatrix<double> &
FE_Enriched<dim, spacedim>::get_prolongation_matrix(
* Each time we build constraints at the
* interface between two different FE_Enriched, we look for the least
* dominating FE via
- * hp::FECollection<dim,
- * spacedim>::find_least_face_dominating_fe_in_collection(). If we don't
+ * hp::FECollection::find_least_dominating_fe_in_collection(). If we don't
* take further actions, we may find a dominating FE that is too
* restrictive, i.e. enriched FE consisting of only FE_Nothing. New
* elements needs to be added to FECollection object to help find the
* on adjacent cells, an enriched FE [0 0 1] should exist and is
* found as the least dominating finite element for the two cells by
* DoFTools::make_hanging_node_constraints using a call to the function
- * hp::FECollection::find_least_face_dominating_fe_in_collection.
+ * hp::FECollection::find_least_dominating_fe_in_collection().
* Denoting the fe set in adjacent cells as {1,3} and {2,3}, this
* implies that an fe set {3} needs to be added! Based on the
* predicate configuration, this may not be automatically done without
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_FaceQ<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_FaceQ<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- if (const FE_FaceQ<dim, spacedim> *fe_q_other =
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face/cell domination
+ // --------------------------------
+ if (const FE_FaceQ<dim, spacedim> *fe_faceq_other =
dynamic_cast<const FE_FaceQ<dim, spacedim> *>(&fe_other))
{
- if (this->degree < fe_q_other->degree)
+ if (this->degree < fe_faceq_other->degree)
return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
+ else if (this->degree == fe_faceq_other->degree)
return FiniteElementDomination::either_element_can_dominate;
else
return FiniteElementDomination::other_element_dominates;
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
return FiniteElementDomination::neither_element_dominates;
}
-
-
template <int dim, int spacedim>
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_FaceQ<dim, spacedim>::get_constant_modes() const
-template <int spacedim>
-FiniteElementDomination::Domination
-FE_FaceQ<1, spacedim>::compare_for_face_domination(
- const FiniteElement<1, spacedim> & /*fe_other*/) const
-{
- return FiniteElementDomination::no_requirements;
-}
-
-
-
template <int spacedim>
std::pair<Table<2, bool>, std::vector<unsigned int>>
FE_FaceQ<1, spacedim>::get_constant_modes() const
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_FaceP<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_FaceP<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- if (const FE_FaceP<dim, spacedim> *fe_q_other =
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face/cell domination
+ // --------------------------------
+ if (const FE_FaceP<dim, spacedim> *fe_facep_other =
dynamic_cast<const FE_FaceP<dim, spacedim> *>(&fe_other))
{
- if (this->degree < fe_q_other->degree)
+ if (this->degree < fe_facep_other->degree)
return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
+ else if (this->degree == fe_facep_other->degree)
return FiniteElementDomination::either_element_can_dominate;
else
return FiniteElementDomination::other_element_dominates;
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
template <int dim>
FiniteElementDomination::Domination
-FE_Nedelec<dim>::compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const
+FE_Nedelec<dim>::compare_for_domination(const FiniteElement<dim> &fe_other,
+ const unsigned int codim) const
{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face/cell domination
+ // --------------------------------
if (const FE_Nedelec<dim> *fe_nedelec_other =
dynamic_cast<const FE_Nedelec<dim> *>(&fe_other))
{
else if (const FE_Nothing<dim> *fe_nothing =
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
- // TODO: ???
- // the FE_Nothing has no
- // degrees of
- // freedom. nevertheless, we
- // say that the FE_Q element
- // dominates so that we don't
- // have to force the FE_Q side
- // to become a zero function
- // and rather allow the
- // function to be discontinuous
- // along the interface
- // return FiniteElementDomination::other_element_dominates;
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_Nothing<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe) const
+FE_Nothing<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe,
+ const unsigned int codim) const
{
- // if FE_Nothing does not dominate, there are no requirements
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
if (!dominate)
- {
- return FiniteElementDomination::no_requirements;
- }
- // if it does and the other is FE_Nothing, either can dominate
+ // if FE_Nothing does not dominate, there are no requirements
+ return FiniteElementDomination::no_requirements;
else if (dynamic_cast<const FE_Nothing<dim> *>(&fe) != nullptr)
- {
- return FiniteElementDomination::either_element_can_dominate;
- }
- // otherwise we dominate whatever fe is provided
+ // if it does and the other is FE_Nothing, either can dominate
+ return FiniteElementDomination::either_element_can_dominate;
else
- {
- return FiniteElementDomination::this_element_dominates;
- }
+ // otherwise we dominate whatever fe is provided
+ return FiniteElementDomination::this_element_dominates;
}
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/std_cxx14/memory.h>
+#include <deal.II/fe/fe_dgq.h>
+#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q.h>
#include <deal.II/lac/vector.h>
}
+
+template <int dim, int spacedim>
+FiniteElementDomination::Domination
+FE_Q<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
+{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
+ if (const FE_Q<dim, spacedim> *fe_q_other =
+ dynamic_cast<const FE_Q<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_q_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_q_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim, spacedim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim, spacedim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
+ Assert(false, ExcNotImplemented());
+ return FiniteElementDomination::neither_element_dominates;
+}
+
+
// explicit instantiations
#include "fe_q.inst"
-template <class PolynomialType, int dim, int spacedim>
-FiniteElementDomination::Domination
-FE_Q_Base<PolynomialType, dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
-{
- if (const FE_Q_Base<PolynomialType, dim, spacedim> *fe_q_other =
- dynamic_cast<const FE_Q_Base<PolynomialType, dim, spacedim> *>(
- &fe_other))
- {
- if (this->degree < fe_q_other->degree)
- return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
- return FiniteElementDomination::either_element_can_dominate;
- else
- return FiniteElementDomination::other_element_dominates;
- }
- else if (const FE_Nothing<dim, spacedim> *fe_nothing =
- dynamic_cast<const FE_Nothing<dim, spacedim> *>(&fe_other))
- {
- if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
- else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
- }
- else if ((dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) !=
- nullptr) ||
- (dynamic_cast<const FE_DGP<dim, spacedim> *>(&fe_other) != nullptr))
- {
- // there are no requirements between continuous and
- // discontinuous elements
- return FiniteElementDomination::no_requirements;
- }
-
- Assert(false, ExcNotImplemented());
- return FiniteElementDomination::neither_element_dominates;
-}
-
-
//---------------------------------------------------------------------------
// Auxiliary functions
//---------------------------------------------------------------------------
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q_bubbles.h>
#include <deal.II/fe/fe_tools.h>
return this->restriction[refinement_case - 1][child];
}
+
+
+template <int dim, int spacedim>
+FiniteElementDomination::Domination
+FE_Q_Bubbles<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
+{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
+ if (const FE_Q_Bubbles<dim, spacedim> *fe_bubbles_other =
+ dynamic_cast<const FE_Q_Bubbles<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_bubbles_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_bubbles_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
+ Assert(false, ExcNotImplemented());
+ return FiniteElementDomination::neither_element_dominates;
+}
+
+
// explicit instantiations
#include "fe_q_bubbles.inst"
#include <deal.II/dofs/dof_accessor.h>
+#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q_dg0.h>
+template <int dim, int spacedim>
+FiniteElementDomination::Domination
+FE_Q_DG0<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
+{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
+ if (const FE_Q_DG0<dim, spacedim> *fe_dg0_other =
+ dynamic_cast<const FE_Q_DG0<dim, spacedim> *>(&fe_other))
+ {
+ if (this->degree < fe_dg0_other->degree)
+ return FiniteElementDomination::this_element_dominates;
+ else if (this->degree == fe_dg0_other->degree)
+ return FiniteElementDomination::either_element_can_dominate;
+ else
+ return FiniteElementDomination::other_element_dominates;
+ }
+ else if (const FE_Nothing<dim> *fe_nothing =
+ dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
+ {
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
+ else
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
+ }
+
+ Assert(false, ExcNotImplemented());
+ return FiniteElementDomination::neither_element_dominates;
+}
+
+
// explicit instantiations
#include "fe_q_dg0.inst"
#include <deal.II/base/std_cxx14/memory.h>
+#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q_hierarchical.h>
template <int dim>
FiniteElementDomination::Domination
-FE_Q_Hierarchical<dim>::compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const
+FE_Q_Hierarchical<dim>::compare_for_domination(
+ const FiniteElement<dim> &fe_other,
+ const unsigned int codim) const
{
- if (const FE_Q_Hierarchical<dim> *fe_q_other =
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
+ if (const FE_Q_Hierarchical<dim> *fe_hierarchical_other =
dynamic_cast<const FE_Q_Hierarchical<dim> *>(&fe_other))
{
- // the element with lowest polynomial degree
- // dominates the other.
- if (this->degree < fe_q_other->degree)
+ if (this->degree < fe_hierarchical_other->degree)
return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
+ else if (this->degree == fe_hierarchical_other->degree)
return FiniteElementDomination::either_element_can_dominate;
else
return FiniteElementDomination::other_element_dominates;
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
#include <deal.II/base/quadrature_lib.h>
#include <deal.II/base/std_cxx14/memory.h>
+#include <deal.II/fe/fe_dgq.h>
#include <deal.II/fe/fe_nothing.h>
#include <deal.II/fe/fe_q_iso_q1.h>
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_Q_iso_Q1<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_Q_iso_Q1<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face domination
+ // (if fe_other is derived from FE_DGQ)
+ // ------------------------------------
+ if (codim > 0)
+ if (dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other) != nullptr)
+ // there are no requirements between continuous and discontinuous elements
+ return FiniteElementDomination::no_requirements;
+
+ // vertex/line/face domination
+ // (if fe_other is not derived from FE_DGQ)
+ // & cell domination
+ // ----------------------------------------
if (const FE_Q_iso_Q1<dim, spacedim> *fe_q_iso_q1_other =
dynamic_cast<const FE_Q_iso_Q1<dim, spacedim> *>(&fe_other))
{
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
template <int dim>
FiniteElementDomination::Domination
-FE_RaviartThomasNodal<dim>::compare_for_face_domination(
- const FiniteElement<dim> &fe_other) const
+FE_RaviartThomasNodal<dim>::compare_for_domination(
+ const FiniteElement<dim> &fe_other,
+ const unsigned int codim) const
{
- if (const FE_RaviartThomasNodal<dim> *fe_q_other =
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face/cell domination
+ // --------------------------------
+ if (const FE_RaviartThomasNodal<dim> *fe_rt_nodal_other =
dynamic_cast<const FE_RaviartThomasNodal<dim> *>(&fe_other))
{
- if (this->degree < fe_q_other->degree)
+ if (this->degree < fe_rt_nodal_other->degree)
return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
+ else if (this->degree == fe_rt_nodal_other->degree)
return FiniteElementDomination::either_element_can_dominate;
else
return FiniteElementDomination::other_element_dominates;
}
- else if (const FE_Nothing<dim> *fe_q_other =
+ else if (const FE_Nothing<dim> *fe_nothing =
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
- if (fe_q_other->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ if (fe_nothing->is_dominating())
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // FE_Nothing has no degrees of freedom and is typically
- // used in a context where there are no continuity
- // requirements along the interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FESystem<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FESystem<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
+ // vertex/line/face/cell domination
+ // --------------------------------
// at present all we can do is to compare with other FESystems that have the
// same number of components and bases
if (const FESystem<dim, spacedim> *fe_sys_other =
// for this pair of base elements, check who dominates and combine
// with previous result
const FiniteElementDomination::Domination base_domination =
- (this->base_element(b).compare_for_face_domination(
- fe_sys_other->base_element(b)));
+ (this->base_element(b).compare_for_domination(
+ fe_sys_other->base_element(b), codim));
domination = domination & base_domination;
}
template <int dim, int spacedim>
FiniteElementDomination::Domination
-FE_TraceQ<dim, spacedim>::compare_for_face_domination(
- const FiniteElement<dim, spacedim> &fe_other) const
+FE_TraceQ<dim, spacedim>::compare_for_domination(
+ const FiniteElement<dim, spacedim> &fe_other,
+ const unsigned int codim) const
{
- if (const FE_TraceQ<dim, spacedim> *fe_q_other =
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+ (void)codim;
+
+ // vertex/line/face/cell domination
+ // --------------------------------
+ if (const FE_TraceQ<dim, spacedim> *fe_traceq_other =
dynamic_cast<const FE_TraceQ<dim, spacedim> *>(&fe_other))
{
- if (this->degree < fe_q_other->degree)
+ if (this->degree < fe_traceq_other->degree)
return FiniteElementDomination::this_element_dominates;
- else if (this->degree == fe_q_other->degree)
+ else if (this->degree == fe_traceq_other->degree)
return FiniteElementDomination::either_element_can_dominate;
else
return FiniteElementDomination::other_element_dominates;
dynamic_cast<const FE_Nothing<dim> *>(&fe_other))
{
if (fe_nothing->is_dominating())
- {
- return FiniteElementDomination::other_element_dominates;
- }
+ return FiniteElementDomination::other_element_dominates;
else
- {
- // the FE_Nothing has no degrees of freedom and it is typically used
- // in a context where we don't require any continuity along the
- // interface
- return FiniteElementDomination::no_requirements;
- }
+ // the FE_Nothing has no degrees of freedom and it is typically used
+ // in a context where we don't require any continuity along the
+ // interface
+ return FiniteElementDomination::no_requirements;
}
Assert(false, ExcNotImplemented());
{
template <int dim, int spacedim>
unsigned int
- FECollection<dim, spacedim>::find_least_face_dominating_fe_in_collection(
+ FECollection<dim, spacedim>::find_least_face_dominating_fe(
const std::set<unsigned int> &fes) const
{
+ return find_least_dominating_fe_in_collection(fes, /*codim*/ 1);
+ }
+
+
+
+ template <int dim, int spacedim>
+ unsigned int
+ FECollection<dim, spacedim>::find_least_dominating_fe_in_collection(
+ const std::set<unsigned int> &fes,
+ const unsigned int codim) const
+ {
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
+
for (auto it = fes.cbegin(); it != fes.cend(); ++it)
AssertIndexRange(*it, finite_elements.size());
// check if cur_fe can dominate all FEs in @p fes:
for (const auto &other_fe : fes)
domination =
- domination & finite_elements[cur_fe]->compare_for_face_domination(
- *finite_elements[other_fe]);
+ domination & finite_elements[cur_fe]->compare_for_domination(
+ *finite_elements[other_fe], codim);
// if we found dominating element, keep them in a set.
if (
for (const auto &other_fe : candidate_fes)
if (current_fe != other_fe)
- domination =
- domination &
- finite_elements[current_fe]->compare_for_face_domination(
- *finite_elements[other_fe]);
+ domination = domination &
+ finite_elements[current_fe]->compare_for_domination(
+ *finite_elements[other_fe], codim);
if ((domination ==
FiniteElementDomination::other_element_dominates) ||
template <int dim, int spacedim>
unsigned int
- FECollection<dim, spacedim>::find_least_face_dominating_fe(
- const std::set<unsigned int> &fes) const
+ FECollection<dim, spacedim>::find_dominating_fe_in_subset(
+ const std::set<unsigned int> &fes,
+ const unsigned int codim) const
{
- return find_least_face_dominating_fe_in_collection(fes);
- }
-
-
+ Assert(codim <= dim, ExcImpossibleInDim(dim));
- template <int dim, int spacedim>
- unsigned int
- FECollection<dim, spacedim>::find_face_dominating_fe_in_subset(
- const std::set<unsigned int> &fes) const
- {
for (auto it = fes.cbegin(); it != fes.cend(); ++it)
AssertIndexRange(*it, finite_elements.size());
for (const auto &other_fe : fes)
if (other_fe != current_fe)
domination =
- domination &
- finite_elements[current_fe]->compare_for_face_domination(
- *finite_elements[other_fe]);
+ domination & finite_elements[current_fe]->compare_for_domination(
+ *finite_elements[other_fe], codim);
// see if this element is able to dominate all the other
// ones, and if so take it
<< std::endl;
}
- deallog << "Dominating set for 1 and 2: "
- << fe_collection.find_least_face_dominating_fe_in_collection({1, 2})
+ deallog << "Face dominating set for 1 and 2: "
+ << fe_collection.find_least_dominating_fe_in_collection({1, 2},
+ /*codim=*/1)
<< std::endl;
dof_handler.distribute_dofs(fe_collection);
DEAL:0::n_blocks:4
DEAL:0::n_comp:1
DEAL:0::n_dofs:13
-DEAL:0::Dominating set for 1 and 2: 3
+DEAL:0::Face dominating set for 1 and 2: 3
9 = 0
10 = 0
12 = 0
/* clang-format off */
-// test the results of FECollection::find_least_face_dominating_fe_in_collection(), namely for:
+// test the results of FECollection::find_least_dominating_fe_in_collection()
+// for faces (codim=1), namely for:
// {Q1, Q2, Q3, Q4} with {2,3} => Q3 2
// {Q1xQ1, Q2xQ2, Q3xQ4, Q4xQ3} with {2,3} => Q2xQ2 1
// {Q1xQ1, Q3xQ4, Q4xQ3} with {1,2} => Q1xQ1 0
fe_collection.push_back(FE_Q<dim>(2));
fe_collection.push_back(FE_Q<dim>(3));
fe_collection.push_back(FE_Q<dim>(4));
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(2), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
std::set<unsigned int> fes;
fes.insert(1);
fes.insert(2);
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
fe_collection.push_back(
FESystem<dim>(FE_Nothing<dim>(), 1, FE_Q<dim>(1), 1));
const unsigned int ind =
- fe_collection.find_least_face_dominating_fe_in_collection(fes);
+ fe_collection.find_least_dominating_fe_in_collection(fes, /*codim=*/1);
if (ind == numbers::invalid_unsigned_int)
deallog << "numbers::invalid_unsigned_int" << std::endl;
else
FESystem<dim>(FE_Q<dim>(1), 1, FE_Nothing<dim>(1, true), 1));
fe_collection.push_back(
FESystem<dim>(FE_Nothing<dim>(1, true), 1, FE_Q<dim>(1), 1));
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(1), 1, FE_Q<dim>(2), 1));
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(3), 1, FE_Q<dim>(4), 1));
fe_collection.push_back(FESystem<dim>(FE_Q<dim>(4), 1, FE_Q<dim>(3), 1));
const unsigned int ind =
- fe_collection.find_least_face_dominating_fe_in_collection(fes);
+ fe_collection.find_least_dominating_fe_in_collection(fes, /*codim=*/1);
if (ind == numbers::invalid_unsigned_int)
deallog << "numbers::invalid_unsigned_int" << std::endl;
else
fe_collection.push_back(FE_Q<dim>(3));
std::set<unsigned int> fes;
fes.insert(3);
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
fe_collection.push_back(FE_Q<dim>(4));
fe_collection.push_back(FE_Q<dim>(1));
fe_collection.push_back(FE_Q<dim>(1));
- deallog << fe_collection.find_least_face_dominating_fe_in_collection(fes)
+ deallog << fe_collection.find_least_dominating_fe_in_collection(fes,
+ /*codim=*/1)
<< std::endl;
}
}