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
52 template <
typename VectorType>
76 virtual void clear () = 0;
81 virtual void vmult (VectorType &dst,
82 const VectorType &src)
const = 0;
87 virtual void Tvmult (VectorType &dst,
88 const VectorType &src)
const = 0;
93 virtual void vmult_add (VectorType &dst,
94 const VectorType &src)
const = 0;
99 virtual void Tvmult_add (VectorType &dst,
100 const VectorType &src)
const = 0;
116 template <
typename MatrixType,
typename VectorType>
156 virtual void clear();
173 virtual void vmult (VectorType &dst,
174 const VectorType &src)
const;
179 virtual void Tvmult (VectorType &dst,
180 const VectorType &src)
const;
186 const VectorType &src)
const;
192 const VectorType &src)
const;
218 template <
typename MatrixType,
typename VectorType>
232 const MatrixType *M = 0);
263 virtual void clear();
285 virtual void vmult (VectorType &dst,
286 const VectorType &src)
const;
291 virtual void Tvmult (VectorType &dst,
292 const VectorType &src)
const;
298 const VectorType &src)
const;
304 const VectorType &src)
const;
337 template <
typename number>
377 virtual void clear();
455 template <
typename VectorType,
typename MatrixType>
468 template <
typename numberv>
481 template <
typename numberv,
typename numberm>
494 template <
typename numberv,
typename numberm>
507 template <
typename numberv,
typename numberm>
520 template <
typename VectorType,
typename numberm>
533 template <
typename numberv,
typename numberm>
546 template <
typename VectorType,
typename numberm>
559 template <
typename numberv,
typename numberm,
typename BLOCK_VectorType>
572 template <
typename numberv,
typename numberm>
585 template <
typename MatrixType,
typename VectorType>
587 : m(M, typeid(*this).name())
591 template <
typename MatrixType,
typename VectorType>
597 template <
typename MatrixType,
typename VectorType>
604 template <
typename MatrixType,
typename VectorType>
612 template <
typename MatrixType,
typename VectorType>
621 template <
typename MatrixType,
typename VectorType>
630 template <
typename MatrixType,
typename VectorType>
633 const VectorType &src)
const 640 template <
typename MatrixType,
typename VectorType>
643 const VectorType &src)
const 646 m->Tvmult (dst, src);
650 template <
typename MatrixType,
typename VectorType>
653 const VectorType &src)
const 656 m->vmult_add (dst, src);
660 template <
typename MatrixType,
typename VectorType>
663 const VectorType &src)
const 666 m->Tvmult_add (dst, src);
674 template <
typename MatrixType,
typename VectorType>
677 : mem(mem, typeid(*this).name()),
678 m(M, typeid(*this).name())
684 template <
typename MatrixType,
typename VectorType>
694 template <
typename MatrixType,
typename VectorType>
705 template <
typename MatrixType,
typename VectorType>
713 template <
typename MatrixType,
typename VectorType>
722 template <
typename MatrixType,
typename VectorType>
732 template <
typename MatrixType,
typename VectorType>
741 template <
typename MatrixType,
typename VectorType>
744 const VectorType &src)
const 754 template <
typename MatrixType,
typename VectorType>
757 const VectorType &src)
const 763 m->Tvmult (dst, src);
767 template <
typename MatrixType,
typename VectorType>
770 const VectorType &src)
const 776 VectorType *v = mem->alloc();
784 template <
typename MatrixType,
typename VectorType>
787 const VectorType &src)
const 793 VectorType *v = mem->alloc();
804 template <
typename number>
806 : m(M, typeid(*this).name())
810 template <
typename number>
816 template <
typename number>
823 template <
typename number>
831 template <
typename number>
840 template <
typename number>
849 template <
typename number>
861 template <
typename number>
869 dst.
equ (src(0), *m);
873 template <
typename number>
885 template <
typename number>
893 dst.
add (src(0), *m);
897 DEAL_II_NAMESPACE_CLOSE
SmartPointer< const Vector< number >, PointerMatrixVector< number > > m
SmartPointer< const MatrixType, PointerMatrix< MatrixType, VectorType > > m
Subscriptor & operator=(const Subscriptor &)
virtual void Tvmult_add(VectorType &dst, const VectorType &src) const
void equ(const Number a, const Vector< Number > &u)
virtual void vmult(Vector< number > &dst, const Vector< number > &src) const
PointerMatrix(const MatrixType *M=nullptr)
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)
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
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)
void set_memory(VectorMemory< VectorType > *mem)
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