16#ifndef dealii_mg_sparse_matrix_collection_h
17#define dealii_mg_sparse_matrix_collection_h
40 template <
typename number>
45 resize(
const unsigned int minlevel,
const unsigned int maxlevel);
47 template <
int dim,
int spacedim>
65 template <
typename number>
68 const unsigned int maxlevel)
70 matrix.resize(minlevel, maxlevel);
72 matrix_up.resize(minlevel + 1, maxlevel);
73 matrix_up.clear_elements();
74 matrix_down.resize(minlevel + 1, maxlevel);
75 matrix_down.clear_elements();
76 matrix_in.resize(minlevel, maxlevel);
77 matrix_in.clear_elements();
78 matrix_out.resize(minlevel, maxlevel);
79 matrix_out.clear_elements();
80 sparsity.resize(minlevel, maxlevel);
81 sparsity_edge.resize(minlevel, maxlevel);
85 template <
typename number>
86 template <
int dim,
int spacedim>
94 for (
unsigned int level = sparsity.min_level();
95 level <= sparsity.max_level();
100 sparsity[
level].copy_from(dsp);
112 sparsity_edge[
level].copy_from(ci_sparsity);
113 matrix_up[
level].reinit(sparsity_edge[
level]);
114 matrix_down[
level].reinit(sparsity_edge[
level]);
119 template <
typename number>
const Triangulation< dim, spacedim > & get_triangulation() const
types::global_dof_index n_dofs() const
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)
void reinit(const size_type m, const size_type n, const IndexSet &rowset=IndexSet())
@ matrix
Contents is actually a matrix.