<li>
Create a global sparsity pattern (as described in the chapter on
<a href="matrix_structure.html">matrix structure</a>) using
-<code>void DoFHandler::make_sparsity_pattern(SparseMatrixStruct &)</code></a>.
+<code>void DoFTools::make_sparsity_pattern(const DoFHandler<dim> &,
+ SparseMatrixStruct &)</code></a>.
</li>
<li>
Create the constraints on the hanging nodes using
#include <grid/dof.h>
#include <lac/sparsematrix.h>
#include <grid/dof_constraints.h>
+#include <basic/dof_tools.h>
const unsigned int dim=2; // Work in two dimensions, could also be three
SparseMatrixStruct sparsity_pattern;
ConstraintMatrix hanging_nodes;
hanging_nodes.clear();
-dof_handler.make_sparsity_pattern(sparsity_pattern);
+DoFTools::make_sparsity_pattern(dof_handler, sparsity_pattern);
dof_handler.make_hanging_nodes_constraints(hanging_nodes);
hanging_nodes.close();
hanging_nodes.condense(matrix_structure);
After having fixed the basic properties of the sparsity structure, we
can tell it which entries actually are non-zero. This is again done
using a library function,
-<code>DoFHandler::make_sparsity_pattern</code>. Then we have to take
+<code>DoFTools::make_sparsity_pattern</code>. Then we have to take
into account that constraints due to hanging nodes (see the previous
chapter) add some more non-zero entries, which is again done using
some library functions (see the example below). After this, we can
<code>
#include <grid/dof.h>
#include <lac/sparsematrix.h>
+#include <basic/dof_tools.h>
const unsigned int dim=2; // For example
dof_handler.max_couplings_between_dofs());
// tell the sparsity pattern which entries are non-zero:
-dof_handler.make_sparsity_pattern (sparsity_pattern);
+make_sparsity_pattern (dof_handler, sparsity_pattern);
// Condense the <a href="hanging_nodes.html">hanging nodes</a> into
// the matrix structure, taking into account the constraints due to
partial differential equations couple to each other, or that the
operators have a special structure. For this reason, there are more
specialized version of the
-<code>DoFHandler::make_sparsity_pattern</code> and
+<code>DoFTools::make_sparsity_pattern</code> and
<code>SparseMatrixStruct::reinit</code> functions, which allow you to
more flexibly determine the actual number of non-zero elements of all
or individual rows. See the documentation of the respective classes