43 #ifndef IFPACK2_IDENTITY_SOLVER_DECL_HPP 
   44 #define IFPACK2_IDENTITY_SOLVER_DECL_HPP 
   48 #include "Tpetra_Export_fwd.hpp" 
   49 #include <type_traits> 
   59 template<
class MatrixType>
 
   62                                            typename MatrixType::local_ordinal_type,
 
   63                                            typename MatrixType::global_ordinal_type,
 
   64                                            typename MatrixType::node_type>,
 
   66                                                                        typename MatrixType::local_ordinal_type,
 
   67                                                                        typename MatrixType::global_ordinal_type,
 
   68                                                                        typename MatrixType::node_type> >
 
   83   typedef Tpetra::Map<local_ordinal_type, global_ordinal_type, node_type> 
map_type;
 
   88   static_assert(std::is_same<MatrixType, row_matrix_type>::value, 
"Ifpack2::IdentitySolver: The template parameter MatrixType must be a Tpetra::RowMatrix specialization.  Please don't use Tpetra::CrsMatrix (a subclass of Tpetra::RowMatrix) here anymore.  The constructor can take either a RowMatrix or a CrsMatrix just fine.");
 
  106     return(isInitialized_);
 
  127   apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
 
  128          Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
 
  144   applyMat (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
 
  145             Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
 
  200   typedef Tpetra::Export<local_ordinal_type, global_ordinal_type, node_type> export_type;
 
  216   mutable int numInitialize_;
 
  217   mutable int numCompute_;
 
  218   mutable int numApply_;
 
  220   double initializeTime_;
 
int getNumApply() const 
Return the number of calls to apply(). 
Definition: Ifpack2_IdentitySolver_def.hpp:177
MatrixType::node_type node_type
Node type of the input matrix. 
Definition: Ifpack2_IdentitySolver_decl.hpp:78
double getComputeTime() const 
Return the time spent in compute(). 
Definition: Ifpack2_IdentitySolver_def.hpp:187
Mix-in interface for preconditioners that can change their matrix after construction. 
Definition: Ifpack2_Details_CanChangeMatrix.hpp:93
int getNumCompute() const 
Return the number of calls to compute(). 
Definition: Ifpack2_IdentitySolver_def.hpp:172
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const 
Return the communicator associated with this matrix operator. 
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. 
virtual ~IdentitySolver()
Destructor. 
Definition: Ifpack2_IdentitySolver_def.hpp:69
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_IdentitySolver_def.hpp:127
Teuchos::RCP< const map_type > getRangeMap() const 
Return the Tpetra::Map object associated with the range of this operator. 
Definition: Ifpack2_IdentitySolver_def.hpp:257
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
Type of the absolute value (magnitude) of a scalar_type value. 
Definition: Ifpack2_IdentitySolver_decl.hpp:81
Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > map_type
Specialization of Tpetra::Map used by this class. 
Definition: Ifpack2_IdentitySolver_decl.hpp:83
bool isInitialized() const 
Return true if the preconditioner has been successfully initialized. 
Definition: Ifpack2_IdentitySolver_decl.hpp:105
void setParameters(const Teuchos::ParameterList ¶ms)
Set this object's parameters. 
Definition: Ifpack2_IdentitySolver_def.hpp:74
"Identity" preconditioner. 
Definition: Ifpack2_IdentitySolver_decl.hpp:60
void initialize()
Initialize. 
Definition: Ifpack2_IdentitySolver_def.hpp:79
bool isComputed() const 
Return true if compute() has been called. 
Definition: Ifpack2_IdentitySolver_decl.hpp:113
Teuchos::RCP< const map_type > getDomainMap() const 
Return the Tpetra::Map object associated with the domain of this operator. 
Definition: Ifpack2_IdentitySolver_def.hpp:247
IdentitySolver(const Teuchos::RCP< const row_matrix_type > &A)
Constructor: Takes the matrix to precondition. 
Definition: Ifpack2_IdentitySolver_def.hpp:55
MatrixType::local_ordinal_type local_ordinal_type
Type of the local indices of the input matrix. 
Definition: Ifpack2_IdentitySolver_decl.hpp:74
Interface for all Ifpack2 preconditioners. 
Definition: Ifpack2_Preconditioner.hpp:107
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Set this preconditioner's matrix. 
Definition: Ifpack2_IdentitySolver_def.hpp:268
double getComputeFlops() const 
Return the number of flops in the computation phase. 
Declaration of interface for preconditioners that can change their matrix after construction. 
std::string description() const 
Return a simple one-line description of this object. 
Definition: Ifpack2_IdentitySolver_def.hpp:197
static const EVerbosityLevel verbLevel_default
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const 
Print the object with some verbosity level to an FancyOStream object. 
Definition: Ifpack2_IdentitySolver_def.hpp:227
void compute()
Compute the preconditioner. 
Definition: Ifpack2_IdentitySolver_def.hpp:110
Teuchos::RCP< const row_matrix_type > getMatrix() const 
Return a reference to the matrix to be preconditioned. 
Definition: Ifpack2_IdentitySolver_decl.hpp:152
int getNumInitialize() const 
Return the number of calls to initialize(). 
Definition: Ifpack2_IdentitySolver_def.hpp:167
MatrixType::global_ordinal_type global_ordinal_type
Type of the global indices of the input matrix. 
Definition: Ifpack2_IdentitySolver_decl.hpp:76
double getInitializeTime() const 
Return the time spent in initialize(). 
Definition: Ifpack2_IdentitySolver_def.hpp:182
MatrixType::scalar_type scalar_type
Type of the entries of the input matrix. 
Definition: Ifpack2_IdentitySolver_decl.hpp:72
double getApplyTime() const 
Return the time spent in apply(). 
Definition: Ifpack2_IdentitySolver_def.hpp:192
double getApplyFlops() const 
Return the number of flops for the application of the preconditioner. 
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_IdentitySolver_decl.hpp:86