16 #ifndef dealii_mg_block_smoother_h 17 #define dealii_mg_block_smoother_h 50 template <
typename MatrixType,
class RelaxationType,
typename number>
76 template <
class MGMatrixType,
class MGRelaxationType>
138 template <
typename MatrixType,
class RelaxationType,
typename number>
140 const unsigned int steps,
151 template <
typename MatrixType,
class RelaxationType,
typename number>
156 for (; i <= max_level; ++i)
164 template <
typename MatrixType,
class RelaxationType,
typename number>
165 template <
class MGMatrixType,
class MGRelaxationType>
168 const MGMatrixType & m,
169 const MGRelaxationType &s)
171 const unsigned int min = m.min_level();
172 const unsigned int max = m.max_level();
177 for (
unsigned int i = min; i <=
max; ++i)
182 matrices[i] = linear_operator<BlockVector<number>>(
189 template <
typename MatrixType,
class RelaxationType,
typename number>
198 template <
typename MatrixType,
class RelaxationType,
typename number>
208 template <
typename MatrixType,
class RelaxationType,
typename number>
211 const unsigned int level,
218 unsigned int steps2 = this->
steps;
221 steps2 *= (1 << (maxlevel -
level));
229 if (this->
symmetric && (steps2 % 2 == 0))
232 for (
unsigned int i = 0; i < steps2; ++i)
237 r->sadd(-1., 1., rhs);
243 r->sadd(-1., 1., rhs);
unsigned int max_level() const
void initialize(const MGMatrixType &matrices, const MGRelaxationType &smoothers)
MGLevelObject< LinearOperator< BlockVector< number > > > smoothers
SmartPointer< VectorMemory< BlockVector< number > >, MGSmootherBlock< MatrixType, RelaxationType, number > > mem
void set_reverse(const bool)
std::size_t memory_consumption() const
unsigned int min_level() const
virtual void smooth(const unsigned int level, BlockVector< number > &u, const BlockVector< number > &rhs) const
#define DEAL_II_NAMESPACE_CLOSE
GrowingVectorMemory< BlockVector< number > > vector_memory
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
MGSmootherBlock(const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false, const bool reverse=false)
#define DEAL_II_NAMESPACE_OPEN
T min(const T &t, const MPI_Comm &mpi_communicator)
MGLevelObject< LinearOperator< BlockVector< number > > > matrices
std::size_t memory_consumption() const
virtual std::size_t memory_consumption() const
void resize(const unsigned int new_minlevel, const unsigned int new_maxlevel)
T max(const T &t, const MPI_Comm &mpi_communicator)