From: Guido Kanschat Date: Thu, 30 Mar 2006 15:02:59 +0000 (+0000) Subject: copy function unchanged from header X-Git-Tag: v8.0.0~11944 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d7a839dd98c172205875ec93d1a9a3326b77b8d;p=dealii.git copy function unchanged from header git-svn-id: https://svn.dealii.org/trunk@12774 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 6e217055eb..f07aab84be 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -319,6 +319,23 @@ FiniteElement::get_prolongation_matrix (const unsigned int child) const } +template +unsigned int +FiniteElement::component_to_block_index (const unsigned int index) const +{ + Assert (index < this->n_components(), + ExcIndexRange(index, 0, this->n_components())); + // The block is computed simply as + // first block of this base plus + // the index within the base blocks + const std::pair + base = component_to_base_index(index); + // Integer division used on purpose! + const unsigned int block_in_base = base.second / base_element(base.first).n_components(); + return first_block_of_base(base.first) + block_in_base; +} + + template bool FiniteElement::prolongation_is_implemented () const