17 #ifndef __deal2__mg_sparse_matrix_collection_h 18 #define __deal2__mg_sparse_matrix_collection_h 20 #include <deal.II/lac/vector.h> 21 #include <deal.II/lac/pointer_matrix.h> 22 #include <deal.II/lac/sparse_matrix.h> 23 #include <deal.II/lac/compressed_sparsity_pattern.h> 24 #include <deal.II/multigrid/mg_base.h> 25 #include <deal.II/multigrid/mg_tools.h> 26 #include <deal.II/base/mg_level_object.h> 27 #include <deal.II/base/std_cxx1x/shared_ptr.h> 40 template <
typename number>
44 void resize(
const unsigned int minlevel,
const unsigned int maxlevel);
47 void reinit(
const DH &dof_handler);
62 template <
typename number>
66 matrix.
resize(minlevel, maxlevel);
68 matrix_up.
resize(minlevel+1, maxlevel);
70 matrix_down.
resize(minlevel+1, maxlevel);
72 matrix_in.
resize(minlevel, maxlevel);
74 matrix_out.
resize(minlevel, maxlevel);
76 sparsity.
resize(minlevel, maxlevel);
77 sparsity_edge.
resize(minlevel, maxlevel);
81 template <
typename number>
88 for (
unsigned int level=sparsity.
min_level();
93 sparsity[level].copy_from(c_sparsity);
94 matrix[level].reinit(sparsity[level]);
95 matrix_in[level].reinit(sparsity[level]);
96 matrix_out[level].reinit(sparsity[level]);
100 ci_sparsity.
reinit(dof_handler.n_dofs(level-1), dof_handler.n_dofs(level));
102 sparsity_edge[level].copy_from(ci_sparsity);
103 matrix_up[level].reinit(sparsity_edge[level]);
104 matrix_down[level].reinit(sparsity_edge[level]);
109 template <
typename number>
122 DEAL_II_NAMESPACE_CLOSE
#define AssertIndexRange(index, range)
unsigned int max_level() const
unsigned int min_level() const
void reinit(const size_type m, const size_type n)
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel)