16#ifndef dealii_trilinos_precondition_h
17# define dealii_trilinos_precondition_h
22# ifdef DEAL_II_WITH_TRILINOS
29# include <Epetra_Map.h>
30# include <Epetra_MpiComm.h>
31# include <Epetra_MultiVector.h>
32# include <Epetra_RowMatrix.h>
33# include <Epetra_Vector.h>
34# include <Teuchos_ParameterList.hpp>
40class Ifpack_Preconditioner;
41class Ifpack_Chebyshev;
44 class MultiLevelPreconditioner;
52template <
typename number>
54template <
typename number>
158 const ::Vector<double> &src)
const;
166 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
174 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
220 <<
"The sparse matrix the preconditioner is based on "
221 <<
"uses a map that is not compatible to the one in vector "
222 << arg1 <<
". Check preconditioner and matrix setup.");
370 const unsigned int overlap = 0,
464 const unsigned int overlap = 0,
550 const double omega = 1,
653 const double omega = 1,
655 const unsigned int overlap = 0,
764 const double omega = 1,
766 const unsigned int overlap = 0,
890 const unsigned int overlap = 0);
1009 const unsigned int overlap = 0);
1115 const unsigned int overlap = 0);
1376 std::vector<std::vector<bool>>(0),
1415 Teuchos::ParameterList & parameter_list,
1416 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1417 const Epetra_RowMatrix & matrix)
const;
1428 Teuchos::ParameterList & parameter_list,
1429 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1439 Teuchos::ParameterList & parameter_list,
1440 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1441 const Epetra_RowMatrix & matrix)
const;
1450 Teuchos::ParameterList & parameter_list,
1451 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1639 const Teuchos::ParameterList &ml_parameters);
1650 const Teuchos::ParameterList &ml_parameters);
1658 template <
typename number>
1660 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1662 const double drop_tolerance = 1e-13,
1663 const ::SparsityPattern *use_this_sparsity =
nullptr);
1702# if defined(DOXYGEN) || defined(DEAL_II_TRILINOS_WITH_MUELU)
1741 std::vector<std::vector<bool>>(0),
1900 Teuchos::ParameterList &muelu_parameters);
1909 Teuchos::ParameterList &muelu_parameters);
1917 template <
typename number>
1919 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1921 const double drop_tolerance = 1e-13,
1922 const ::SparsityPattern *use_this_sparsity =
nullptr);
1991 const ::Vector<double> &src)
const override;
1999 const ::Vector<double> &src)
const override;
2007 const ::LinearAlgebra::distributed::Vector<double> &src)
2017 const ::LinearAlgebra::distributed::Vector<double> &src)
2055 Assert(dst.trilinos_partitioner().SameAs(
2058 Assert(src.trilinos_partitioner().SameAs(
2062 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2063 dst.trilinos_vector());
2070 Assert(dst.trilinos_partitioner().SameAs(
2073 Assert(src.trilinos_partitioner().SameAs(
2078 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2079 dst.trilinos_vector());
2096 const ::Vector<double> &src)
const
2102 Epetra_Vector tril_dst(View,
2105 Epetra_Vector tril_src(View,
2107 const_cast<double *
>(src.begin()));
2109 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2116 const ::Vector<double> &src)
const
2122 Epetra_Vector tril_dst(View,
2125 Epetra_Vector tril_src(View,
2127 const_cast<double *
>(src.begin()));
2130 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2146 Epetra_Vector tril_dst(View,
2149 Epetra_Vector tril_src(View,
2151 const_cast<double *
>(src.
begin()));
2153 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2166 Epetra_Vector tril_dst(View,
2169 Epetra_Vector tril_src(View,
2171 const_cast<double *
>(src.
begin()));
2174 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcTrilinosError(int arg1)
#define AssertThrow(cond, exc)
IndexSet locally_owned_range_indices() const
std::string block_creation_type
~PreconditionAMG() override
void vmult(LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const override
Epetra_MpiComm communicator
void vmult(MPI::Vector &dst, const MPI::Vector &src) const override
std::shared_ptr< SparseMatrix > trilinos_matrix
virtual void Tvmult(::LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const
std::vector< std::vector< bool > > constant_modes
std::string block_creation_type
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
virtual void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
size_type memory_consumption() const
~PreconditionBase() override=default
double aggregation_threshold
virtual ~PreconditionAMGMueLu() override=default
std::shared_ptr< SparseMatrix > trilinos_matrix
double aggregation_threshold
std::vector< std::vector< bool > > constant_modes
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
virtual void vmult(MPI::Vector &dst, const MPI::Vector &src) const
Epetra_Operator & trilinos_operator() const
size_type memory_consumption() const
static ::ExceptionBase & ExcNonMatchingMaps(std::string arg1)
std::shared_ptr< Epetra_Map > vector_distributor
Teuchos::RCP< Epetra_Operator > preconditioner
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
unsigned int smoother_sweeps
virtual void Tvmult(::Vector< double > &dst, const ::Vector< double > &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
bool higher_order_elements
std::string block_creation_type
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
MPI_Comm get_mpi_communicator() const
unsigned int smoother_overlap
void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const override
virtual void vmult(::Vector< double > &dst, const ::Vector< double > &src) const
void Tvmult(LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const override
IndexSet locally_owned_domain_indices() const
void set_operator_null_space(Teuchos::ParameterList ¶meter_list, std::unique_ptr< Epetra_MultiVector > &distributed_constant_modes, const Epetra_RowMatrix &matrix) const
unsigned int smoother_sweeps
unsigned int smoother_overlap
virtual void vmult(::LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
const char * smoother_type
const char * smoother_type
void set_parameters(Teuchos::ParameterList ¶meter_list, std::unique_ptr< Epetra_MultiVector > &distributed_constant_modes, const Epetra_RowMatrix &matrix) const
size_type locally_owned_size() const
unsigned int global_dof_index