18#ifndef IFPACK2_DETAILS_AMESOS2WRAPPER_DECL_HPP
19#define IFPACK2_DETAILS_AMESOS2WRAPPER_DECL_HPP
21#include "Ifpack2_ConfigDefs.hpp"
23#ifdef HAVE_IFPACK2_AMESOS2
27#include "Tpetra_CrsMatrix.hpp"
37 template<
class MV,
class OP,
class NormType>
68template<
class MatrixType>
71 typename MatrixType::local_ordinal_type,
72 typename MatrixType::global_ordinal_type,
73 typename MatrixType::node_type>,
75 typename MatrixType::local_ordinal_type,
76 typename MatrixType::global_ordinal_type,
77 typename MatrixType::node_type> >
96 typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type;
104 static_assert(std::is_same<MatrixType, row_matrix_type>::value,
105 "Ifpack2::Details::Amesos2Wrapper: Please use MatrixType = Tpetra::RowMatrix.");
126 explicit Amesos2Wrapper (
const Teuchos::RCP<const row_matrix_type>& A);
154 return IsInitialized_;
202 setMatrix (
const Teuchos::RCP<const row_matrix_type>& A);
224 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
225 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
226 Teuchos::ETransp mode = Teuchos::NO_TRANS,
227 scalar_type alpha = Teuchos::ScalarTraits<scalar_type>::one(),
228 scalar_type beta = Teuchos::ScalarTraits<scalar_type>::zero())
const;
244 Teuchos::RCP<const Teuchos::Comm<int> >
getComm ()
const;
247 Teuchos::RCP<const row_matrix_type>
getMatrix ()
const;
276 describe (Teuchos::FancyOStream &out,
277 const Teuchos::EVerbosityLevel verbLevel =
278 Teuchos::Describable::verbLevel_default)
const;
282 typedef Teuchos::ScalarTraits<scalar_type> STS;
283 typedef Teuchos::ScalarTraits<magnitude_type> STM;
284 typedef typename Teuchos::Array<local_ordinal_type>::size_type size_type;
287 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type> MV;
289 typedef Tpetra::Operator<scalar_type, local_ordinal_type, global_ordinal_type, node_type> OP;
298 Teuchos::RCP<Trilinos::Details::LinearSolver<MV, OP, typename MV::mag_type> > solver_;
305 static Teuchos::RCP<const row_matrix_type>
306 makeLocalFilter (
const Teuchos::RCP<const row_matrix_type>& A);
310 Teuchos::RCP<const row_matrix_type> A_;
320 Teuchos::RCP<const crs_matrix_type> A_local_crs_;
328 Teuchos::RCP<const Teuchos::ParameterList> parameterList_;
335 double InitializeTime_;
339 mutable double ApplyTime_;
345 mutable int NumApply_;
352 std::string SolverName_;
Declaration of interface for preconditioners that can change their matrix after construction.
Wrapper class for direct solvers in Amesos2.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:78
double getComputeTime() const
The total time in seconds spent in successful calls to compute().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:169
Teuchos::RCP< const map_type > getRangeMap() const
Tpetra::Map representing the range of this operator.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:128
Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > map_type
Type of the Tpetra::Map specialization that this class uses.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:110
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:96
Teuchos::RCP< const row_matrix_type > getMatrix() const
The input matrix; the matrix to be preconditioned.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:109
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:84
int getNumInitialize() const
The total number of successful calls to initialize().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:145
double getApplyTime() const
The total time in seconds spent in successful calls to apply().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:175
int getNumApply() const
The total number of successful calls to apply().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:157
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:87
bool isComputed() const
True if compute() completed successfully, else false.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:171
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:93
virtual ~Amesos2Wrapper()
Destructor.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:49
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to the given output stream.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:520
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:90
void apply(const Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &X, Tpetra::MultiVector< scalar_type, local_ordinal_type, global_ordinal_type, node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, scalar_type alpha=Teuchos::ScalarTraits< scalar_type >::one(), scalar_type beta=Teuchos::ScalarTraits< scalar_type >::zero()) const
Apply the preconditioner to X, resulting in Y.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:381
std::string description() const
A one-line description of this object.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:480
Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > row_matrix_type
Type of the Tpetra::RowMatrix specialization that this class uses.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:102
bool isInitialized() const
Returns true if the preconditioner has been successfully initialized.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:153
void initialize()
Compute the preordering and symbolic factorization of the matrix.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:242
int getNumCompute() const
The total number of successful calls to compute().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:151
void setParameters(const Teuchos::ParameterList ¶ms)
Set parameters.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:53
Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > crs_matrix_type
Type of the Tpetra::CrsMatrix specialization that this class uses.
Definition Ifpack2_Details_Amesos2Wrapper_decl.hpp:116
Teuchos::RCP< const map_type > getDomainMap() const
Tpetra::Map representing the domain of this operator.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:116
void compute()
Compute the numeric factorization of the matrix.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:348
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
The input matrix's communicator.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:98
Amesos2Wrapper(const Teuchos::RCP< const row_matrix_type > &A)
Constructor.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:35
double getInitializeTime() const
The total time in seconds spent in successful calls to initialize().
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:163
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Change the matrix to be preconditioned.
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:180
bool hasTransposeApply() const
Whether this object's apply() method can apply the transpose (or conjugate transpose,...
Definition Ifpack2_Details_Amesos2Wrapper_def.hpp:139
Mix-in interface for preconditioners that can change their matrix after construction.
Definition Ifpack2_Details_CanChangeMatrix.hpp:60
Interface for all Ifpack2 preconditioners.
Definition Ifpack2_Preconditioner.hpp:75
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41