47 #ifndef IFPACK2_HIPTMAIR_DECL_HPP 48 #define IFPACK2_HIPTMAIR_DECL_HPP 51 #include <type_traits> 69 template<
class MatrixType>
72 typename MatrixType::local_ordinal_type,
73 typename MatrixType::global_ordinal_type,
74 typename MatrixType::node_type>
93 typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type;
96 typedef Tpetra::RowMatrix<scalar_type,
101 static_assert(std::is_same<MatrixType, row_matrix_type>::value,
"Ifpack2::Hiptmair: 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.");
114 explicit Hiptmair (
const Teuchos::RCP<const row_matrix_type>& A,
115 const Teuchos::RCP<const row_matrix_type>& PtAP,
116 const Teuchos::RCP<const row_matrix_type>& P);
134 void setParameters (
const Teuchos::ParameterList& params);
141 return IsInitialized_;
158 apply (
const Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& X,
159 Tpetra::MultiVector<scalar_type,local_ordinal_type,global_ordinal_type,node_type>& Y,
160 Teuchos::ETransp mode = Teuchos::NO_TRANS,
161 scalar_type alpha = Teuchos::ScalarTraits<scalar_type>::one(),
162 scalar_type beta = Teuchos::ScalarTraits<scalar_type>::zero())
const;
165 applyHiptmairSmoother(
const Tpetra::MultiVector<
typename MatrixType::scalar_type,
166 typename MatrixType::local_ordinal_type,
167 typename MatrixType::global_ordinal_type,
168 typename MatrixType::node_type>& X,
169 Tpetra::MultiVector<
typename MatrixType::scalar_type,
170 typename MatrixType::local_ordinal_type,
171 typename MatrixType::global_ordinal_type,
172 typename MatrixType::node_type>& Y)
const;
175 Teuchos::RCP<const Tpetra::Map<local_ordinal_type,global_ordinal_type,node_type> > getDomainMap()
const;
178 Teuchos::RCP<const Tpetra::Map<local_ordinal_type,global_ordinal_type,node_type> > getRangeMap()
const;
181 bool hasTransposeApply()
const;
188 Teuchos::RCP<const Teuchos::Comm<int> > getComm()
const;
191 Teuchos::RCP<const Tpetra::RowMatrix<scalar_type,local_ordinal_type,global_ordinal_type,node_type> > getMatrix()
const;
194 int getNumInitialize()
const;
197 int getNumCompute()
const;
200 int getNumApply()
const;
203 double getInitializeTime()
const;
206 double getComputeTime()
const;
209 double getApplyTime()
const;
215 std::string description()
const;
218 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const;
223 typedef Teuchos::ScalarTraits<scalar_type> STS;
224 typedef Teuchos::ScalarTraits<magnitude_type> STM;
236 Teuchos::RCP<const row_matrix_type> A_, PtAP_, P_;
239 std::string precType1_, precType2_, preOrPost_;
242 bool ZeroStartingSolution_;
245 Teuchos::ParameterList precList1_, precList2_;
256 mutable int NumApply_;
258 double InitializeTime_;
262 mutable double ApplyTime_;
264 Teuchos::RCP<prec_type> ifpack2_prec1_, ifpack2_prec2_;
269 #endif // IFPACK2_HIPTMAIR_DECL_HPP MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition: Ifpack2_Hiptmair_decl.hpp:84
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition: Ifpack2_Hiptmair_decl.hpp:81
bool isInitialized() const
Return true if initialize() completed successfully, else false.
Definition: Ifpack2_Hiptmair_decl.hpp:140
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_Hiptmair_decl.hpp:99
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
The type of the magnitude (absolute value) of a matrix entry.
Definition: Ifpack2_Hiptmair_decl.hpp:93
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition: Ifpack2_Hiptmair_decl.hpp:87
Wrapper for Hiptmair smoothers.
Definition: Ifpack2_Hiptmair_decl.hpp:70
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition: Ifpack2_Hiptmair_decl.hpp:90
Interface for all Ifpack2 preconditioners.
Definition: Ifpack2_Preconditioner.hpp:107
bool isComputed() const
Return true if compute() completed successfully, else false.
Definition: Ifpack2_Hiptmair_decl.hpp:148
Definition: Ifpack2_Details_Amesos2Wrapper_decl.hpp:63
Ifpack2::Preconditioner< scalar_type, local_ordinal_type, global_ordinal_type, node_type > prec_type
Type of the Ifpack2::Preconditioner specialization from which this class inherits.
Definition: Ifpack2_Hiptmair_decl.hpp:101
Preconditioners and smoothers for Tpetra sparse matrices.
Definition: Ifpack2_AdditiveSchwarz_decl.hpp:72