43 #ifndef IFPACK2_LOCALSPARSETRIANGULARSOLVER_DEF_HPP
44 #define IFPACK2_LOCALSPARSETRIANGULARSOLVER_DEF_HPP
46 #include "Tpetra_CrsMatrix.hpp"
47 #include "Tpetra_Core.hpp"
48 #include "Teuchos_StandardParameterEntryValidators.hpp"
49 #include "Tpetra_Details_determineLocalTriangularStructure.hpp"
51 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
52 # include "shylu_hts.hpp"
58 struct TrisolverType {
66 type_strs[0] =
"Internal";
69 type_enums[0] = Internal;
75 template<
class MatrixType>
76 class LocalSparseTriangularSolver<MatrixType>::HtsImpl {
78 typedef Tpetra::CrsMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type>
crs_matrix_type;
81 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
82 Timpl_ = Teuchos::null;
83 levelset_block_size_ = 1;
89 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
90 const char* block_size_s =
"trisolver: block size";
93 "The parameter \"" << block_size_s <<
"\" must be of type int.");
94 levelset_block_size_ = pl.
get<
int>(block_size_s);
96 if (levelset_block_size_ < 1)
97 levelset_block_size_ = 1;
106 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
108 transpose_ = conjugate_ =
false;
115 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
121 T_in.getAllValues(rowptr, colidx, val);
124 HTST::make_CrsMatrix(rowptr.
size() - 1,
126 transpose_, conjugate_),
127 HtsCrsMatrixDeleter());
131 HTST::reprocess_numeric(Timpl_.get(), T_hts.
get());
134 if (T_in.getCrsGraph().is_null()) {
136 *out <<
"HTS compute failed because T_in.getCrsGraph().is_null().\n";
139 if ( ! T_in.getCrsGraph()->isSorted()) {
141 *out <<
"HTS compute failed because ! T_in.getCrsGraph().isSorted().\n";
144 if ( ! T_in.isStorageOptimized()) {
146 *out <<
"HTS compute failed because ! T_in.isStorageOptimized().\n";
150 typename HTST::PreprocessArgs args;
151 args.T = T_hts.
get();
154 args.nthreads = omp_get_max_threads();
158 args.save_for_reprocess =
true;
159 typename HTST::Options opts;
160 opts.levelset_block_size = levelset_block_size_;
161 args.options = &opts;
164 Timpl_ = Teuchos::rcpWithDealloc(HTST::preprocess(args), TImplDeleter());
165 }
catch (
const std::exception& e) {
167 *out <<
"HTS preprocess threw: " << e.what() <<
"\n";
176 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
184 void localApply (
const MV& X, MV& Y,
191 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
192 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
193 const auto& X_view = X.template getLocalView<Kokkos::HostSpace> ();
194 const auto& Y_view = Y.template getLocalView<Kokkos::HostSpace> ();
196 const auto& X_view = X.getLocalViewHost ();
197 const auto& Y_view = Y.getLocalViewHost ();
200 HTST::reset_max_nrhs(Timpl_.get(), X_view.extent(1));
202 HTST::solve_omp(Timpl_.get(),
204 reinterpret_cast<const scalar_type*
>(X_view.data()),
213 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
214 typedef ::Experimental::HTS<local_ordinal_type, size_t, scalar_type> HTST;
215 typedef typename HTST::Impl TImpl;
216 typedef typename HTST::CrsMatrix HtsCrsMatrix;
218 struct TImplDeleter {
219 void free (TImpl* impl) {
220 HTST::delete_Impl(impl);
224 struct HtsCrsMatrixDeleter {
225 void free (HtsCrsMatrix* T) {
226 HTST::delete_CrsMatrix(T);
231 bool transpose_, conjugate_;
232 int levelset_block_size_;
236 template<
class MatrixType>
246 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
248 (A_crs.
is_null (), std::invalid_argument,
249 "Ifpack2::LocalSparseTriangularSolver constructor: "
250 "The input matrix A is not a Tpetra::CrsMatrix.");
255 template<
class MatrixType>
264 *out_ <<
">>> DEBUG Ifpack2::LocalSparseTriangularSolver constructor"
271 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
273 (A_crs.
is_null (), std::invalid_argument,
274 "Ifpack2::LocalSparseTriangularSolver constructor: "
275 "The input matrix A is not a Tpetra::CrsMatrix.");
280 template<
class MatrixType>
287 template<
class MatrixType>
294 *out_ <<
">>> DEBUG Ifpack2::LocalSparseTriangularSolver constructor"
299 template<
class MatrixType>
302 isInitialized_ =
false;
304 reverseStorage_ =
false;
305 isInternallyChanged_ =
false;
309 initializeTime_ = 0.0;
316 template<
class MatrixType>
321 template<
class MatrixType>
330 Details::TrisolverType::Enum trisolverType = Details::TrisolverType::Internal;
332 static const char typeName[] =
"trisolver: type";
334 if ( ! pl.
isType<std::string>(typeName))
break;
337 Array<std::string> trisolverTypeStrs;
338 Array<Details::TrisolverType::Enum> trisolverTypeEnums;
339 Details::TrisolverType::loadPLTypeOption (trisolverTypeStrs, trisolverTypeEnums);
341 s2i(trisolverTypeStrs (), trisolverTypeEnums (), typeName,
false);
346 if (trisolverType == Details::TrisolverType::HTS) {
348 htsImpl_->setParameters (pl);
352 reverseStorage_ = pl.
get<
bool>(
"trisolver: reverse U");
355 (reverseStorage_ && trisolverType == Details::TrisolverType::HTS,
356 std::logic_error,
"Ifpack2::LocalSparseTriangularSolver::setParameters: "
357 "You are not allowed to enable both HTS and the \"trisolver: reverse U\" "
358 "options. See GitHub issue #2647.");
361 template<
class MatrixType>
366 using Tpetra::Details::determineLocalTriangularStructure;
369 using local_matrix_type =
typename crs_matrix_type::local_matrix_type;
370 using LO = local_ordinal_type;
372 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::initialize: ";
373 if (! out_.is_null ()) {
374 *out_ <<
">>> DEBUG " << prefix << std::endl;
378 (A_.is_null (), std::runtime_error, prefix <<
"You must call "
379 "setMatrix() with a nonnull input matrix before you may call "
380 "initialize() or compute().");
381 if (A_crs_.is_null ()) {
384 (A_crs.get () ==
nullptr, std::invalid_argument,
385 prefix <<
"The input matrix A is not a Tpetra::CrsMatrix.");
388 auto G = A_crs_->getGraph ();
390 (G.is_null (), std::logic_error, prefix <<
"A_ and A_crs_ are nonnull, "
391 "but A_crs_'s RowGraph G is null. "
392 "Please report this bug to the Ifpack2 developers.");
397 (! G->isFillComplete (), std::runtime_error,
"If you call this method, "
398 "the matrix's graph must be fill complete. It is not.");
401 constexpr
bool ignoreMapsForTriStructure =
true;
402 auto lclTriStructure = [&] {
403 auto lclMatrix = A_crs_->getLocalMatrix ();
404 auto lclRowMap = A_crs_->getRowMap ()->getLocalMap ();
405 auto lclColMap = A_crs_->getColMap ()->getLocalMap ();
407 determineLocalTriangularStructure (lclMatrix.graph,
410 ignoreMapsForTriStructure);
411 const LO lclNumRows = lclRowMap.getNodeNumElements ();
412 this->diag_ = (lclTriStruct.diagCount < lclNumRows) ?
"U" :
"N";
413 this->uplo_ = lclTriStruct.couldBeLowerTriangular ?
"L" :
414 (lclTriStruct.couldBeUpperTriangular ?
"U" :
"N");
418 if (reverseStorage_ && lclTriStructure.couldBeUpperTriangular &&
419 htsImpl_.is_null ()) {
421 auto Alocal = A_crs_->getLocalMatrix();
422 auto ptr = Alocal.graph.row_map;
423 auto ind = Alocal.graph.entries;
424 auto val = Alocal.values;
426 auto numRows = Alocal.numRows();
427 auto numCols = Alocal.numCols();
428 auto numNnz = Alocal.nnz();
430 typename decltype(ptr)::non_const_type newptr (
"ptr", ptr.extent (0));
431 typename decltype(ind)::non_const_type newind (
"ind", ind.extent (0));
432 decltype(val) newval (
"val", val.extent (0));
435 crs_matrix_type::execution_space::fence();
437 for (local_ordinal_type row = 0, rowStart = 0; row < numRows; ++row) {
438 auto A_r = Alocal.row(numRows-1 - row);
440 auto numEnt = A_r.length;
441 for (local_ordinal_type k = 0; k < numEnt; ++k) {
442 newind(rowStart + k) = numCols-1 - A_r.colidx(numEnt-1 - k);
443 newval(rowStart + k) = A_r.value (numEnt-1 - k);
446 newptr(row+1) = rowStart;
448 crs_matrix_type::execution_space::fence();
451 using map_type =
typename crs_matrix_type::map_type;
455 auto rowMap = A_->getRowMap();
456 auto numElems = rowMap->getNodeNumElements();
457 auto rowElems = rowMap->getNodeElementList();
460 for (
size_t i = 0; i < numElems; i++)
461 newRowElems[i] = rowElems[numElems-1 - i];
463 newRowMap =
Teuchos::rcp(
new map_type(rowMap->getGlobalNumElements(), newRowElems, rowMap->getIndexBase(), rowMap->getComm()));
467 auto colMap = A_->getColMap();
468 auto numElems = colMap->getNodeNumElements();
469 auto colElems = colMap->getNodeElementList();
472 for (
size_t i = 0; i < numElems; i++)
473 newColElems[i] = colElems[numElems-1 - i];
475 newColMap =
Teuchos::rcp(
new map_type(colMap->getGlobalNumElements(), newColElems, colMap->getIndexBase(), colMap->getComm()));
479 local_matrix_type newLocalMatrix(
"Upermuted", numRows, numCols, numNnz, newval, newptr, newind);
483 isInternallyChanged_ =
true;
488 auto newLclTriStructure =
489 determineLocalTriangularStructure (newLocalMatrix.graph,
490 newRowMap->getLocalMap (),
491 newColMap->getLocalMap (),
492 ignoreMapsForTriStructure);
493 const LO newLclNumRows = newRowMap->getNodeNumElements ();
494 this->diag_ = (newLclTriStructure.diagCount < newLclNumRows) ?
"U" :
"N";
495 this->uplo_ = newLclTriStructure.couldBeLowerTriangular ?
"L" :
496 (newLclTriStructure.couldBeUpperTriangular ?
"U" :
"N");
501 htsImpl_->initialize (*A_crs_);
502 isInternallyChanged_ =
true;
505 isInitialized_ =
true;
509 template<
class MatrixType>
514 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::compute: ";
515 if (! out_.is_null ()) {
516 *out_ <<
">>> DEBUG " << prefix << std::endl;
520 (A_.is_null (), std::runtime_error, prefix <<
"You must call "
521 "setMatrix() with a nonnull input matrix before you may call "
522 "initialize() or compute().");
524 (A_crs_.is_null (), std::logic_error, prefix <<
"A_ is nonnull, but "
525 "A_crs_ is null. Please report this bug to the Ifpack2 developers.");
528 (! A_crs_->isFillComplete (), std::runtime_error,
"If you call this "
529 "method, the matrix must be fill complete. It is not.");
531 if (! isInitialized_) {
535 (! isInitialized_, std::logic_error, prefix <<
"initialize() should have "
536 "been called by this point, but isInitialized_ is false. "
537 "Please report this bug to the Ifpack2 developers.");
540 htsImpl_->compute (*A_crs_, out_);
546 template<
class MatrixType>
558 using Teuchos::rcpFromRef;
561 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::apply: ";
562 if (! out_.is_null ()) {
563 *out_ <<
">>> DEBUG " << prefix;
564 if (A_crs_.is_null ()) {
565 *out_ <<
"A_crs_ is null!" << std::endl;
570 const std::string uplo = this->uplo_;
573 const std::string diag = this->diag_;
574 *out_ <<
"uplo=\"" << uplo
575 <<
"\", trans=\"" << trans
576 <<
"\", diag=\"" << diag <<
"\"" << std::endl;
581 (! isComputed (), std::runtime_error, prefix <<
"If compute() has not yet "
582 "been called, or if you have changed the matrix via setMatrix(), you must "
583 "call compute() before you may call this method.");
587 (A_.is_null (), std::logic_error, prefix <<
"A_ is null. "
588 "Please report this bug to the Ifpack2 developers.");
590 (A_crs_.is_null (), std::logic_error, prefix <<
"A_crs_ is null. "
591 "Please report this bug to the Ifpack2 developers.");
595 (! A_crs_->isFillComplete (), std::runtime_error,
"If you call this "
596 "method, the matrix must be fill complete. It is not. This means that "
597 " you must have called resumeFill() on the matrix before calling apply(). "
598 "This is NOT allowed. Note that this class may use the matrix's data in "
599 "place without copying it. Thus, you cannot change the matrix and expect "
600 "the solver to stay the same. If you have changed the matrix, first call "
601 "fillComplete() on it, then call compute() on this object, before you call"
602 " apply(). You do NOT need to call setMatrix, as long as the matrix "
603 "itself (that is, its address in memory) is the same.");
605 auto G = A_crs_->getGraph ();
607 (G.is_null (), std::logic_error, prefix <<
"A_ and A_crs_ are nonnull, "
608 "but A_crs_'s RowGraph G is null. "
609 "Please report this bug to the Ifpack2 developers.");
610 auto importer = G->getImporter ();
611 auto exporter = G->getExporter ();
613 if (! importer.is_null ()) {
614 if (X_colMap_.is_null () || X_colMap_->getNumVectors () != X.getNumVectors ()) {
615 X_colMap_ =
rcp (
new MV (importer->getTargetMap (), X.getNumVectors ()));
618 X_colMap_->putScalar (STS::zero ());
623 X_colMap_->doImport (X, *importer, Tpetra::ZERO);
625 RCP<const MV> X_cur = importer.is_null () ? rcpFromRef (X) :
626 Teuchos::rcp_const_cast<
const MV> (X_colMap_);
628 if (! exporter.is_null ()) {
629 if (Y_rowMap_.is_null () || Y_rowMap_->getNumVectors () != Y.getNumVectors ()) {
630 Y_rowMap_ =
rcp (
new MV (exporter->getSourceMap (), Y.getNumVectors ()));
633 Y_rowMap_->putScalar (STS::zero ());
635 Y_rowMap_->doExport (Y, *importer, Tpetra::ADD);
637 RCP<MV> Y_cur = exporter.is_null () ? rcpFromRef (Y) : Y_rowMap_;
639 localApply (*X_cur, *Y_cur, mode, alpha, beta);
641 if (! exporter.is_null ()) {
642 Y.putScalar (STS::zero ());
643 Y.doExport (*Y_cur, *exporter, Tpetra::ADD);
649 template<
class MatrixType>
659 const char tfecfFuncName[] =
"localTriangularSolve: ";
662 (! A_crs_->isFillComplete (), std::runtime_error,
663 "The matrix is not fill complete.");
665 (! X.isConstantStride () || ! Y.isConstantStride (), std::invalid_argument,
666 "X and Y must be constant stride.");
668 ( A_crs_->getNodeNumRows() > 0 && this->uplo_ ==
"N", std::runtime_error,
669 "The matrix is neither upper triangular or lower triangular. "
670 "You may only call this method if the matrix is triangular. "
671 "Remember that this is a local (per MPI process) property, and that "
672 "Tpetra only knows how to do a local (per process) triangular solve.");
675 (STS::isComplex && mode == TRANS, std::logic_error,
"This method does "
676 "not currently support non-conjugated transposed solve (mode == "
677 "Teuchos::TRANS) for complex scalar types.");
686 const std::string uplo = this->uplo_;
689 const std::string diag = this->diag_;
690 auto A_lcl = this->A_crs_->getLocalMatrix ();
698 const_cast<MV&
> (Y).sync_host ();
701 if (X.isConstantStride () && Y.isConstantStride ()) {
702 auto X_lcl = X.getLocalViewHost ();
703 auto Y_lcl = Y.getLocalViewHost ();
704 KokkosSparse::trsv (uplo.c_str (), trans.c_str (), diag.c_str (),
705 A_lcl, Y_lcl, X_lcl);
708 const size_t numVecs =
709 std::min (X.getNumVectors (), Y.getNumVectors ());
710 for (
size_t j = 0; j < numVecs; ++j) {
711 auto X_j = X.getVector (j);
712 auto Y_j = X.getVector (j);
713 auto X_lcl = X_j->getLocalViewHost ();
714 auto Y_lcl = Y_j->getLocalViewHost ();
715 KokkosSparse::trsv (uplo.c_str (), trans.c_str (),
716 diag.c_str (), A_lcl, Y_lcl, X_lcl);
721 const_cast<MV&
> (Y).sync_device ();
724 template<
class MatrixType>
726 LocalSparseTriangularSolver<MatrixType>::
727 localApply (
const MV& X,
730 const scalar_type& alpha,
731 const scalar_type& beta)
const
734 htsImpl_->isComputed ()) {
735 htsImpl_->localApply (X, Y, mode, alpha, beta);
740 typedef scalar_type ST;
743 if (beta == STS::zero ()) {
744 if (alpha == STS::zero ()) {
745 Y.putScalar (STS::zero ());
748 this->localTriangularSolve (X, Y, mode);
749 if (alpha != STS::one ()) {
755 if (alpha == STS::zero ()) {
760 this->localTriangularSolve (X, Y_tmp, mode);
761 Y.update (alpha, Y_tmp, beta);
767 template <
class MatrixType>
771 return numInitialize_;
774 template <
class MatrixType>
781 template <
class MatrixType>
788 template <
class MatrixType>
792 return initializeTime_;
795 template<
class MatrixType>
802 template<
class MatrixType>
809 template <
class MatrixType>
814 std::ostringstream os;
819 os <<
"\"Ifpack2::LocalSparseTriangularSolver\": {";
820 if (this->getObjectLabel () !=
"") {
821 os <<
"Label: \"" << this->getObjectLabel () <<
"\", ";
823 os <<
"Initialized: " << (isInitialized () ?
"true" :
"false") <<
", "
824 <<
"Computed: " << (isComputed () ?
"true" :
"false") <<
", ";
827 os <<
"Matrix: null";
830 os <<
"Matrix: not null"
831 <<
", Global matrix dimensions: ["
832 << A_->getGlobalNumRows () <<
", "
833 << A_->getGlobalNumCols () <<
"]";
837 os <<
", HTS computed: " << (htsImpl_->isComputed () ?
"true" :
"false");
843 template <
class MatrixType>
859 auto comm = A_.is_null () ?
860 Tpetra::getDefaultComm () :
865 if (! comm.is_null () && comm->getRank () == 0) {
870 out <<
"\"Ifpack2::LocalSparseTriangularSolver\":" << endl;
880 template <
class MatrixType>
886 (A_.is_null (), std::runtime_error,
887 "Ifpack2::LocalSparseTriangularSolver::getDomainMap: "
888 "The matrix is null. Please call setMatrix() with a nonnull input "
889 "before calling this method.");
890 return A_->getDomainMap ();
893 template <
class MatrixType>
899 (A_.is_null (), std::runtime_error,
900 "Ifpack2::LocalSparseTriangularSolver::getRangeMap: "
901 "The matrix is null. Please call setMatrix() with a nonnull input "
902 "before calling this method.");
903 return A_->getRangeMap ();
906 template<
class MatrixType>
910 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::setMatrix: ";
916 if (A.
getRawPtr () != A_.getRawPtr () || isInternallyChanged_) {
919 (! A.
is_null () && A->getComm ()->getSize () == 1 &&
920 A->getNodeNumRows () != A->getNodeNumCols (),
921 std::runtime_error, prefix <<
"If A's communicator only contains one "
922 "process, then A must be square. Instead, you provided a matrix A with "
923 << A->getNodeNumRows () <<
" rows and " << A->getNodeNumCols ()
929 isInitialized_ =
false;
935 A_crs_ = Teuchos::null;
940 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
942 (A_crs.
is_null (), std::invalid_argument, prefix <<
943 "The input matrix A is not a Tpetra::CrsMatrix.");
955 #define IFPACK2_LOCALSPARSETRIANGULARSOLVER_INSTANT(S,LO,GO,N) \
956 template class Ifpack2::LocalSparseTriangularSolver< Tpetra::RowMatrix<S, LO, GO, N> >;
958 #endif // IFPACK2_LOCALSPARSETRIANGULARSOLVER_DEF_HPP
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:548
int getNumCompute() const
Return the number of calls to compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:777
std::string description() const
A one-line description of this object.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:812
T & get(const std::string &name, T def_value)
bool nonnull(const std::shared_ptr< T > &p)
#define TEUCHOS_TEST_FOR_EXCEPTION_CLASS_FUNC(throw_exception_test, Exception, msg)
void compute()
"Numeric" phase of setup
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:512
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
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:805
double getComputeTime() const
Return the time spent in compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:798
double getInitializeTime() const
Return the time spent in initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:791
MatrixType::node_type node_type
Node type of the input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:95
bool isParameter(const std::string &name) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)
Teuchos::RCP< const map_type > getDomainMap() const
The domain of this operator.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:883
"Preconditioner" that solves local sparse triangular systems.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:77
void initialize()
"Symbolic" phase of setup
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:364
int getNumInitialize() const
Return the number of calls to initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:770
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:908
void resize(size_type new_size, const value_type &x=value_type())
IntegralType getIntegralValue(const std::string &str, const std::string ¶mName="", const std::string &sublistName="") const
int getNumApply() const
Return the number of calls to apply().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:784
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:896
bool isType(const std::string &name) const
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:324
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:845
virtual ~LocalSparseTriangularSolver()
Destructor (virtual for memory safety).
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:318
LocalSparseTriangularSolver()
Constructor that takes no input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:282
static std::string name()
std::string typeName(const T &t)