16 #ifndef dealii_mg_sparse_matrix_collection_h
17 #define dealii_mg_sparse_matrix_collection_h
43 template <
typename number>
48 resize(
const unsigned int minlevel,
const unsigned int maxlevel);
50 template <
typename DoFHandlerType>
52 reinit(
const DoFHandlerType &dof_handler);
68 template <
typename number>
71 const unsigned int maxlevel)
73 matrix.resize(minlevel, maxlevel);
75 matrix_up.resize(minlevel + 1, maxlevel);
76 matrix_up.clear_elements();
77 matrix_down.resize(minlevel + 1, maxlevel);
78 matrix_down.clear_elements();
79 matrix_in.resize(minlevel, maxlevel);
80 matrix_in.clear_elements();
81 matrix_out.resize(minlevel, maxlevel);
82 matrix_out.clear_elements();
83 sparsity.resize(minlevel, maxlevel);
84 sparsity_edge.resize(minlevel, maxlevel);
88 template <
typename number>
89 template <
typename DoFHandlerType>
94 dof_handler.get_triangulation().n_levels());
96 for (
unsigned int level = sparsity.min_level();
97 level <= sparsity.max_level();
102 sparsity[
level].copy_from(dsp);
110 dof_handler.n_dofs(
level));
114 sparsity_edge[
level].copy_from(ci_sparsity);
115 matrix_up[
level].reinit(sparsity_edge[
level]);
116 matrix_down[
level].reinit(sparsity_edge[
level]);
121 template <
typename number>