15#ifndef dealii_precondition_block_h
16#define dealii_precondition_block_h
80 typename inverse_type =
typename MatrixType::value_type>
88 using number =
typename MatrixType::value_type;
271 template <
typename number2>
276 const bool transpose_diagonal)
const;
289 template <
typename number2>
294 const bool transpose_diagonal)
const;
322 <<
"The blocksize " << arg1 <<
" and the size of the matrix "
323 << arg2 <<
" do not match.");
376template <
typename MatrixType,
377 typename inverse_type =
typename MatrixType::value_type>
386 using number =
typename MatrixType::value_type;
536 template <
typename number2>
543 template <
typename number2>
553 template <
typename number2>
560 template <
typename number2>
567 template <
typename number2>
574 template <
typename number2>
610 template <
typename number2>
653template <
typename MatrixType,
654 typename inverse_type =
typename MatrixType::value_type>
673 using number =
typename MatrixType::value_type;
699 template <
typename number2>
710 template <
typename number2>
722 template <
typename number2>
733 template <
typename number2>
740 template <
typename number2>
747 template <
typename number2>
766 template <
typename number2>
770 const bool transpose_diagonal,
771 const bool adding)
const;
782 template <
typename number2>
786 const bool transpose_diagonal,
787 const bool adding)
const;
810template <
typename MatrixType,
811 typename inverse_type =
typename MatrixType::value_type>
825 using number =
typename MatrixType::value_type;
861 template <
typename number2>
868 template <
typename number2>
875 template <
typename number2>
882 template <
typename number2>
892template <
typename MatrixType,
typename inverse_type>
902template <
typename MatrixType,
typename inverse_type>
907 const unsigned int nb = i / bs;
914 if (jb + nb * bs != j)
924template <
typename MatrixType,
typename inverse_type>
930 , bs(
matrix->block_size())
932 , b_iterator(&
matrix->inverse(0), 0, 0)
933 , b_end(&
matrix->inverse(0), 0, 0)
937 if (a_block ==
matrix->size())
942 b_iterator =
matrix->inverse(a_block).begin(r);
943 b_end =
matrix->inverse(a_block).end();
949template <
typename MatrixType,
typename inverse_type>
952 inverse_type>::const_iterator::Accessor::row()
const
956 return bs * a_block + b_iterator->row();
960template <
typename MatrixType,
typename inverse_type>
963 inverse_type>::const_iterator::Accessor::column()
const
967 return bs * a_block + b_iterator->column();
971template <
typename MatrixType,
typename inverse_type>
974 inverse_type>::const_iterator::Accessor::value()
const
978 return b_iterator->value();
982template <
typename MatrixType,
typename inverse_type>
991template <
typename MatrixType,
typename inverse_type>
993 inverse_type>::const_iterator &
1014template <
typename MatrixType,
typename inverse_type>
1016 const_iterator::Accessor &
1024template <
typename MatrixType,
typename inverse_type>
1026 const_iterator::Accessor *
1028 inverse_type>::const_iterator::operator->()
const
1034template <
typename MatrixType,
typename inverse_type>
1037 const const_iterator &other)
const
1039 if (accessor.a_block == accessor.matrix->size() &&
1040 accessor.a_block == other.accessor.a_block)
1043 if (accessor.a_block != other.accessor.a_block)
1046 return (accessor.row() == other.accessor.row() &&
1047 accessor.column() == other.accessor.column());
1051template <
typename MatrixType,
typename inverse_type>
1054 const const_iterator &other)
const
1056 return !(*
this == other);
1060template <
typename MatrixType,
typename inverse_type>
1063 const const_iterator &other)
const
1065 return (accessor.row() < other.accessor.row() ||
1066 (accessor.row() == other.accessor.row() &&
1067 accessor.column() < other.accessor.column()));
1071template <
typename MatrixType,
typename inverse_type>
1080template <
typename MatrixType,
typename inverse_type>
1089template <
typename MatrixType,
typename inverse_type>
1101template <
typename MatrixType,
typename inverse_type>
typename Table< 2, number >::const_iterator const_iterator
iterator begin(const size_type r)
iterator end(const size_type r)
void log_statistics() const
Householder< number > & inverse_householder(size_type i)
unsigned int size() const
FullMatrix< number > & inverse(size_type i)
bool store_diagonals() const
LAPACKFullMatrix< number > & inverse_svd(size_type i)
const PreconditionBlockJacobi< MatrixType, inverse_type > * matrix
FullMatrix< inverse_type >::const_iterator b_end
FullMatrix< inverse_type >::const_iterator b_iterator
Accessor(const PreconditionBlockJacobi< MatrixType, inverse_type > *matrix, const size_type row)
inverse_type value() const
bool operator!=(const const_iterator &) const
const_iterator(const PreconditionBlockJacobi< MatrixType, inverse_type > *matrix, const size_type row)
const_iterator & operator++()
bool operator==(const const_iterator &) const
bool operator<(const const_iterator &) const
const Accessor & operator*() const
const Accessor * operator->() const
void vmult(Vector< number2 > &, const Vector< number2 > &) const
void step(Vector< number2 > &dst, const Vector< number2 > &rhs) const
void vmult_add(Vector< number2 > &, const Vector< number2 > &) const
const_iterator begin(const size_type r) const
const_iterator end() const
void Tvmult(Vector< number2 > &, const Vector< number2 > &) const
void do_vmult(Vector< number2 > &, const Vector< number2 > &, bool adding) const
void Tvmult_add(Vector< number2 > &, const Vector< number2 > &) const
typename MatrixType::value_type number
const_iterator begin() const
const_iterator end(const size_type r) const
friend class const_iterator
void Tstep(Vector< number2 > &dst, const Vector< number2 > &rhs) const
types::global_dof_index size_type
PreconditionBlockSOR(bool store)
void vmult_add(Vector< number2 > &, const Vector< number2 > &) const
void vmult(Vector< number2 > &, const Vector< number2 > &) const
typename MatrixType::value_type number
void step(Vector< number2 > &dst, const Vector< number2 > &rhs) const
void Tstep(Vector< number2 > &dst, const Vector< number2 > &rhs) const
void forward(Vector< number2 > &, const Vector< number2 > &, const bool transpose_diagonal, const bool adding) const
void backward(Vector< number2 > &, const Vector< number2 > &, const bool transpose_diagonal, const bool adding) const
void Tvmult(Vector< number2 > &, const Vector< number2 > &) const
void Tvmult_add(Vector< number2 > &, const Vector< number2 > &) const
void vmult(Vector< number2 > &, const Vector< number2 > &) const
void step(Vector< number2 > &dst, const Vector< number2 > &rhs) const
typename MatrixType::value_type number
void Tstep(Vector< number2 > &dst, const Vector< number2 > &rhs) const
types::global_dof_index size_type
void Tvmult(Vector< number2 > &, const Vector< number2 > &) const
AdditionalData(const size_type block_size, const double relaxation=1., const bool invert_diagonal=true, const bool same_diagonal=false)
PreconditionBlockBase< inverse_type >::Inversion inversion
PreconditionBlock(bool store_diagonals=false)
~PreconditionBlock() override=default
value_type el(size_type i, size_type j) const
void forward_step(Vector< number2 > &dst, const Vector< number2 > &prev, const Vector< number2 > &src, const bool transpose_diagonal) const
void initialize(const MatrixType &A, const AdditionalData parameters)
ObserverPointer< const MatrixType, PreconditionBlock< MatrixType, inverse_type > > A
void invert_permuted_diagblocks()
void backward_step(Vector< number2 > &dst, const Vector< number2 > &prev, const Vector< number2 > &src, const bool transpose_diagonal) const
std::size_t memory_consumption() const
std::vector< size_type > inverse_permutation
void set_permutation(const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation)
std::vector< size_type > permutation
size_type block_size() const
typename MatrixType::value_type number
void initialize(const MatrixType &A, const std::vector< size_type > &permutation, const std::vector< size_type > &inverse_permutation, const AdditionalData parameters)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcInverseMatricesAlreadyExist()
#define Assert(cond, exc)
static ::ExceptionBase & ExcIteratorPastEnd()
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcWrongBlockSize(int arg1, int arg2)
#define AssertIndexRange(index, range)
types::global_dof_index size_type
@ matrix
Contents is actually a matrix.
Tpetra::CrsMatrix< Number, LO, GO, NodeType< MemorySpace > > MatrixType
unsigned int global_dof_index