16 #ifndef dealii_trilinos_precondition_h 17 # define dealii_trilinos_precondition_h 20 # include <deal.II/base/config.h> 22 # ifdef DEAL_II_WITH_TRILINOS 24 # include <deal.II/base/subscriptor.h> 26 # include <deal.II/lac/la_parallel_vector.h> 27 # include <deal.II/lac/trilinos_vector.h> 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> 43 class Ifpack_Preconditioner;
44 class Ifpack_Chebyshev;
47 class MultiLevelPreconditioner;
51 DEAL_II_NAMESPACE_OPEN
54 template <
typename number>
56 template <
typename number>
161 const ::Vector<double> &src)
const;
169 const ::LinearAlgebra::distributed::Vector<double> &src)
const;
177 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 380 const unsigned int overlap = 0,
475 const unsigned int overlap = 0,
564 const double omega = 1,
668 const double omega = 1,
670 const unsigned int overlap = 0,
780 const double omega = 1,
782 const unsigned int overlap = 0,
907 const unsigned int overlap = 0);
1027 const unsigned int overlap = 0);
1134 const unsigned int overlap = 0);
1395 const bool w_cyle =
false,
1398 std::vector<std::vector<bool>>(0),
1437 Teuchos::ParameterList & parameter_list,
1438 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1439 const Epetra_RowMatrix & matrix)
const;
1450 Teuchos::ParameterList & parameter_list,
1451 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1461 Teuchos::ParameterList & parameter_list,
1462 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1463 const Epetra_RowMatrix & matrix)
const;
1472 Teuchos::ParameterList & parameter_list,
1473 std::unique_ptr<Epetra_MultiVector> &distributed_constant_modes,
1653 const Teuchos::ParameterList &ml_parameters);
1664 const Teuchos::ParameterList &ml_parameters);
1672 template <
typename number>
1674 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1676 const double drop_tolerance = 1e-13,
1677 const ::SparsityPattern *use_this_sparsity =
nullptr);
1716 # if defined(DOXYGEN) || DEAL_II_TRILINOS_VERSION_GTE(11, 14, 0) 1751 const bool w_cyle =
false,
1754 std::vector<std::vector<bool>>(0),
1913 Teuchos::ParameterList &muelu_parameters);
1922 Teuchos::ParameterList &muelu_parameters);
1930 template <
typename number>
1932 initialize(const ::SparseMatrix<number> &deal_ii_sparse_matrix,
1934 const double drop_tolerance = 1e-13,
1935 const ::SparsityPattern *use_this_sparsity =
nullptr);
2006 const ::Vector<double> &src)
const override;
2014 const ::Vector<double> &src)
const override;
2022 const ::LinearAlgebra::distributed::Vector<double> &src)
2032 const ::LinearAlgebra::distributed::Vector<double> &src)
2070 Assert(dst.trilinos_partitioner().SameAs(
2073 Assert(src.trilinos_partitioner().SameAs(
2077 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2078 dst.trilinos_vector());
2085 Assert(dst.trilinos_partitioner().SameAs(
2088 Assert(src.trilinos_partitioner().SameAs(
2093 const int ierr =
preconditioner->ApplyInverse(src.trilinos_vector(),
2094 dst.trilinos_vector());
2111 const ::Vector<double> &src)
const 2117 Epetra_Vector tril_dst(View,
2120 Epetra_Vector tril_src(View,
2122 const_cast<double *
>(src.begin()));
2124 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2131 const ::Vector<double> &src)
const 2137 Epetra_Vector tril_dst(View,
2140 Epetra_Vector tril_src(View,
2142 const_cast<double *
>(src.begin()));
2145 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2161 Epetra_Vector tril_dst(View,
2164 Epetra_Vector tril_src(View,
2166 const_cast<double *
>(src.
begin()));
2168 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2181 Epetra_Vector tril_dst(View,
2184 Epetra_Vector tril_src(View,
2186 const_cast<double *
>(src.
begin()));
2189 const int ierr =
preconditioner->ApplyInverse(tril_src, tril_dst);
2202 DEAL_II_NAMESPACE_CLOSE
2204 # endif // DEAL_II_WITH_TRILINOS 2206 #endif // trilinos_precondition_h
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")
static ::ExceptionBase & ExcTrilinosError(int arg1)
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)
size_type local_size() const
unsigned int smoother_sweeps
IndexSet locally_owned_range_indices() const
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
#define AssertDimension(dim1, dim2)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
::types::global_dof_index size_type
double aggregation_threshold
std::vector< std::vector< bool > > constant_modes
void set_parameters(Teuchos::ParameterList ¶meter_list, std::unique_ptr< Epetra_MultiVector > &distributed_constant_modes, const Epetra_RowMatrix &matrix) const
unsigned int smoother_overlap
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
virtual void vmult(MPI::Vector &dst, const MPI::Vector &src) const
const char * smoother_type
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
virtual ~PreconditionAMGMueLu() override=default
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
std::shared_ptr< Epetra_Map > vector_distributor
#define AssertThrow(cond, exc)
AdditionalData(const unsigned int ilu_fill=0, const double ilu_atol=0., const double ilu_rtol=1., const unsigned int overlap=0)
unsigned int smoother_sweeps
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)
AdditionalData(const unsigned int overlap=0)
LinearAlgebra::distributed::Vector< Number > Vector
size_type memory_consumption() const
std::string block_creation_type
#define DeclException1(Exception1, type1, outsequence)
~PreconditionBase() override=default
double aggregation_threshold
const char * smoother_type
#define Assert(cond, exc)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
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)
std::vector< std::vector< bool > > constant_modes
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 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 double omega=1, const double min_diagonal=0, const unsigned int overlap=0, const unsigned int n_sweeps=1)
Epetra_Operator & trilinos_operator() const
size_type memory_consumption() const
~PreconditionAMG() override
std::shared_ptr< SparseMatrix > trilinos_matrix
std::shared_ptr< SparseMatrix > trilinos_matrix
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void Tvmult(MPI::Vector &dst, const MPI::Vector &src) const override
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
unsigned int global_dof_index
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())
static ::ExceptionBase & ExcNonMatchingMaps(std::string arg1)
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
std::string block_creation_type
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())
void vmult(MPI::Vector &dst, const MPI::Vector &src) const override
unsigned int smoother_overlap
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)
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
Epetra_MpiComm communicator
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
MPI_Comm get_mpi_communicator() const
AdditionalData(const double omega=1, const double min_diagonal=0, const unsigned int n_sweeps=1)
Teuchos::RCP< Epetra_Operator > preconditioner
bool higher_order_elements
std::string block_creation_type