51 #ifndef IFPACK2_DETAILS_AMESOS2WRAPPER_DECL_HPP 52 #define IFPACK2_DETAILS_AMESOS2WRAPPER_DECL_HPP 54 #include "Ifpack2_ConfigDefs.hpp" 56 #ifdef HAVE_IFPACK2_AMESOS2 60 #include "Tpetra_CrsMatrix.hpp" 61 #include <type_traits> 70 template<
class MV,
class OP,
class NormType>
101 template<
class MatrixType>
104 typename MatrixType::local_ordinal_type,
105 typename MatrixType::global_ordinal_type,
106 typename MatrixType::node_type>,
108 typename MatrixType::local_ordinal_type,
109 typename MatrixType::global_ordinal_type,
110 typename MatrixType::node_type> >
129 typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type;
132 typedef Tpetra::RowMatrix<scalar_type,
137 static_assert(std::is_same<MatrixType, row_matrix_type>::value,
138 "Ifpack2::Details::Amesos2Wrapper: Please use MatrixType = Tpetra::RowMatrix.");
141 typedef Tpetra::Map<local_ordinal_type,
146 typedef Tpetra::CrsMatrix<scalar_type,
159 explicit Amesos2Wrapper (
const Teuchos::RCP<const row_matrix_type>& A);
169 void setParameters (
const Teuchos::ParameterList& params);
187 return IsInitialized_;
235 setMatrix (
const Teuchos::RCP<const row_matrix_type>& A);
257 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
258 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
259 Teuchos::ETransp mode = Teuchos::NO_TRANS,
260 scalar_type alpha = Teuchos::ScalarTraits<scalar_type>::one(),
261 scalar_type beta = Teuchos::ScalarTraits<scalar_type>::zero())
const;
264 Teuchos::RCP<const map_type> getDomainMap ()
const;
267 Teuchos::RCP<const map_type> getRangeMap ()
const;
270 bool hasTransposeApply ()
const;
277 Teuchos::RCP<const Teuchos::Comm<int> > getComm ()
const;
280 Teuchos::RCP<const row_matrix_type> getMatrix ()
const;
283 int getNumInitialize ()
const;
286 int getNumCompute ()
const;
289 int getNumApply ()
const;
292 double getInitializeTime ()
const;
295 double getComputeTime ()
const;
298 double getApplyTime ()
const;
305 std::string description ()
const;
309 describe (Teuchos::FancyOStream &out,
310 const Teuchos::EVerbosityLevel verbLevel =
311 Teuchos::Describable::verbLevel_default)
const;
315 typedef Teuchos::ScalarTraits<scalar_type> STS;
316 typedef Teuchos::ScalarTraits<magnitude_type> STM;
317 typedef typename Teuchos::Array<local_ordinal_type>::size_type size_type;
320 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type> MV;
322 typedef Tpetra::Operator<scalar_type, local_ordinal_type, global_ordinal_type, node_type> OP;
331 Teuchos::RCP<Trilinos::Details::LinearSolver<MV, OP, typename MV::mag_type> > solver_;
338 static Teuchos::RCP<const row_matrix_type>
339 makeLocalFilter (
const Teuchos::RCP<const row_matrix_type>& A);
343 Teuchos::RCP<const row_matrix_type> A_;
353 Teuchos::RCP<const crs_matrix_type> A_local_crs_;
361 Teuchos::RCP<const Teuchos::ParameterList> parameterList_;
368 double InitializeTime_;
372 mutable double ApplyTime_;
378 mutable int NumApply_;
385 std::string SolverName_;
392 #endif // HAVE_IFPACK2_AMESOS2 394 #endif // IFPACK2_DETAILS_AMESOS2WRAPPER_DECL_HPP Mix-in interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
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:135
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:123
Ifpack2 implementation details.
bool isInitialized() const
Returns true if the preconditioner has been successfully initialized.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:186
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:117
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:149
Wrapper class for direct solvers in Amesos2.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:102
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:64
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:126
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:120
Declaration of interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:63
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:138
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:129
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
bool isComputed() const
True if compute() completed successfully, else false.
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:204