16#ifndef dealii_mg_matrix_h
17#define dealii_mg_matrix_h
43 template <
typename VectorType = Vector<
double>>
56 template <
typename MatrixType>
63 template <
typename MatrixType>
81 const VectorType & src)
const override;
85 const VectorType & src)
const override;
89 const VectorType & src)
const override;
93 const VectorType & src)
const override;
120template <
typename MatrixType,
typename number>
129 const unsigned int col = 0,
199 template <
typename VectorType>
200 template <
typename MatrixType>
219 template <
typename VectorType>
223 matrices.resize(0, 0);
228 template <
typename VectorType>
229 template <
typename MatrixType>
237 template <
typename VectorType>
241 return matrices[
level];
246 template <
typename VectorType>
250 const VectorType & src)
const
252 matrices[
level].vmult(dst, src);
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
274 matrices[
level].Tvmult(dst, src);
279 template <
typename VectorType>
283 const VectorType & src)
const
285 matrices[
level].Tvmult_add(dst, src);
290 template <
typename VectorType>
294 return matrices.min_level();
299 template <
typename VectorType>
303 return matrices.max_level();
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);
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()
@ matrix
Contents is actually a matrix.
T & get_underlying_value(T &p)