From: wolf Date: Thu, 17 Oct 2002 18:19:47 +0000 (+0000) Subject: Add (face_)?system_to_base_index functions. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de7e65d8b2df4fa128346898afa9c67e0306837;p=dealii-svn.git Add (face_)?system_to_base_index functions. git-svn-id: https://svn.dealii.org/trunk@6677 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_base.h b/deal.II/deal.II/include/fe/fe_base.h index 9a7c38e6c6..3f4ca77227 100644 --- a/deal.II/deal.II/include/fe/fe_base.h +++ b/deal.II/deal.II/include/fe/fe_base.h @@ -757,8 +757,10 @@ class FiniteElementBase : public Subscriptor, * that has more than one * vector-component). For this * information, refer to the - * @p{system_to_base_table} - * field. + * @p{system_to_base_table} field + * and the + * @p{system_to_base_index} + * function. */ std::pair system_to_component_index (const unsigned int index) const; @@ -770,6 +772,55 @@ class FiniteElementBase : public Subscriptor, */ std::pair face_system_to_component_index (const unsigned int index) const; + + /** + * Return for shape function + * @p{index} the base element it + * belongs to, the number of the + * copy of this base element + * (which is between zero and the + * multiplicity of this element), + * and the index of this shape + * function within this base + * element. + * + * If the element is not composed of + * others, then base and instance + * are always zero, and the index + * is equal to the number of the + * shape function. If the element + * is composed of single + * instances of other elements + * (i.e. all with multiplicity + * one) all of which are scalar, + * then base values and dof + * indices within this element + * are equal to the + * @p{system_to_component_table}. It + * differs only in case the + * element is composed of other + * elements and at least one of + * them is vector-valued itself. + * + * This function returns valid + * values also in the case of + * vector-valued + * (i.e. non-primitive) shape + * functions, in contrast to the + * @p{system_to_component_index} + * function. + */ + std::pair, unsigned int> + system_to_base_index (const unsigned int index) const; + + /** + * Same as + * @p{system_to_base_index}, but + * for degrees of freedom located + * on a face. + */ + std::pair, unsigned int> + face_system_to_base_index (const unsigned int index) const; /** * Given a vector component, @@ -1589,9 +1640,35 @@ FiniteElementBase::face_system_to_component_index (const unsigned int index typename FiniteElementBase::ExcShapeFunctionNotPrimitive(index)); return face_system_to_component_table[index]; +}; + + + +template +inline +std::pair,unsigned int> +FiniteElementBase::system_to_base_index (const unsigned int index) const +{ + Assert (index < system_to_base_table.size(), + ExcIndexRange(index, 0, system_to_base_table.size())); + return system_to_base_table[index]; } + + +template +inline +std::pair,unsigned int> +FiniteElementBase::face_system_to_base_index (const unsigned int index) const +{ + Assert(index < face_system_to_base_table.size(), + ExcIndexRange(index, 0, face_system_to_base_table.size())); + return face_system_to_base_table[index]; +}; + + + template inline std::pair diff --git a/deal.II/doc/news/2002/c-3-4.html b/deal.II/doc/news/2002/c-3-4.html index ff1189c747..340ac498c9 100644 --- a/deal.II/doc/news/2002/c-3-4.html +++ b/deal.II/doc/news/2002/c-3-4.html @@ -403,7 +403,17 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
  1. - Changed: The FiniteElement::system_to_base_index function now + exports the values of the FiniteElement::system_to_base_table member + variable. Likewise for the indices on faces. +
    + (WB 2002/10/17) +

    + +
  2. + New: The FiniteElement::element_multiplicity function was previously only available in the FESystem class, where it actually returned a non-trivial value. However, in some