43 #ifndef IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP
44 #define IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP
48 #include "Tpetra_CrsMatrix_fwd.hpp"
49 #include "Teuchos_FancyOStream.hpp"
50 #include <type_traits>
76 template<
class MatrixType>
79 typename MatrixType::local_ordinal_type,
80 typename MatrixType::global_ordinal_type,
81 typename MatrixType::node_type>,
83 typename MatrixType::local_ordinal_type,
84 typename MatrixType::global_ordinal_type,
85 typename MatrixType::node_type> >
100 typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type>
map_type;
108 static_assert (std::is_same<MatrixType, row_matrix_type>::value,
109 "Ifpack2::LocalSparseTriangularSolver: The template parameter "
110 "MatrixType must be a Tpetra::RowMatrix specialization. "
111 "Please don't use Tpetra::CrsMatrix (a subclass of "
112 "Tpetra::RowMatrix) here anymore. The constructor can take "
113 "either a RowMatrix or a CrsMatrix just fine.");
199 return isInitialized_;
232 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
233 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
340 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type> MV;
355 bool isInternallyChanged_;
356 bool reverseStorage_;
358 mutable int numInitialize_;
359 mutable int numCompute_;
360 mutable int numApply_;
362 double initializeTime_;
397 localApply (
const MV& X,
405 localTriangularSolve (
const MV& Y,
409 void initializeState();
414 #endif // IFPACK2_LOCALSPARSETRIANGULARSOLVER_DECL_HPP
Mix-in interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
double getApplyFlops() const
Return the number of flops for the application of the preconditioner.
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, and put the result in Y.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:545
int getNumCompute() const
Return the number of calls to compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:774
std::string description() const
A one-line description of this object.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:809
void compute()
"Numeric" phase of setup
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:509
Teuchos::RCP< const row_matrix_type > getMatrix() const
The original input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:263
MatrixType::global_ordinal_type global_ordinal_type
Type of the global indices of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:93
bool isComputed() const
Return true if compute() has been called.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:209
double getApplyTime() const
Return the time spent in apply().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:802
double getComputeTime() const
Return the time spent in compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:795
double getInitializeTime() const
Return the time spent in initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:788
double getComputeFlops() const
Return the number of flops in the computation phase.
MatrixType::node_type node_type
Node type of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:95
void applyMat(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) const
Apply the original input matrix.
Teuchos::RCP< const map_type > getDomainMap() const
The domain of this operator.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:880
"Preconditioner" that solves local sparse triangular systems.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:77
void initialize()
"Symbolic" phase of setup
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:361
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
int getNumInitialize() const
Return the number of calls to initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:767
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:100
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Set this preconditioner's matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:905
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
This operator's communicator.
Declaration of interface for preconditioners that can change their matrix after construction.
static const EVerbosityLevel verbLevel_default
int getNumApply() const
Return the number of calls to apply().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:781
MatrixType::local_ordinal_type local_ordinal_type
Type of the local indices of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:91
Teuchos::RCP< const map_type > getRangeMap() const
The range of this operator.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:893
Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > crs_matrix_type
Specialization of Tpetra::CrsMatrix used by this class.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:106
void setParameters(const Teuchos::ParameterList ¶ms)
Set this object's parameters.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:321
MatrixType::scalar_type scalar_type
Type of the entries of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:89
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print this object with given verbosity to the given output stream.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:842
MatrixType::mag_type magnitude_type
Type of the absolute value (magnitude) of a scalar_type value.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:98
virtual ~LocalSparseTriangularSolver()
Destructor (virtual for memory safety).
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:315
LocalSparseTriangularSolver()
Constructor that takes no input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:279
bool isInitialized() const
Return true if the preconditioner has been successfully initialized.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:198
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:103