102 :
public ContainerImpl<MatrixType, typename InverseType::scalar_type> {
112 using matrix_type = MatrixType;
118 using inverse_type = InverseType;
120 using typename Container<MatrixType>::SC;
121 using typename Container<MatrixType>::LO;
122 using typename Container<MatrixType>::GO;
123 using typename Container<MatrixType>::NO;
125 using typename Container<MatrixType>::mv_type;
126 using typename Container<MatrixType>::map_type;
127 using typename Container<MatrixType>::vector_type;
128 using typename Container<MatrixType>::import_type;
130 using InverseScalar =
typename InverseType::scalar_type;
131 using InverseLocalOrdinal =
typename InverseType::local_ordinal_type;
132 using InverseGlobalOrdinal =
typename InverseType::global_ordinal_type;
133 using InverseNode =
typename InverseType::node_type;
135 using typename ContainerImpl<MatrixType, InverseScalar>::block_crs_matrix_type;
137 using inverse_mv_type = Tpetra::MultiVector<InverseScalar, InverseLocalOrdinal, InverseGlobalOrdinal, InverseNode>;
138 using InverseCrs = Tpetra::CrsMatrix<InverseScalar, InverseLocalOrdinal, InverseGlobalOrdinal, InverseNode>;
139 using InverseMap =
typename Tpetra::Map<InverseLocalOrdinal, InverseGlobalOrdinal, InverseNode>;
140 using InverseGraph =
typename InverseCrs::crs_graph_type;
142 using typename Container<MatrixType>::ConstHostView;
143 using HostViewInverse =
typename inverse_mv_type::dual_view_type::t_host;
145 static_assert(std::is_same<MatrixType,
146 Tpetra::RowMatrix<SC, LO, GO, NO>>::value,
147 "Ifpack2::SparseContainer: Please use MatrixType = Tpetra::RowMatrix.");
157 using typename Container<MatrixType>::row_matrix_type;
175 const Teuchos::Array<Teuchos::Array<LO>>& partitions,
176 const Teuchos::RCP<const import_type>& importer,
187 virtual void setParameters(
const Teuchos::ParameterList& List);
206 apply(ConstHostView X,
209 Teuchos::ETransp mode = Teuchos::NO_TRANS,
210 SC alpha = Teuchos::ScalarTraits<SC>::one(),
211 SC beta = Teuchos::ScalarTraits<SC>::zero())
const;
219 Teuchos::ETransp mode = Teuchos::NO_TRANS,
220 SC alpha = Teuchos::ScalarTraits<SC>::one(),
221 SC beta = Teuchos::ScalarTraits<SC>::zero())
const;
230 virtual std::ostream&
print(std::ostream& os)
const;
241 describe(Teuchos::FancyOStream& out,
242 const Teuchos::EVerbosityLevel verbLevel =
243 Teuchos::Describable::verbLevel_default)
const;
256 void extractValues();
270 solveBlockMV(
const inverse_mv_type& X,
273 Teuchos::ETransp mode,
275 InverseScalar beta)
const;
278 std::vector<Teuchos::RCP<InverseCrs>> diagBlocks_;
281 mutable std::vector<inverse_mv_type> invX;
283 mutable std::vector<inverse_mv_type> invY;
292 mutable Teuchos::Array<Teuchos::RCP<InverseType>> Inverses_;
294 Teuchos::RCP<Teuchos::Comm<int>> localComm_;
297 Teuchos::ParameterList List_;
virtual void apply(ConstHostView X, HostView Y, int blockIndex, Teuchos::ETransp mode=Teuchos::NO_TRANS, SC alpha=Teuchos::ScalarTraits< SC >::one(), SC beta=Teuchos::ScalarTraits< SC >::zero()) const
Compute Y := alpha * M^{-1} X + beta*Y.
Definition Ifpack2_SparseContainer_def.hpp:145
virtual void weightedApply(ConstHostView X, HostView Y, ConstHostView W, int blockIndex, Teuchos::ETransp mode=Teuchos::NO_TRANS, SC alpha=Teuchos::ScalarTraits< SC >::one(), SC beta=Teuchos::ScalarTraits< SC >::zero()) const
Compute Y := alpha * diag(D) * M^{-1} (diag(D) * X) + beta*Y.
Definition Ifpack2_SparseContainer_def.hpp:271