From: Wolfgang Bangerth Date: Sun, 27 Jul 2014 21:00:55 +0000 (-0500) Subject: Update documentation a bit. X-Git-Tag: v8.2.0-rc1~244^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d438e03c45c5e909e64cdc43ee4ee4980e51d236;p=dealii.git Update documentation a bit. Reading through the documentation of some of the functions in DoFTools, there are a number of functions for which I can't quite figure out what exactly they do. This updates a couple of places, but more work remains. In particular, I have no idea from the description of what DoFTools::make_single_patch() does. --- diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 23c785612f..a6eff61964 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -1660,9 +1660,9 @@ namespace DoFTools /** * Create an incidence matrix that for every cell on a given level * of a multilevel DoFHandler flags which degrees of freedom are - * associated with the corresponding cell. This data structure is + * associated with the corresponding cell. This data structure is a * matrix with as many rows as there are cells on a given level, as - * many rows as there are degrees of freedom on this level, and + * many columns as there are degrees of freedom on this level, and * entries that are either true or false. This data structure is * conveniently represented by a SparsityPattern object. * @@ -1679,9 +1679,9 @@ namespace DoFTools /** * Create an incidence matrix that for every vertex on a given level * of a multilevel DoFHandler flags which degrees of freedom are - * associated with the adjacent cells. This data structure is matrix + * associated with the adjacent cells. This data structure is a matrix * with as many rows as there are vertices on a given level, as many - * rows as there are degrees of freedom on this level, and entries + * columns as there are degrees of freedom on this level, and entries * that are either true or false. This data structure is * conveniently represented by a SparsityPattern object. The * sparsity pattern may be empty when entering this function and @@ -1731,10 +1731,13 @@ namespace DoFTools * of a multilevel DoFHandler flags which degrees of freedom are * associated with children of this cell. This data structure is * conveniently represented by a SparsityPattern object. - - * Create a sparsity pattern which in each row lists the degrees of - * freedom associated to the cells which are the children of the - * same cell. The sparsity pattern may be empty when entering this + * + * The function thus creates a sparsity pattern which in each row + * (with rows corresponding to the cells on this level) lists the degrees of + * freedom associated to the cells that are the children of this + * cell. The DoF indices used here are level dof indices of a multilevel + * hierarchy, i.e., they may be associated with children that are + * not themselves active. The sparsity pattern may be empty when entering this * function and will be reinitialized to the correct size. * * The function has some boolean arguments (listed below) diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 9015c86d69..6d089d4586 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -1943,7 +1943,6 @@ namespace DoFTools Assert(level > 0 && level < dof_handler.get_tria().n_levels(), ExcIndexRange(level, 1, dof_handler.get_tria().n_levels())); - typename DH::level_cell_iterator cell; typename DH::level_cell_iterator pcell = dof_handler.begin(level-1); typename DH::level_cell_iterator endc = dof_handler.end(level-1); @@ -1952,10 +1951,12 @@ namespace DoFTools for (unsigned int block = 0; pcell != endc; ++pcell) { - if (!pcell->has_children()) continue; + if (!pcell->has_children()) + continue; + for (unsigned int child=0; childn_children(); ++child) { - cell = pcell->child(child); + const typename DH::level_cell_iterator cell = pcell->child(child); // For hp, only this line here would have to be replaced. const FiniteElement &fe = dof_handler.get_fe();