From b2717c82cebdf456da1b034167b2b1404be9ca02 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Fri, 23 Aug 2013 04:42:47 +0000 Subject: [PATCH] fix bug in local renumbering git-svn-id: https://svn.dealii.org/trunk@30445 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/fe/fe_tools.h | 7 ++++++- deal.II/source/fe/fe.cc | 16 ++++++++-------- deal.II/source/fe/fe_tools.cc | 3 +-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/deal.II/include/deal.II/fe/fe_tools.h b/deal.II/include/deal.II/fe/fe_tools.h index 0722155e82..993a1cdcec 100644 --- a/deal.II/include/deal.II/fe/fe_tools.h +++ b/deal.II/include/deal.II/fe/fe_tools.h @@ -160,7 +160,12 @@ namespace FETools * indices of each local block. If it is false, then the block sizes are * returned. * - * @todo Which way does this vector map the numbers? + * The vector renumbering will be indexed by the standard + * numbering of local degrees of freedom, namely first first vertex, + * then second vertex, after vertices lines, quads, and hexes. For + * each index, the entry indicates the index which this degree of + * freedom receives in a umbering scheme, where the first block is + * numbered completely before the second. */ template void compute_block_renumbering ( diff --git a/deal.II/source/fe/fe.cc b/deal.II/source/fe/fe.cc index 501e7e0d81..1c4db8ffbc 100644 --- a/deal.II/source/fe/fe.cc +++ b/deal.II/source/fe/fe.cc @@ -190,16 +190,16 @@ FiniteElement::FiniteElement ( system_to_component_table.resize(this->dofs_per_cell); face_system_to_component_table.resize(this->dofs_per_face); for (unsigned int j=0 ; jdofs_per_cell ; ++j) - { - system_to_component_table[j] = std::pair(0,j); - system_to_base_table[j] = std::make_pair(std::make_pair(0U,0U),j); - } + system_to_component_table[j] = std::pair(0,j); for (unsigned int j=0 ; jdofs_per_face ; ++j) - { - face_system_to_component_table[j] = std::pair(0,j); - face_system_to_base_table[j] = std::make_pair(std::make_pair(0U,0U),j); - } + face_system_to_component_table[j] = std::pair(0,j); } + + for (unsigned int j=0 ; jdofs_per_cell ; ++j) + system_to_base_table[j] = std::make_pair(std::make_pair(0U,0U),j); + for (unsigned int j=0 ; jdofs_per_face ; ++j) + face_system_to_base_table[j] = std::make_pair(std::make_pair(0U,0U),j); + // Fill with default value; may be changed by constructor of derived class. base_to_block_indices.reinit(1,1); diff --git a/deal.II/source/fe/fe_tools.cc b/deal.II/source/fe/fe_tools.cc index 0c5d607bb8..4ba84c5a43 100644 --- a/deal.II/source/fe/fe_tools.cc +++ b/deal.II/source/fe/fe_tools.cc @@ -390,8 +390,7 @@ namespace FETools start_indices[i] = k; k += block_data[i]; } - -//TODO:[GK] This does not work for a single RT + for (unsigned int i=0; i -- 2.39.5