15#ifndef dealii_precondition_block_h
16#define dealii_precondition_block_h
80template <
typename MatrixType,
81 typename inverse_type =
typename MatrixType::value_type>
89 using number =
typename MatrixType::value_type;
272 template <
typename number2>
277 const bool transpose_diagonal)
const;
290 template <
typename number2>
295 const bool transpose_diagonal)
const;
323 <<
"The blocksize " << arg1 <<
" and the size of the matrix "
324 << 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>
614 friend class Accessor;
653template <
typename MatrixType,
654 typename inverse_type =
typename MatrixType::value_type>
673 using number =
typename MatrixType::value_type;
699 template <
typename number2>
713 template <
typename number2>
725 template <
typename number2>
739 template <
typename number2>
746 template <
typename number2>
753 template <
typename number2>
772 template <
typename number2>
776 const bool transpose_diagonal,
777 const bool adding)
const;
788 template <
typename number2>
792 const bool transpose_diagonal,
793 const bool adding)
const;
816template <
typename MatrixType,
817 typename inverse_type =
typename MatrixType::value_type>
831 using number =
typename MatrixType::value_type;
839 using typename PreconditionBlockSOR<MatrixType, inverse_type>::AdditionalData;
867 template <
typename number2>
874 template <
typename number2>
881 template <
typename number2>
888 template <
typename number2>
898template <
typename MatrixType,
typename inverse_type>
908template <
typename MatrixType,
typename inverse_type>
912 const size_type bs = blocksize;
913 const unsigned int nb = i / bs;
917 const size_type ib = i % bs;
918 const size_type jb = j % bs;
920 if (jb + nb * bs != j)
930template <
typename MatrixType,
typename inverse_type>
938 , b_iterator(&
matrix->inverse(0), 0, 0)
939 , b_end(&
matrix->inverse(0), 0, 0)
943 if (a_block ==
matrix->size())
946 const size_type r = row % bs;
948 b_iterator =
matrix->inverse(a_block).begin(r);
949 b_end =
matrix->inverse(a_block).end();
955template <
typename MatrixType,
typename inverse_type>
958 inverse_type>::const_iterator::Accessor::row()
const
962 return bs * a_block + b_iterator->row();
966template <
typename MatrixType,
typename inverse_type>
969 inverse_type>::const_iterator::Accessor::column()
const
973 return bs * a_block + b_iterator->column();
977template <
typename MatrixType,
typename inverse_type>
980 inverse_type>::const_iterator::Accessor::value()
const
984 return b_iterator->value();
988template <
typename MatrixType,
typename inverse_type>
997template <
typename MatrixType,
typename inverse_type>
999 inverse_type>::const_iterator &
1020template <
typename MatrixType,
typename inverse_type>
1022 const_iterator::Accessor &
1030template <
typename MatrixType,
typename inverse_type>
1032 const_iterator::Accessor *
1034 inverse_type>::const_iterator::operator->()
const
1040template <
typename MatrixType,
typename inverse_type>
1043 const const_iterator &other)
const
1045 if (accessor.a_block == accessor.matrix->size() &&
1046 accessor.a_block == other.accessor.a_block)
1049 if (accessor.a_block != other.accessor.a_block)
1052 return (accessor.row() == other.accessor.row() &&
1053 accessor.column() == other.accessor.column());
1057template <
typename MatrixType,
typename inverse_type>
1060 const const_iterator &other)
const
1062 return !(*
this == other);
1066template <
typename MatrixType,
typename inverse_type>
1069 const const_iterator &other)
const
1071 return (accessor.row() < other.accessor.row() ||
1072 (accessor.row() == other.accessor.row() &&
1073 accessor.column() < other.accessor.column()));
1077template <
typename MatrixType,
typename inverse_type>
1086template <
typename MatrixType,
typename inverse_type>
1095template <
typename MatrixType,
typename inverse_type>
1099 const size_type r)
const
1107template <
typename MatrixType,
typename inverse_type>
1111 const size_type r)
const
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< typename MatrixType::value_type > & inverse_householder(size_type i)
unsigned int size() const
FullMatrix< typename MatrixType::value_type > & inverse(size_type i)
bool store_diagonals() const
LAPACKFullMatrix< typename MatrixType::value_type > & 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
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
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
SmartPointer< const MatrixType, PreconditionBlock< MatrixType, inverse_type > > A
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)
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)
@ matrix
Contents is actually a matrix.
unsigned int global_dof_index