* Remember using
* #SparsityPattern::compress()#
* after generating the pattern.
+ *
+ * The actual type of the
+ * sparsity pattern may be
+ * #SparsityPattern#,
+ * #BlockSparsityPattern#, or any
+ * other class that satisfies
+ * similar requirements.
*/
- template<int dim>
+ template <int dim, class SparsityPattern>
static void make_sparsity_pattern (const DoFHandler<dim> &dof,
SparsityPattern &sparsity_pattern);
* the matrix structure just like the
* previous function, but does not create
* elements if not specified by the mask.
+ *
+ * The actual type of the
+ * sparsity pattern may be
+ * #SparsityPattern#,
+ * #BlockSparsityPattern#, or any
+ * other class that satisfies
+ * similar requirements.
*/
- template<int dim>
+ template<int dim, class SparsityPattern>
static void make_sparsity_pattern (const DoFHandler<dim> &dof,
const vector<vector<bool> > &mask,
SparsityPattern &sparsity_pattern);
#include <fe/fe_system.h>
#include <dofs/dof_tools.h>
#include <lac/sparsity_pattern.h>
+#include <lac/block_sparsity_pattern.h>
#include <lac/vector.h>
#include <algorithm>
-template <int dim>
+template <int dim, class SparsityPattern>
void
DoFTools::make_sparsity_pattern (const DoFHandler<dim> &dof,
SparsityPattern &sparsity)
}
-template <int dim>
+template <int dim, class SparsityPattern>
void
DoFTools::make_sparsity_pattern (const DoFHandler<dim> &dof,
const vector<vector<bool> > &mask,
template void
DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
- SparsityPattern &sparsity);
+ SparsityPattern &sparsity);
+
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension> &dof,
+ BlockSparsityPattern<2,2> &sparsity);
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension> &dof,
+ BlockSparsityPattern<3,3> &sparsity);
template void
DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
const vector<vector<bool> > &mask,
SparsityPattern &sparsity);
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
+ const vector<vector<bool> > &mask,
+ BlockSparsityPattern<2,2> &sparsity);
+
+template void
+DoFTools::make_sparsity_pattern (const DoFHandler<deal_II_dimension>& dof,
+ const vector<vector<bool> > &mask,
+ BlockSparsityPattern<3,3> &sparsity);
+
template
void
DoFTools::distribute_cell_to_dof_vector (const DoFHandler<deal_II_dimension> &dof_handler,
New: <code class="member">DoFRenumbering::sort_selected_dofs_back ()</code>
sorts selected degrees of freedom to the end of the index range.
</p>
+
+ <li> <p>
+ Extended: <code class="member">DoFTools::make_sparsity_pattern ()</code>
+ now accepts a template parameter as sparsity pattern. This
+ allows to use this function for the usual
+ <code class="class">SparsityPattern</code>, or for
+ <code class="class">BlockSparsityPattern</code> arguments.
+ </p>
</ol>
<hr>