16 #ifndef dealii_pointer_matrix_h 17 #define dealii_pointer_matrix_h 19 #include <deal.II/base/smartpointer.h> 20 #include <deal.II/base/subscriptor.h> 22 #include <deal.II/lac/vector.h> 23 #include <deal.II/lac/vector_memory.h> 25 DEAL_II_NAMESPACE_OPEN
27 template <
typename VectorType>
31 template <
typename number>
33 template <
typename number>
35 template <
typename number>
37 template <
typename number>
39 template <
typename number>
41 template <
typename number>
43 template <
typename number>
45 template <
typename number,
typename BlockVectorType>
62 template <
typename VectorType>
93 vmult(VectorType &dst,
const VectorType &src)
const = 0;
99 Tvmult(VectorType &dst,
const VectorType &src)
const = 0;
105 vmult_add(VectorType &dst,
const VectorType &src)
const = 0;
111 Tvmult_add(VectorType &dst,
const VectorType &src)
const = 0;
127 template <
typename MatrixType,
typename VectorType>
187 vmult(VectorType &dst,
const VectorType &src)
const override;
193 Tvmult(VectorType &dst,
const VectorType &src)
const override;
199 vmult_add(VectorType &dst,
const VectorType &src)
const override;
205 Tvmult_add(VectorType &dst,
const VectorType &src)
const override;
231 template <
typename MatrixType,
typename VectorType>
270 const MatrixType * M,
301 vmult(VectorType &dst,
const VectorType &src)
const override;
307 Tvmult(VectorType &dst,
const VectorType &src)
const override;
313 vmult_add(VectorType &dst,
const VectorType &src)
const override;
319 Tvmult_add(VectorType &dst,
const VectorType &src)
const override;
354 template <
typename number>
475 template <
typename VectorType,
typename MatrixType>
479 const char *name =
"PointerMatrixAux")
489 template <
typename numberv>
492 const Vector<numberv> &,
493 const char *name =
"PointerMatrix")
504 template <
typename numberv,
typename numberm>
507 const Vector<numberv> &,
508 const char *name =
"PointerMatrix")
519 template <
typename numberv,
typename numberm>
522 const Vector<numberv> &,
523 const char *name =
"PointerMatrix")
535 template <
typename numberv,
typename numberm>
538 const Vector<numberv> &,
539 const char *name =
"PointerMatrix")
551 template <
typename VectorType,
typename numberm>
555 const char *name =
"PointerMatrix")
567 template <
typename numberv,
typename numberm>
570 const Vector<numberv> &,
571 const char *name =
"PointerMatrix")
583 template <
typename VectorType,
typename numberm>
587 const char *name =
"PointerMatrix")
599 template <
typename numberv,
typename numberm,
typename BLOCK_VectorType>
603 const BLOCK_VectorType &,
604 const char *name =
"PointerMatrix")
616 template <
typename numberv,
typename numberm>
619 const Vector<numberv> &,
620 const char *name =
"PointerMatrix")
632 template <
typename MatrixType,
typename VectorType>
634 : m(M, typeid(*this).name())
638 template <
typename MatrixType,
typename VectorType>
644 template <
typename MatrixType,
typename VectorType>
651 template <
typename MatrixType,
typename VectorType>
659 template <
typename MatrixType,
typename VectorType>
668 template <
typename MatrixType,
typename VectorType>
677 template <
typename MatrixType,
typename VectorType>
680 const VectorType &src)
const 687 template <
typename MatrixType,
typename VectorType>
690 const VectorType &src)
const 697 template <
typename MatrixType,
typename VectorType>
700 const VectorType &src)
const 703 m->vmult_add(dst, src);
707 template <
typename MatrixType,
typename VectorType>
710 const VectorType &src)
const 713 m->Tvmult_add(dst, src);
721 template <
typename MatrixType,
typename VectorType>
724 const MatrixType * M)
725 : mem(mem, typeid(*this).name())
726 , m(M, typeid(*this).name())
733 template <
typename MatrixType,
typename VectorType>
745 template <
typename MatrixType,
typename VectorType>
748 const MatrixType * M,
758 template <
typename MatrixType,
typename VectorType>
766 template <
typename MatrixType,
typename VectorType>
775 template <
typename MatrixType,
typename VectorType>
786 template <
typename MatrixType,
typename VectorType>
795 template <
typename MatrixType,
typename VectorType>
798 const VectorType &src)
const 808 template <
typename MatrixType,
typename VectorType>
811 const VectorType &src)
const 821 template <
typename MatrixType,
typename VectorType>
824 const VectorType &src)
const 830 VectorType *v = mem->alloc();
838 template <
typename MatrixType,
typename VectorType>
842 const VectorType &src)
const 848 VectorType *v = mem->alloc();
859 template <
typename number>
861 : m(M, typeid(*this).name())
865 template <
typename number>
871 template <
typename number>
878 template <
typename number>
886 template <
typename number>
895 template <
typename number>
904 template <
typename number>
916 template <
typename number>
928 template <
typename number>
940 template <
typename number>
952 DEAL_II_NAMESPACE_CLOSE
virtual void clear() override
SmartPointer< const MatrixType, PointerMatrixAux< MatrixType, VectorType > > m
virtual void Tvmult_add(VectorType &dst, const VectorType &src) const override
typename Vector< number > ::value_type value_type
Subscriptor & operator=(const Subscriptor &)
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 Tvmult_add(VectorType &dst, const VectorType &src) const override
static ::ExceptionBase & ExcNotInitialized()
SmartPointer< const Vector< number >, PointerMatrixVector< number > > m
virtual void Tvmult(VectorType &dst, const VectorType &src) const override
PointerMatrixVector(const Vector< number > *M=0)
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 vmult(VectorType &dst, const VectorType &src) const override
SmartPointer< VectorMemory< VectorType >, PointerMatrixAux< MatrixType, VectorType > > mem
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)
virtual void clear() override
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)
virtual void Tvmult(VectorType &dst, const VectorType &src) const override
const PointerMatrixVector & operator=(const Vector< number > *M)
void set_memory(VectorMemory< VectorType > *mem)
virtual void Tvmult(VectorType &dst, const VectorType &src) const =0
virtual void vmult_add(VectorType &dst, const VectorType &src) const override
virtual void vmult_add(VectorType &dst, const VectorType &src) const override
virtual void vmult(VectorType &dst, const VectorType &src) const override
SmartPointer< const MatrixType, PointerMatrix< MatrixType, VectorType > > m