From: Guido Kanschat Date: Thu, 26 Jan 2006 12:39:39 +0000 (+0000) Subject: DofTools compile again X-Git-Tag: v8.0.0~12492 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64fca26d44887feb2b36f58616cf02030daed599;p=dealii.git DofTools compile again git-svn-id: https://svn.dealii.org/trunk@12183 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index ce2fe38089..1c1478b2e0 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -440,7 +440,16 @@ DoFTools::compute_row_length_vector( typename DH::active_cell_iterator cell; std::vector cell_indices; std::vector neighbor_indices; - + + // We have to translate the + // couplings from components to + // blocks, so this works for + // nonprimitive elements as well. + std::vector > couple_cell; + std::vector > couple_face; + convert_couplings_to_blocks(dofs, couplings, couple_cell); + convert_couplings_to_blocks(dofs, flux_couplings, couple_face); + // We loop over cells and go from // cells to lower dimensional // objects. This is the only way to @@ -451,6 +460,8 @@ DoFTools::compute_row_length_vector( for (cell = dofs.begin_active(); cell != end; ++cell) { const FiniteElement& fe = cell->get_fe(); + const unsigned int fe_index = cell->active_fe_index(); + Assert (fe.is_primitive(), typename FiniteElement::ExcFENotPrimitive()); Assert (couplings.n_rows()==fe.n_components(), ExcDimensionMismatch(couplings.n_rows(), fe.n_components())); @@ -488,13 +499,15 @@ DoFTools::compute_row_length_vector( unsigned int increment; while (i < fe.first_line_index) { - for (unsigned int comp=0;comp1) - ? (DH::dimension-1) - : GeometryInfo::faces_per_cell) - * fe.base_element(fe.component_to_base(comp).first).dofs_per_face; + for (unsigned int base=0;base1) + ? (DH::dimension-1) + : GeometryInfo::faces_per_cell) + * fe.base_element(base).dofs_per_face; row_lengths[cell_indices[i]] += increment; - } + } ++i; } // Now quads in 2D and 3D while (i < fe.first_hex_index) { - for (unsigned int comp=0;comp2) - ? (DH::dimension-2) - : GeometryInfo::faces_per_cell) - * fe.base_element(fe.component_to_base(comp).first).dofs_per_face; + for (unsigned int base=0;base2) + ? (DH::dimension-2) + : GeometryInfo::faces_per_cell) + * fe.base_element(base).dofs_per_face; row_lengths[cell_indices[i]] += increment; } ++i; @@ -541,14 +558,16 @@ DoFTools::compute_row_length_vector( // Finally, cells in 3D while (i < fe.dofs_per_cell) { - for (unsigned int comp=0;comp::faces_per_cell - * fe.base_element(fe.component_to_base(comp).first).dofs_per_face; - row_lengths[cell_indices[i]] += increment; - } + for (unsigned int base=0;base::faces_per_cell + * fe.base_element(base).dofs_per_face; + row_lengths[cell_indices[i]] += increment; + } ++i; } @@ -584,12 +603,14 @@ DoFTools::compute_row_length_vector( // will be handled below, // therefore, we subtract them // here. - for (unsigned int comp=0;compget_dof_indices(neighbor_indices); - for (unsigned int comp=0;comp& coll = dof_handler.get_fe(); tables_by_block.resize(coll.n_finite_elements()); - for (unsigned int f=0;f& fe = coll.ge_fe(f); + const FiniteElement& fe = coll.get_fe(f); - const unsigned int nb = fe.n_blocks(); + const unsigned int nb = fe.n_blocks(); tables_by_block[f].reinit(nb, nb); tables_by_block[f].fill(none); for (unsigned int i=0;i