16#ifndef dealii_trilinos_precondition_h
17# define dealii_trilinos_precondition_h
22# ifdef DEAL_II_WITH_TRILINOS
31# ifdef DEAL_II_WITH_MPI
32# include <Epetra_MpiComm.h>
34# include <Epetra_SerialComm.h>
36# include <Epetra_Map.h>
37# include <Epetra_MultiVector.h>
38# include <Epetra_RowMatrix.h>
39# include <Epetra_Vector.h>
40# include <Teuchos_ParameterList.hpp>
44class Ifpack_Preconditioner;
45class Ifpack_Chebyshev;
48 class MultiLevelPreconditioner;
56template <
typename number>
58template <
typename number>
162 const ::Vector<double> &src)
const;
170 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
178 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
224 <<
"The sparse matrix the preconditioner is based on "
225 <<
"uses a map that is not compatible to the one in vector "
226 << arg1 <<
". Check preconditioner and matrix setup.");
242# ifdef DEAL_II_WITH_MPI
378 const unsigned int overlap = 0,
472 const unsigned int overlap = 0,
558 const double omega = 1,
661 const double omega = 1,
663 const unsigned int overlap = 0,
772 const double omega = 1,
774 const unsigned int overlap = 0,
898 const unsigned int overlap = 0);
1017 const unsigned int overlap = 0);
1123 const unsigned int overlap = 0);
1381 const bool w_cyle =
false,
1384 std::vector<std::vector<bool>>(0),
1423 Teuchos::ParameterList & parameter_list,
1424 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1425 const Epetra_RowMatrix &
matrix)
const;
1436 Teuchos::ParameterList & parameter_list,
1437 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1447 Teuchos::ParameterList & parameter_list,
1448 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1449 const Epetra_RowMatrix &
matrix)
const;
1458 Teuchos::ParameterList & parameter_list,
1459 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 = 1
e-13,
1663 const ::SparsityPattern *use_this_sparsity =
nullptr);
1702# if defined(DOXYGEN) || defined(DEAL_II_TRILINOS_WITH_MUELU)
1738 const bool w_cyle =
false,
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 = 1
e-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
AdditionalData(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
~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
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)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
size_type memory_consumption() const
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)
~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())
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
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)
virtual void vmult(MPI::Vector &dst, const MPI::Vector &src) const
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 ilu_fill=0, const double ilu_atol=0., const double ilu_rtol=1., const unsigned int overlap=0)
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
AdditionalData(const unsigned int ic_fill=0, const double ic_atol=0., const double ic_rtol=1., const unsigned int overlap=0)
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
AdditionalData(const unsigned int overlap=0)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)
AdditionalData(const bool elliptic=true, const unsigned int n_cycles=1, const bool w_cyle=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")
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)
MPI_Comm get_mpi_communicator() const
unsigned int smoother_overlap
AdditionalData(const bool elliptic=true, const bool higher_order_elements=false, const unsigned int n_cycles=1, const bool w_cyle=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")
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
typename ::internal::FEValuesViews::ViewType< dim, spacedim, Extractor >::type View
@ matrix
Contents is actually a matrix.
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
unsigned int global_dof_index