Create a global sparsity pattern (as described in the chapter on
<a href="matrix_structure.html">matrix structure</a>) using
<code>void DoFTools::make_sparsity_pattern(const DoFHandler<dim> &,
- SparseMatrixStruct &)</code></a>.
+ SparsityPattern &)</code></a>.
</li>
<li>
Create the constraints on the hanging nodes using
closing the object; therefore you can't have it closed automatically somewhere.
</li>
<li>Finally, condense the hanging nodes into the matrix structure
-using <code>ConstraintMatrix::condense(SparseMatrixStruct &)</code>.
+using <code>ConstraintMatrix::condense(SparsityPattern &)</code>.
</li>
</ol>
#include <dofs/dof_tools.h>
const unsigned int dim=2; // Work in two dimensions, could also be three
-SparseMatrixStruct sparsity_pattern;
+SparsityPattern sparsity_pattern;
DoFHandler<dim> dof_handler;
ConstraintMatrix hanging_nodes;
<h3>The Standard Sparse Matrix</h3>
<p>
The <acronym>deal.II</acronym> function initializing a standard sparse matrix
-structure is <code>void SparseMatrixStruct::reinit(const unsigned int m, const unsigned int n, const unsigned int max_per_row)</code>. It takes as its arguments
+structure is <code>void SparsityPattern::reinit(const unsigned int m, const unsigned int n, const unsigned int max_per_row)</code>. It takes as its arguments
the size of the matrix in question and the maximum number of non-zero elements
in one row. This first sets up a blank sparsity pattern which,
however, has as yet no information which entries are non-zero.
<p>
This matrix structure can then be used to serve as sparsity pattern to
one or several matrices using
-<code>void SparseMatrix::reinit(const SparseMatrixStruct&sparsity)</code>.
-We note the distinction that the <code>SparseMatrixStruct</code> only
+<code>void SparseMatrix::reinit(const SparsityPattern &sparsity)</code>.
+We note the distinction that the <code>SparsityPattern</code> only
stores the places of the non-zero elements, while the
<code>SparseMatrix</code> actually stores the values of these
elements. The separation was made since often several matrices are
const unsigned int dim=2; // For example
-SparseMatrixStruct sparsity_pattern;
+SparsityPattern sparsity_pattern;
DoFHandler<dim> dof_handler;
// set up a triangulation, refine it, associate the DoFHandler object
</li>
</ul>
-The appropriate function is <code>void SparseMatrixStruct::compress()</code>.
+The appropriate function is <code>void SparsityPattern::compress()</code>.
</p>
<p class="Example">
operators have a special structure. For this reason, there are more
specialized version of the
<code>DoFTools::make_sparsity_pattern</code> and
-<code>SparseMatrixStruct::reinit</code> functions, which allow you to
+<code>SparsityPattern::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
for more information.