15#ifndef dealii_mg_matrix_h
16#define dealii_mg_matrix_h
44 template <
typename VectorType = Vector<
double>>
57 template <
typename MatrixType>
64 template <
typename MatrixType>
83 const VectorType &src)
const override;
87 const VectorType &src)
const override;
91 const VectorType &src)
const override;
95 const VectorType &src)
const override;
122template <
typename MatrixType,
typename number>
131 const unsigned int col = 0,
201 template <
typename VectorType>
202 template <
typename MatrixType>
221 template <
typename VectorType>
225 matrices.resize(0, 0);
230 template <
typename VectorType>
231 template <
typename MatrixType>
239 template <
typename VectorType>
243 return matrices[
level];
248 template <
typename VectorType>
252 const VectorType &src)
const
259 template <
typename VectorType>
263 const VectorType &src)
const
265 matrices[
level].vmult_add(dst, src);
270 template <
typename VectorType>
274 const VectorType &src)
const
276 matrices[
level].Tvmult(dst, src);
281 template <
typename VectorType>
285 const VectorType &src)
const
287 matrices[
level].Tvmult_add(dst, src);
292 template <
typename VectorType>
296 return matrices.min_level();
301 template <
typename VectorType>
305 return matrices.max_level();
310 template <
typename VectorType>
314 return sizeof(*this) + matrices->memory_consumption();
321template <
typename MatrixType,
typename number>
323 const unsigned int col,
325 : matrix(p, typeid(*this).name())
332template <
typename MatrixType,
typename number>
341template <
typename MatrixType,
typename number>
344 const unsigned int bcol)
352template <
typename MatrixType,
typename number>
361 m[
level].block(row, col).vmult(dst, src);
366template <
typename MatrixType,
typename number>
375 m[
level].block(row, col).vmult_add(dst, src);
380template <
typename MatrixType,
typename number>
389 m[
level].block(row, col).Tvmult(dst, src);
394template <
typename MatrixType,
typename number>
403 m[
level].block(row, col).Tvmult_add(dst, src);
std::function< void(Range &v, const Domain &u)> vmult
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()
T & get_underlying_value(T &p)