16#ifndef dealii_mg_matrix_h
17#define dealii_mg_matrix_h
45 template <
typename VectorType = Vector<
double>>
58 template <
typename MatrixType>
65 template <
typename MatrixType>
84 const VectorType & src)
const override;
88 const VectorType & src)
const override;
92 const VectorType & src)
const override;
96 const VectorType & src)
const override;
123template <
typename MatrixType,
typename number>
132 const unsigned int col = 0,
202 template <
typename VectorType>
203 template <
typename MatrixType>
222 template <
typename VectorType>
226 matrices.resize(0, 0);
231 template <
typename VectorType>
232 template <
typename MatrixType>
240 template <
typename VectorType>
244 return matrices[
level];
249 template <
typename VectorType>
253 const VectorType & src)
const
255 matrices[
level].vmult(dst, src);
260 template <
typename VectorType>
264 const VectorType & src)
const
266 matrices[
level].vmult_add(dst, src);
271 template <
typename VectorType>
275 const VectorType & src)
const
277 matrices[
level].Tvmult(dst, src);
282 template <
typename VectorType>
286 const VectorType & src)
const
288 matrices[
level].Tvmult_add(dst, src);
293 template <
typename VectorType>
297 return matrices.min_level();
302 template <
typename VectorType>
306 return matrices.max_level();
311 template <
typename VectorType>
315 return sizeof(*this) + matrices->memory_consumption();
322template <
typename MatrixType,
typename number>
324 const unsigned int col,
326 : matrix(p, typeid(*this).name())
333template <
typename MatrixType,
typename number>
342template <
typename MatrixType,
typename number>
345 const unsigned int bcol)
353template <
typename MatrixType,
typename number>
362 m[
level].block(row, col).vmult(dst, src);
367template <
typename MatrixType,
typename number>
376 m[
level].block(row, col).vmult_add(dst, src);
381template <
typename MatrixType,
typename number>
390 m[
level].block(row, col).Tvmult(dst, src);
395template <
typename MatrixType,
typename number>
404 m[
level].block(row, col).Tvmult_add(dst, src);
unsigned int max_level() const
unsigned int min_level() const
void set_matrix(MGLevelObject< MatrixType > *M)
virtual void vmult(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
virtual void vmult_add(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
MGMatrixSelect(const unsigned int row=0, const unsigned int col=0, MGLevelObject< MatrixType > *matrix=0)
void select_block(const unsigned int row, const unsigned int col)
virtual void Tvmult(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
SmartPointer< MGLevelObject< MatrixType >, MGMatrixSelect< MatrixType, number > > matrix
virtual void Tvmult_add(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
virtual unsigned int get_minlevel() const override
virtual void vmult(const unsigned int level, VectorType &dst, const VectorType &src) const override
virtual void vmult_add(const unsigned int level, VectorType &dst, const VectorType &src) const override
std::size_t memory_consumption() const
virtual void Tvmult(const unsigned int level, VectorType &dst, const VectorType &src) const override
void initialize(const MGLevelObject< MatrixType > &M)
virtual unsigned int get_maxlevel() const override
MGLevelObject< LinearOperator< VectorType > > matrices
virtual void Tvmult_add(const unsigned int level, VectorType &dst, const VectorType &src) const override
const LinearOperator< VectorType > & operator[](unsigned int level) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotInitialized()
T & get_underlying_value(T &p)