16 #ifndef dealii__pointer_matrix_h 17 #define dealii__pointer_matrix_h 19 #include <deal.II/base/subscriptor.h> 20 #include <deal.II/base/smartpointer.h> 21 #include <deal.II/lac/vector.h> 22 #include <deal.II/lac/vector_memory.h> 24 DEAL_II_NAMESPACE_OPEN
50 template<
typename VectorType>
74 virtual void clear () = 0;
79 virtual void vmult (VectorType &dst,
80 const VectorType &src)
const = 0;
85 virtual void Tvmult (VectorType &dst,
86 const VectorType &src)
const = 0;
92 const VectorType &src)
const = 0;
98 const VectorType &src)
const = 0;
112 template<
typename MatrixType,
typename VectorType>
152 virtual void clear();
169 virtual void vmult (VectorType &dst,
170 const VectorType &src)
const;
175 virtual void Tvmult (VectorType &dst,
176 const VectorType &src)
const;
182 const VectorType &src)
const;
188 const VectorType &src)
const;
212 template<
typename MatrixType,
typename VectorType>
226 const MatrixType *M = 0);
257 virtual void clear();
279 virtual void vmult (VectorType &dst,
280 const VectorType &src)
const;
285 virtual void Tvmult (VectorType &dst,
286 const VectorType &src)
const;
292 const VectorType &src)
const;
298 const VectorType &src)
const;
329 template <
typename number>
369 virtual void clear();
447 template <
typename VectorType,
typename MatrixType>
460 template <
typename numberv>
473 template <
typename numberv,
typename numberm>
486 template <
typename numberv,
typename numberm>
499 template <
typename numberv,
typename numberm>
512 template <
typename VectorType,
typename numberm>
525 template <
typename numberv,
typename numberm>
538 template <
typename VectorType,
typename numberm>
551 template <
typename numberv,
typename numberm,
typename BLOCK_VectorType>
564 template <
typename numberv,
typename numberm>
576 template<
typename VectorType>
586 template<
typename MatrixType,
typename VectorType>
588 : m(M, typeid(*this).name())
592 template<
typename MatrixType,
typename VectorType>
598 template<
typename MatrixType,
typename VectorType>
605 template<
typename MatrixType,
typename VectorType>
613 template<
typename MatrixType,
typename VectorType>
622 template<
typename MatrixType,
typename VectorType>
631 template<
typename MatrixType,
typename VectorType>
634 const VectorType &src)
const 641 template<
typename MatrixType,
typename VectorType>
644 const VectorType &src)
const 647 m->Tvmult (dst, src);
651 template<
typename MatrixType,
typename VectorType>
654 const VectorType &src)
const 657 m->vmult_add (dst, src);
661 template<
typename MatrixType,
typename VectorType>
664 const VectorType &src)
const 667 m->Tvmult_add (dst, src);
675 template<
typename MatrixType,
typename VectorType>
678 : mem(mem, typeid(*this).name()),
679 m(M, typeid(*this).name())
685 template<
typename MatrixType,
typename VectorType>
695 template<
typename MatrixType,
typename VectorType>
706 template<
typename MatrixType,
typename VectorType>
714 template<
typename MatrixType,
typename VectorType>
723 template<
typename MatrixType,
typename VectorType>
733 template<
typename MatrixType,
typename VectorType>
742 template<
typename MatrixType,
typename VectorType>
745 const VectorType &src)
const 755 template<
typename MatrixType,
typename VectorType>
758 const VectorType &src)
const 764 m->Tvmult (dst, src);
768 template<
typename MatrixType,
typename VectorType>
771 const VectorType &src)
const 777 VectorType *v = mem->alloc();
785 template<
typename MatrixType,
typename VectorType>
788 const VectorType &src)
const 794 VectorType *v = mem->alloc();
805 template<
typename number>
807 : m(M, typeid(*this).name())
811 template<
typename number>
817 template<
typename number>
824 template<
typename number>
832 template<
typename number>
841 template<
typename number>
850 template<
typename number>
862 template<
typename number>
870 dst.
equ (src(0), *m);
874 template<
typename number>
886 template<
typename number>
894 dst.
add (src(0), *m);
898 DEAL_II_NAMESPACE_CLOSE
SmartPointer< const Vector< number >, PointerMatrixVector< number > > m
SmartPointer< const MatrixType, PointerMatrix< MatrixType, VectorType > > m
virtual ~PointerMatrixBase()
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const FullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
virtual void Tvmult_add(VectorType &dst, const VectorType &src) const
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const IdentityMatrix &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
void equ(const Number a, const Vector< Number > &u)
virtual void vmult(Vector< number > &dst, const Vector< number > &src) const
PointerMatrixBase< VectorType > * new_pointer_matrix_base(const BlockSparseMatrixEZ< numberm > &matrix, const VectorType &, const char *name="PointerMatrix")
virtual void vmult_add(VectorType &dst, const VectorType &src) const
static ::ExceptionBase & ExcNotInitialized()
virtual void Tvmult(VectorType &dst, const VectorType &src) const
PointerMatrixVector(const Vector< number > *M=0)
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const SparseMatrixEZ< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
virtual void Tvmult(VectorType &dst, const VectorType &src) const
const PointerMatrixAux & operator=(const MatrixType *M)
virtual void vmult_add(VectorType &dst, const VectorType &src) const =0
PointerMatrixBase< VectorType > * new_pointer_matrix_base(MatrixType &matrix, const VectorType &, const char *name="PointerMatrixAux")
void add(const std::vector< size_type > &indices, const std::vector< OtherNumber > &values)
virtual void vmult_add(Vector< number > &dst, const Vector< number > &src) const
virtual void Tvmult(Vector< number > &dst, const Vector< number > &src) const
#define Assert(cond, exc)
virtual void vmult(VectorType &dst, const VectorType &src) const =0
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
const PointerMatrix & operator=(const MatrixType *M)
virtual void Tvmult_add(Vector< number > &dst, const Vector< number > &src) const
GrowingVectorMemory< VectorType > my_memory
virtual void Tvmult_add(VectorType &dst, const VectorType &src) const =0
PointerMatrixBase< VectorType > * new_pointer_matrix_base(const BlockSparseMatrix< numberm > &matrix, const VectorType &, const char *name="PointerMatrix")
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const LAPACKFullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
PointerMatrixAux(VectorMemory< VectorType > *mem=0, const MatrixType *M=0)
SmartPointer< const MatrixType, PointerMatrixAux< MatrixType, VectorType > > m
virtual void vmult(VectorType &dst, const VectorType &src) const
virtual void vmult(VectorType &dst, const VectorType &src) const
SmartPointer< VectorMemory< VectorType >, PointerMatrixAux< MatrixType, VectorType > > mem
VectorType::value_type value_type
const PointerMatrixVector & operator=(const Vector< number > *M)
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const SparseMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
void set_memory(VectorMemory< VectorType > *mem)
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base(const TridiagonalMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
virtual void vmult_add(VectorType &dst, const VectorType &src) const
virtual void Tvmult(VectorType &dst, const VectorType &src) const =0
virtual void Tvmult_add(VectorType &dst, const VectorType &src) const
PointerMatrixBase< BLOCK_VectorType > * new_pointer_matrix_base(const BlockMatrixArray< numberm, BLOCK_VectorType > &matrix, const BLOCK_VectorType &, const char *name="PointerMatrix")
PointerMatrix(const MatrixType *M=0)