From: guido Date: Thu, 30 Mar 2006 15:02:59 +0000 (+0000) Subject: copy function unchanged from header X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=318989b76581f7b10f8db67cf43779b509d0211c;p=dealii-svn.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