16#ifndef dealii_mg_sparse_matrix_collection_h
17#define dealii_mg_sparse_matrix_collection_h
41 template <
typename number>
46 resize(
const unsigned int minlevel,
const unsigned int maxlevel);
48 template <
int dim,
int spacedim>
66 template <
typename number>
69 const unsigned int maxlevel)
71 matrix.resize(minlevel, maxlevel);
72 matrix.clear_elements();
73 matrix_up.resize(minlevel + 1, maxlevel);
74 matrix_up.clear_elements();
75 matrix_down.resize(minlevel + 1, maxlevel);
76 matrix_down.clear_elements();
77 matrix_in.resize(minlevel, maxlevel);
78 matrix_in.clear_elements();
79 matrix_out.resize(minlevel, maxlevel);
80 matrix_out.clear_elements();
81 sparsity.resize(minlevel, maxlevel);
82 sparsity_edge.resize(minlevel, maxlevel);
86 template <
typename number>
87 template <
int dim,
int spacedim>
95 for (
unsigned int level = sparsity.min_level();
96 level <= sparsity.max_level();
101 sparsity[
level].copy_from(dsp);
113 sparsity_edge[
level].copy_from(ci_sparsity);
114 matrix_up[
level].reinit(sparsity_edge[
level]);
115 matrix_down[
level].reinit(sparsity_edge[
level]);
120 template <
typename number>
const Triangulation< dim, spacedim > & get_triangulation() const
types::global_dof_index n_dofs() const
void reinit(const size_type m, const size_type n, const IndexSet &rowset=IndexSet())
unsigned int n_levels() const
void reinit(const DoFHandler< dim, spacedim > &dof_handler)
MGLevelObject< SparseMatrix< number > > matrix_in
MGLevelObject< SparseMatrix< number > > matrix
MGLevelObject< SparseMatrix< number > > matrix_out
MGLevelObject< SparseMatrix< number > > matrix_up
MGLevelObject< SparsityPattern > sparsity
void resize(const unsigned int minlevel, const unsigned int maxlevel)
MGLevelObject< SparsityPattern > sparsity_edge
MGLevelObject< SparseMatrix< number > > matrix_down
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertIndexRange(index, range)