43 #ifndef IFPACK2_DETAILS_DENSESOLVER_DECL_HPP
44 #define IFPACK2_DETAILS_DENSESOLVER_DECL_HPP
49 #include "Ifpack2_ConfigDefs.hpp"
52 #include "Ifpack2_Details_LapackSupportsScalar.hpp"
54 #include <type_traits>
71 template<
class MatrixType,
72 const bool stub = ! LapackSupportsScalar<typename MatrixType::scalar_type>::value>
75 typename MatrixType::local_ordinal_type,
76 typename MatrixType::global_ordinal_type,
77 typename MatrixType::node_type>,
79 typename MatrixType::local_ordinal_type,
80 typename MatrixType::global_ordinal_type,
81 typename MatrixType::node_type> >
85 template<
class MatrixType>
88 typename MatrixType::local_ordinal_type,
89 typename MatrixType::global_ordinal_type,
90 typename MatrixType::node_type>,
92 typename MatrixType::local_ordinal_type,
93 typename MatrixType::global_ordinal_type,
94 typename MatrixType::node_type> >
121 typedef Tpetra::RowMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type>
row_matrix_type;
123 static_assert(std::is_same<MatrixType, row_matrix_type>::value,
124 "Ifpack2::Details::DenseSolver: Please use MatrixType = Tpetra::RowMatrix.");
127 typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type>
map_type;
164 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
165 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
232 std::string description ()
const;
298 applyImpl (
const MV& X,
317 double initializeTime_;
323 mutable double applyTime_;
332 mutable int numApply_;
343 template<
class MatrixType>
346 typename MatrixType::local_ordinal_type,
347 typename MatrixType::global_ordinal_type,
348 typename MatrixType::node_type>,
350 typename MatrixType::local_ordinal_type,
351 typename MatrixType::global_ordinal_type,
352 typename MatrixType::node_type> >
362 typedef MatrixType matrix_type;
365 typedef typename MatrixType::scalar_type scalar_type;
368 typedef typename MatrixType::local_ordinal_type local_ordinal_type;
371 typedef typename MatrixType::global_ordinal_type global_ordinal_type;
374 typedef typename MatrixType::node_type node_type;
380 typedef Tpetra::RowMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type> row_matrix_type;
383 typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type> map_type;
419 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
420 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
487 std::string description ()
const;
497 typedef Tpetra::MultiVector<scalar_type, local_ordinal_type,
498 global_ordinal_type, node_type> MV;
504 #endif // IFPACK2_DETAILS_DENSESOLVER_DECL_HPP
virtual Teuchos::RCP< const Tpetra::Map< MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > getDomainMap() const =0
The domain Map of this operator.
Mix-in interface for preconditioners that can change their matrix after construction.
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
virtual int getNumApply() const =0
The number of calls to apply().
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the absolute value (magnitude) of a scalar_type.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:118
virtual Teuchos::RCP< const Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > getMatrix() const =0
The input matrix given to the constructor.
Teuchos::ScalarTraits< MatrixType::scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_Preconditioner.hpp:111
virtual void compute()=0
Set up the numerical values in this preconditioner.
"Preconditioner" that uses LAPACK's dense LU.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:73
virtual Teuchos::RCP< const Tpetra::Map< MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > getRangeMap() const =0
The range Map of this operator.
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input (global) matrix.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:112
virtual int getNumCompute() const =0
The number of calls to compute().
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
virtual double getInitializeTime() const =0
The time (in seconds) spent in initialize().
MatrixType::node_type node_type
The Node type of the input (global) matrix.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:115
virtual void initialize()=0
Set up the graph structure of this preconditioner.
MatrixType matrix_type
The first template parameter of this class.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:103
Declaration of interface for preconditioners that can change their matrix after construction.
static const EVerbosityLevel verbLevel_default
virtual bool isComputed() const =0
True if the preconditioner has been successfully computed, else false.
virtual int getNumInitialize() const =0
The number of calls to initialize().
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input (global) matrix.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:109
virtual void setParameters(const Teuchos::ParameterList &List)=0
Set this preconditioner's parameters.
Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > map_type
Specialization of Tpetra::Map used by this class.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:124
virtual double getComputeTime() const =0
The time (in seconds) spent in compute().
virtual void apply(const Tpetra::MultiVector< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > &X, Tpetra::MultiVector< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, MatrixType::scalar_typealpha=Teuchos::ScalarTraits< MatrixType::scalar_type >::one(), MatrixType::scalar_typebeta=Teuchos::ScalarTraits< MatrixType::scalar_type >::zero()) const =0
Apply the preconditioner to X, putting the result in Y.
MatrixType::scalar_type scalar_type
The type of entries in the input (global) matrix.
Definition: Ifpack2_Details_DenseSolver_decl.hpp:106
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_Details_DenseSolver_decl.hpp:121
virtual bool isInitialized() const =0
True if the preconditioner has been successfully initialized, else false.
virtual double getApplyTime() const =0
The time (in seconds) spent in apply().
virtual void setMatrix(const Teuchos::RCP< const Tpetra::RowMatrix< MatrixType::scalar_type, MatrixType::local_ordinal_type, MatrixType::global_ordinal_type, MatrixType::node_type > > &A)=0
Set the new matrix.