16 #ifndef dealii__mg_block_smoother_h 17 #define dealii__mg_block_smoother_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/smartpointer.h> 22 #include <deal.II/lac/pointer_matrix.h> 23 #include <deal.II/lac/vector_memory.h> 24 #include <deal.II/lac/block_vector.h> 25 #include <deal.II/multigrid/mg_base.h> 26 #include <deal.II/base/mg_level_object.h> 29 DEAL_II_NAMESPACE_OPEN
46 template <
typename MatrixType,
class RelaxationType,
typename number>
55 const unsigned int steps = 1,
58 const bool transpose =
false,
74 template <
class MGMatrixType,
class MGRelaxationType>
113 virtual void smooth (
const unsigned int level,
165 template <
typename MatrixType,
class RelaxationType,
typename number>
169 const unsigned int steps,
172 const bool transpose,
177 symmetric(symmetric),
178 transpose(transpose),
184 template <
typename MatrixType,
class RelaxationType,
typename number>
190 for (; i<=max_level; ++i)
198 template <
typename MatrixType,
class RelaxationType,
typename number>
199 template <
class MGMatrixType,
class MGRelaxationType>
202 const MGRelaxationType &s)
204 const unsigned int min = m.min_level();
205 const unsigned int max = m.max_level();
210 for (
unsigned int i=min; i<=max; ++i)
217 template <
typename MatrixType,
class RelaxationType,
typename number>
226 template <
typename MatrixType,
class RelaxationType,
typename number>
235 template <
typename MatrixType,
class RelaxationType,
typename number>
244 template <
typename MatrixType,
class RelaxationType,
typename number>
253 template <
typename MatrixType,
class RelaxationType,
typename number>
262 template <
typename MatrixType,
class RelaxationType,
typename number>
268 deallog.
push(
"Smooth");
271 unsigned int steps2 =
steps;
274 steps2 *= (1<<(maxlevel-level));
285 for (
unsigned int i=0; i<steps2; ++i)
311 DEAL_II_NAMESPACE_CLOSE
unsigned int max_level() const
virtual VectorType * alloc()=0
MGLevelObject< PointerMatrix< MatrixType, BlockVector< number > > > matrices
void set_symmetric(const bool)
void initialize(const MGMatrixType &matrices, const MGRelaxationType &smoothers)
void set_reverse(const bool)
void set_variable(const bool)
void set_transpose(const bool)
unsigned int min_level() const
virtual void free(const VectorType *const)=0
virtual void smooth(const unsigned int level, BlockVector< number > &u, const BlockVector< number > &rhs) const
void set_steps(const unsigned int)
void reinit(const unsigned int n_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
void sadd(const value_type s, const BlockVectorBase &V)
VectorMemory< BlockVector< number > > & mem
void push(const std::string &text)
MGSmootherBlock(VectorMemory< BlockVector< number > > &mem, const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false, const bool reverse=false)
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel)
MGLevelObject< PointerMatrix< RelaxationType, BlockVector< number > > > smoothers