From 361bb41c7be5315c02b19c0308a3891ac13c8221 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Tue, 7 Mar 2006 09:18:14 +0000 Subject: [PATCH] cellwise counting compilable, but not used or tested yet git-svn-id: https://svn.dealii.org/trunk@12549 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/dofs/dof_tools.cc | 267 +++++++++++++++++++++++ 1 file changed, 267 insertions(+) diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc index 78a33f9810..9d58f7c227 100644 --- a/deal.II/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/deal.II/source/dofs/dof_tools.cc @@ -243,6 +243,273 @@ DoFTools::compute_row_length_vector( #else +template +static +void +compute_cell_row_length_matrix( + Table<2, unsigned int>& matrix, + const typename DH::cell_iterator& cell, + const FiniteElement& fe, + const Table<2,DoFTools::Coupling>& couple_cell, + const Table<2,DoFTools::Coupling>& couple_face) +{ + // First, dofs on + // vertices. We assume that + // each vertex dof couples + // with all dofs on + // adjacent grid cells. + + // Adding all dofs of the cells + // will add dofs of the faces + // of the cell adjacent to the + // vertex twice. Therefore, we + // subtract these here and add + // them in a loop over the + // faces below. + + // in 1d, faces and vertices + // are identical. Nevertheless, + // this will only work if + // dofs_per_face is zero and + // dofs_per_vertex is + // arbitrary, not the other way + // round. + unsigned int increment; + unsigned int i=0; + while (i < fe.first_line_index) + { + const unsigned int iblock = fe.system_to_block_index(i).first; + for (unsigned int base=0;base1) + ? (DH::dimension-1) + : GeometryInfo::faces_per_cell) + * fe.base_element(base).dofs_per_face; + + for (unsigned int mult=0;mult2) + ? (DH::dimension-2) + : GeometryInfo::faces_per_cell) + * fe.base_element(base).dofs_per_face; + + for (unsigned int mult=0;mult::faces_per_cell + * fe.base_element(base).dofs_per_face; + + for (unsigned int mult=0;mult::faces_per_cell;++iface) + { + if (cell->at_boundary(iface)) + { + for (unsigned int i=0;i +static +void +compute_face_row_length_matrix( + Table<2, unsigned int>& matrix, + Table<2, unsigned int>& nmatrix, + const typename DH::face_iterator& face, + const typename DH::cell_iterator& cell, + const typename DH::cell_iterator& neighbor, + const FiniteElement& fe, + const FiniteElement& nfe, + const Table<2,DoFTools::Coupling>& couple_cell, + const Table<2,DoFTools::Coupling>& couple_face) +{ + // This function will be called + // once per face, at the refinement + // edge from a refined cell. + + // The dofs on the common face + // will be handled below, + // therefore, we subtract them + // here. + for (unsigned int base=0;base void -- 2.39.5