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>
82 const VectorType & src)
const override;
86 const VectorType & src)
const override;
90 const VectorType & src)
const override;
94 const VectorType & src)
const override;
121template <
typename MatrixType,
typename number>
130 const unsigned int col = 0,
200 template <
typename VectorType>
201 template <
typename MatrixType>
220 template <
typename VectorType>
224 matrices.resize(0, 0);
229 template <
typename VectorType>
230 template <
typename MatrixType>
238 template <
typename VectorType>
242 return matrices[
level];
247 template <
typename VectorType>
251 const VectorType & src)
const
253 matrices[
level].vmult(dst, src);
258 template <
typename VectorType>
262 const VectorType & src)
const
264 matrices[
level].vmult_add(dst, src);
269 template <
typename VectorType>
273 const VectorType & src)
const
275 matrices[
level].Tvmult(dst, src);
280 template <
typename VectorType>
284 const VectorType & src)
const
286 matrices[
level].Tvmult_add(dst, src);
291 template <
typename VectorType>
295 return matrices.min_level();
300 template <
typename VectorType>
304 return matrices.max_level();
309 template <
typename VectorType>
313 return sizeof(*this) + matrices->memory_consumption();
320template <
typename MatrixType,
typename number>
322 const unsigned int col,
324 : matrix(p, typeid(*this).name())
331template <
typename MatrixType,
typename number>
340template <
typename MatrixType,
typename number>
343 const unsigned int bcol)
351template <
typename MatrixType,
typename number>
360 m[
level].block(row, col).vmult(dst, src);
365template <
typename MatrixType,
typename number>
374 m[
level].block(row, col).vmult_add(dst, src);
379template <
typename MatrixType,
typename number>
388 m[
level].block(row, col).Tvmult(dst, src);
393template <
typename MatrixType,
typename number>
402 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)