15#ifndef dealii_trilinos_precondition_h
16#define dealii_trilinos_precondition_h
21#ifdef DEAL_II_WITH_TRILINOS
28# include <Epetra_Map.h>
29# include <Epetra_MpiComm.h>
30# include <Epetra_MultiVector.h>
31# include <Epetra_RowMatrix.h>
32# include <Epetra_Vector.h>
33# include <Teuchos_ParameterList.hpp>
39class Ifpack_Preconditioner;
40class Ifpack_Chebyshev;
43 class MultiLevelPreconditioner;
51template <
typename number>
53template <
typename number>
148 const ::Vector<double> &src)
const;
156 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
164 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
210 <<
"The sparse matrix the preconditioner is based on "
211 <<
"uses a map that is not compatible to the one in vector "
212 << arg1 <<
". Check preconditioner and matrix setup.");
354 const unsigned int overlap = 0,
448 const unsigned int overlap = 0,
534 const double omega = 1,
637 const double omega = 1,
639 const unsigned int overlap = 0,
748 const double omega = 1,
750 const unsigned int overlap = 0,
874 const unsigned int overlap = 0);
993 const unsigned int overlap = 0);
1099 const unsigned int overlap = 0);
1360 std::vector<std::vector<bool>>(0),
1399 Teuchos::ParameterList ¶meter_list,
1400 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1401 const Epetra_RowMatrix &matrix)
const;
1412 Teuchos::ParameterList ¶meter_list,
1413 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1423 Teuchos::ParameterList ¶meter_list,
1424 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1425 const Epetra_RowMatrix &matrix)
const;
1434 Teuchos::ParameterList ¶meter_list,
1435 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1623 const Teuchos::ParameterList &ml_parameters);
1634 const Teuchos::ParameterList &ml_parameters);
1642 template <
typename number>
1644 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1646 const double drop_tolerance = 1e-13,
1647 const ::SparsityPattern *use_this_sparsity =
nullptr);
1686# if defined(DOXYGEN) || defined(DEAL_II_TRILINOS_WITH_MUELU)
1725 std::vector<std::vector<bool>>(0),
1884 Teuchos::ParameterList &muelu_parameters);
1893 Teuchos::ParameterList &muelu_parameters);
1901 template <
typename number>
1903 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1905 const double drop_tolerance = 1e-13,
1906 const ::SparsityPattern *use_this_sparsity =
nullptr);
1975 const ::Vector<double> &src)
const override;
1983 const ::Vector<double> &src)
const override;
1991 const ::LinearAlgebra::distributed::Vector<double> &src)
2001 const ::LinearAlgebra::distributed::Vector<double> &src)
2039 Assert(dst.trilinos_partitioner().SameAs(
2042 Assert(src.trilinos_partitioner().SameAs(
2046 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2047 dst.trilinos_vector());
2054 Assert(dst.trilinos_partitioner().SameAs(
2057 Assert(src.trilinos_partitioner().SameAs(
2062 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2063 dst.trilinos_vector());
2080 const ::Vector<double> &src)
const
2086 Epetra_Vector tril_dst(View,
2089 Epetra_Vector tril_src(View,
2091 const_cast<double *
>(src.begin()));
2093 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2100 const ::Vector<double> &src)
const
2106 Epetra_Vector tril_dst(View,
2109 Epetra_Vector tril_src(View,
2111 const_cast<double *
>(src.begin()));
2114 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2130 Epetra_Vector tril_dst(View,
2133 Epetra_Vector tril_src(View,
2135 const_cast<double *
>(src.
begin()));
2137 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2150 Epetra_Vector tril_dst(View,
2153 Epetra_Vector tril_src(View,
2155 const_cast<double *
>(src.
begin()));
2158 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
size_type locally_owned_size() const
std::shared_ptr< SparseMatrix > trilinos_matrix
size_type memory_consumption() const
virtual ~PreconditionAMGMueLu() override=default
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
~PreconditionAMG() override
std::shared_ptr< SparseMatrix > trilinos_matrix
size_type memory_consumption() const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
IndexSet locally_owned_range_indices() const
Epetra_MpiComm communicator
virtual void Tvmult(::LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const
virtual void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const
virtual void vmult(MPI::Vector &dst, const MPI::Vector &src) const
Epetra_Operator & trilinos_operator() const
Teuchos::RCP< Epetra_Operator > preconditioner
virtual void Tvmult(::Vector< double > &dst, const ::Vector< double > &src) const
MPI_Comm get_mpi_communicator() const
virtual void vmult(::Vector< double > &dst, const ::Vector< double > &src) const
IndexSet locally_owned_domain_indices() const
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())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void vmult(LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const override
void vmult(MPI::Vector &dst, const MPI::Vector &src) const override
void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const override
void Tvmult(LinearAlgebra::distributed::Vector< double > &dst, const ::LinearAlgebra::distributed::Vector< double > &src) const override
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())
virtual size_type size() const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNonMatchingMaps(std::string arg1)
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcTrilinosError(int arg1)
#define AssertThrow(cond, exc)
unsigned int global_dof_index
double aggregation_threshold
std::vector< std::vector< bool > > constant_modes
AdditionalData(const bool elliptic=true, const unsigned int n_cycles=1, const bool w_cycle=false, const double aggregation_threshold=1e-4, const std::vector< std::vector< bool > > &constant_modes=std::vector< std::vector< bool > >(0), const unsigned int smoother_sweeps=2, const unsigned int smoother_overlap=0, const bool output_details=false, const char *smoother_type="Chebyshev", const char *coarse_type="Amesos-KLU")
unsigned int smoother_sweeps
unsigned int smoother_overlap
const char * smoother_type
std::vector< std::vector< bool > > constant_modes
double aggregation_threshold
AdditionalData(const bool elliptic=true, const bool higher_order_elements=false, const unsigned int n_cycles=1, const bool w_cycle=false, const double aggregation_threshold=1e-4, const std::vector< std::vector< bool > > &constant_modes=std::vector< std::vector< bool > >(0), const unsigned int smoother_sweeps=2, const unsigned int smoother_overlap=0, const bool output_details=false, const char *smoother_type="Chebyshev", const char *coarse_type="Amesos-KLU")
unsigned int smoother_sweeps
bool higher_order_elements
unsigned int smoother_overlap
void set_operator_null_space(Teuchos::ParameterList ¶meter_list, std::unique_ptr< Epetra_MultiVector > &distributed_constant_modes, const Epetra_RowMatrix &matrix) const
const char * smoother_type
void set_parameters(Teuchos::ParameterList ¶meter_list, std::unique_ptr< Epetra_MultiVector > &distributed_constant_modes, const Epetra_RowMatrix &matrix) const
std::string block_creation_type
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)
std::string block_creation_type
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
AdditionalData(const unsigned int block_size=1, const std::string &block_creation_type="linear", const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
std::string block_creation_type
AdditionalData(const unsigned int overlap=0)
AdditionalData(const unsigned int degree=1, const double max_eigenvalue=10., const double eigenvalue_ratio=30., const double min_eigenvalue=1., const double min_diagonal=1e-12, const bool nonzero_starting=false)
AdditionalData(const unsigned int ic_fill=0, const double ic_atol=0., const double ic_rtol=1., const unsigned int overlap=0)
AdditionalData(const double ilut_drop=0., const unsigned int ilut_fill=0, const double ilut_atol=0., const double ilut_rtol=1., const unsigned int overlap=0)
AdditionalData(const unsigned int ilu_fill=0, const double ilu_atol=0., const double ilu_rtol=1., const unsigned int overlap=0)
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)