13#ifndef dealii_mg_matrix_h
14#define dealii_mg_matrix_h
42 template <
typename VectorType = Vector<
double>>
55 template <
typename MatrixType>
62 template <
typename MatrixType>
79 vmult(
const unsigned int level,
81 const VectorType &src)
const override;
85 const VectorType &src)
const override;
87 Tvmult(
const unsigned int level,
89 const VectorType &src)
const override;
93 const VectorType &src)
const override;
120template <
typename MatrixType,
typename number>
129 const unsigned int col = 0,
149 vmult(
const unsigned int level,
165 Tvmult(
const unsigned int level,
199 template <
typename VectorType>
200 template <
typename MatrixType>
219 template <
typename VectorType>
228 template <
typename VectorType>
229 template <
typename MatrixType>
237 template <
typename VectorType>
246 template <
typename VectorType>
250 const VectorType &src)
const
257 template <
typename VectorType>
261 const VectorType &src)
const
263 matrices[level].vmult_add(dst, src);
268 template <
typename VectorType>
272 const VectorType &src)
const
279 template <
typename VectorType>
283 const VectorType &src)
const
285 matrices[level].Tvmult_add(dst, src);
290 template <
typename VectorType>
299 template <
typename VectorType>
308 template <
typename VectorType>
312 return sizeof(*this) +
matrices->memory_consumption();
319template <
typename MatrixType,
typename number>
321 const unsigned int col,
323 :
matrix(p, typeid(*this).name())
330template <
typename MatrixType,
typename number>
339template <
typename MatrixType,
typename number>
342 const unsigned int bcol)
350template <
typename MatrixType,
typename number>
359 m[level].block(
row,
col).vmult(dst, src);
364template <
typename MatrixType,
typename number>
373 m[level].block(
row,
col).vmult_add(dst, src);
378template <
typename MatrixType,
typename number>
387 m[level].block(
row,
col).Tvmult(dst, src);
392template <
typename MatrixType,
typename number>
401 m[level].block(
row,
col).Tvmult_add(dst, src);
friend class ObserverPointer
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
ObserverPointer< 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()
LinearOperator< Range, Domain, Payload > linear_operator(const OperatorExemplar &, const Matrix &)
T & get_underlying_value(T &p)