 |
Reference documentation for deal.II version 9.1.1
|
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
16 #ifndef dealii_mg_matrix_h
17 #define dealii_mg_matrix_h
19 #include <deal.II/base/mg_level_object.h>
21 #include <deal.II/lac/linear_operator.h>
22 #include <deal.II/lac/sparse_matrix.h>
23 #include <deal.II/lac/vector.h>
25 #include <deal.II/multigrid/mg_base.h>
29 DEAL_II_NAMESPACE_OPEN
44 template <
typename VectorType = Vector<
double>>
57 template <
typename MatrixType>
64 template <
typename MatrixType>
80 vmult(
const unsigned int level,
82 const VectorType & src)
const override;
86 const VectorType & src)
const override;
88 Tvmult(
const unsigned int level,
90 const VectorType & src)
const override;
94 const VectorType & src)
const override;
123 template <
typename MatrixType,
typename number>
132 const unsigned int col = 0,
152 vmult(
const unsigned int level,
168 Tvmult(
const unsigned int level,
202 template <
typename VectorType>
203 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();
320 template <
typename MatrixType,
typename number>
322 const unsigned int col,
324 : matrix(p, typeid(*this).name())
331 template <
typename MatrixType,
typename number>
340 template <
typename MatrixType,
typename number>
343 const unsigned int bcol)
351 template <
typename MatrixType,
typename number>
360 m[level].block(row, col).vmult(dst, src);
365 template <
typename MatrixType,
typename number>
374 m[level].block(row, col).vmult_add(dst, src);
379 template <
typename MatrixType,
typename number>
388 m[level].block(row, col).Tvmult(dst, src);
393 template <
typename MatrixType,
typename number>
402 m[level].block(row, col).Tvmult_add(dst, src);
405 DEAL_II_NAMESPACE_CLOSE
virtual unsigned int get_minlevel() const override
virtual void Tvmult(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
virtual void vmult(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
unsigned int max_level() const
virtual void vmult_add(const unsigned int level, VectorType &dst, const VectorType &src) const override
virtual void Tvmult_add(const unsigned int level, VectorType &dst, const VectorType &src) const override
unsigned int min_level() const
void set_matrix(MGLevelObject< MatrixType > *M)
SmartPointer< MGLevelObject< MatrixType >, MGMatrixSelect< MatrixType, number > > matrix
const LinearOperator< VectorType > & operator[](unsigned int level) const
void select_block(const unsigned int row, const unsigned int col)
virtual void Tvmult(const unsigned int level, VectorType &dst, const VectorType &src) const override
void initialize(const MGLevelObject< MatrixType > &M)
virtual void Tvmult_add(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
virtual unsigned int get_maxlevel() const override
static ::ExceptionBase & ExcNotInitialized()
virtual void vmult(const unsigned int level, VectorType &dst, const VectorType &src) const override
#define Assert(cond, exc)
virtual void vmult_add(const unsigned int level, Vector< number > &dst, const Vector< number > &src) const
std::size_t memory_consumption() const
MGMatrixSelect(const unsigned int row=0, const unsigned int col=0, MGLevelObject< MatrixType > *matrix=0)