43 #ifndef IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP 44 #define IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP 48 #include "Teuchos_FancyOStream.hpp" 49 #include <type_traits> 51 #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 template<
class S,
class LO,
class GO,
class N, const
bool classic>
class CrsMatrix;
56 #endif // DOXYGEN_SHOULD_SKIP_THIS 82 template<
class MatrixType>
85 typename MatrixType::local_ordinal_type,
86 typename MatrixType::global_ordinal_type,
87 typename MatrixType::node_type>,
89 typename MatrixType::local_ordinal_type,
90 typename MatrixType::global_ordinal_type,
91 typename MatrixType::node_type> >
106 typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type>
map_type;
108 typedef Tpetra::RowMatrix<scalar_type, local_ordinal_type,
111 static_assert (std::is_same<MatrixType, row_matrix_type>::value,
112 "Ifpack2::LocalSparseTriangularSolver: The template parameter " 113 "MatrixType must be a Tpetra::RowMatrix specialization. " 114 "Please don't use Tpetra::CrsMatrix (a subclass of " 115 "Tpetra::RowMatrix) here anymore. The constructor can take " 116 "either a RowMatrix or a CrsMatrix just fine.");
156 const Teuchos::RCP<Teuchos::FancyOStream>& out);
164 void setParameters (
const Teuchos::ParameterList& params);
175 return isInitialized_;
208 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
209 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
210 Teuchos::ETransp mode = Teuchos::NO_TRANS,
211 scalar_type alpha = Teuchos::ScalarTraits<scalar_type>::one (),
212 scalar_type beta = Teuchos::ScalarTraits<scalar_type>::zero ())
const;
215 Teuchos::RCP<const map_type> getDomainMap ()
const;
218 Teuchos::RCP<const map_type> getRangeMap ()
const;
229 applyMat (
const Tpetra::MultiVector<scalar_type, local_ordinal_type,
230 global_ordinal_type, node_type>& X,
231 Tpetra::MultiVector<scalar_type, local_ordinal_type,
232 global_ordinal_type, node_type>& Y,
233 Teuchos::ETransp mode = Teuchos::NO_TRANS)
const;
236 Teuchos::RCP<const Teuchos::Comm<int> > getComm ()
const;
239 Teuchos::RCP<const row_matrix_type>
getMatrix ()
const {
244 double getComputeFlops ()
const;
247 double getApplyFlops ()
const;
250 int getNumInitialize ()
const;
253 int getNumCompute ()
const;
256 int getNumApply ()
const;
259 double getInitializeTime ()
const;
262 double getComputeTime ()
const;
265 double getApplyTime ()
const;
272 std::string description()
const;
296 describe (Teuchos::FancyOStream& out,
297 const Teuchos::EVerbosityLevel verbLevel =
298 Teuchos::Describable::verbLevel_default)
const;
304 virtual void setMatrix (
const Teuchos::RCP<const row_matrix_type>& A);
310 Teuchos::RCP<const row_matrix_type> A_;
312 Teuchos::RCP<Teuchos::FancyOStream> out_;
314 Teuchos::RCP<
const Tpetra::CrsMatrix<scalar_type,
317 node_type,
false> > A_crs_;
319 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type> MV;
320 mutable Teuchos::RCP<MV> X_colMap_;
321 mutable Teuchos::RCP<MV> Y_rowMap_;
326 mutable int numInitialize_;
327 mutable int numCompute_;
328 mutable int numApply_;
330 double initializeTime_;
353 localApply (
const MV& X,
355 const Teuchos::ETransp mode,
356 const scalar_type& alpha,
357 const scalar_type& beta)
const;
362 #endif // IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP Mix-in interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
Teuchos::RCP< const row_matrix_type > getMatrix() const
The original input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:239
bool isInitialized() const
Return true if the preconditioner has been successfully initialized.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:174
MatrixType::global_ordinal_type global_ordinal_type
Type of the global indices of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:99
MatrixType::node_type node_type
Node type of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:101
bool isComputed() const
Return true if compute() has been called.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:185
"Preconditioner" that solves local sparse triangular systems.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:83
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > map_type
Specialization of Tpetra::Map used by this class.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:106
Declaration of interface for preconditioners that can change their matrix after construction.
MatrixType::local_ordinal_type local_ordinal_type
Type of the local indices of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:97
MatrixType::scalar_type scalar_type
Type of the entries of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:95
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72
MatrixType::mag_type magnitude_type
Type of the absolute value (magnitude) of a scalar_type value.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:104
Tpetra::RowMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > row_matrix_type
Specialization of Tpetra::RowMatrix used by this class.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:109