17 #ifndef __deal2__mg_block_smoother_h 18 #define __deal2__mg_block_smoother_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/smartpointer.h> 23 #include <deal.II/lac/pointer_matrix.h> 24 #include <deal.II/lac/vector_memory.h> 25 #include <deal.II/lac/block_vector.h> 26 #include <deal.II/multigrid/mg_base.h> 27 #include <deal.II/base/mg_level_object.h> 47 template <
class MATRIX,
class RELAX,
typename number>
57 const unsigned int steps = 1,
60 const bool transpose =
false,
85 template <
class MGMATRIX,
class MGRELAX>
136 virtual void smooth (
const unsigned int level,
188 template <
class MATRIX,
class RELAX,
typename number>
192 const unsigned int steps,
195 const bool transpose,
200 symmetric(symmetric),
201 transpose(transpose),
207 template <
class MATRIX,
class RELAX,
typename number>
213 for (; i<=max_level; ++i)
221 template <
class MATRIX,
class RELAX,
typename number>
222 template <
class MGMATRIX,
class MGRELAX>
228 const unsigned int min = m.min_level();
229 const unsigned int max = m.max_level();
234 for (
unsigned int i=min; i<=max; ++i)
241 template <
class MATRIX,
class RELAX,
typename number>
250 template <
class MATRIX,
class RELAX,
typename number>
259 template <
class MATRIX,
class RELAX,
typename number>
268 template <
class MATRIX,
class RELAX,
typename number>
277 template <
class MATRIX,
class RELAX,
typename number>
286 template <
class MATRIX,
class RELAX,
typename number>
289 const unsigned int level,
293 deallog.
push(
"Smooth");
296 unsigned int steps2 =
steps;
299 steps2 *= (1<<(maxlevel-level));
312 for (
unsigned int i=0; i<steps2; ++i)
341 DEAL_II_NAMESPACE_CLOSE
void set_transpose(const bool)
virtual VECTOR * alloc()=0
void set_steps(const unsigned int)
void reinit(const unsigned int num_blocks, const size_type block_size=0, const bool fast=false)
unsigned int max_level() const
VectorMemory< BlockVector< number > > & mem
void initialize(const MGMATRIX &matrices, const MGRELAX &smoothers)
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)
virtual void free(const VECTOR *const)=0
void set_reverse(const bool)
void sadd(const value_type s, const BlockVectorBase &V)
void set_variable(const bool)
void push(const std::string &text)
virtual void smooth(const unsigned int level, BlockVector< number > &u, const BlockVector< number > &rhs) const
MGLevelObject< PointerMatrix< RELAX, BlockVector< number > > > smoothers
void set_symmetric(const bool)
unsigned int min_level() const
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel)
MGLevelObject< PointerMatrix< MATRIX, BlockVector< number > > > matrices