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"
50 #include "KokkosSparse_trsv.hpp"
52 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
53 # include "shylu_hts.hpp"
59 struct TrisolverType {
67 type_strs[0] =
"Internal";
70 type_enums[0] = Internal;
76 template<
class MatrixType>
77 class LocalSparseTriangularSolver<MatrixType>::HtsImpl {
79 typedef Tpetra::CrsMatrix<scalar_type, local_ordinal_type, global_ordinal_type, node_type>
crs_matrix_type;
82 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
83 Timpl_ = Teuchos::null;
84 levelset_block_size_ = 1;
90 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
91 const char* block_size_s =
"trisolver: block size";
94 "The parameter \"" << block_size_s <<
"\" must be of type int.");
95 levelset_block_size_ = pl.
get<
int>(block_size_s);
97 if (levelset_block_size_ < 1)
98 levelset_block_size_ = 1;
107 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
109 transpose_ = conjugate_ =
false;
116 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
122 T_in.getAllValues(rowptr, colidx, val);
125 HTST::make_CrsMatrix(rowptr.
size() - 1,
127 transpose_, conjugate_),
128 HtsCrsMatrixDeleter());
132 HTST::reprocess_numeric(Timpl_.get(), T_hts.
get());
135 if (T_in.getCrsGraph().is_null()) {
137 *out <<
"HTS compute failed because T_in.getCrsGraph().is_null().\n";
140 if ( ! T_in.getCrsGraph()->isSorted()) {
142 *out <<
"HTS compute failed because ! T_in.getCrsGraph().isSorted().\n";
145 if ( ! T_in.isStorageOptimized()) {
147 *out <<
"HTS compute failed because ! T_in.isStorageOptimized().\n";
151 typename HTST::PreprocessArgs args;
152 args.T = T_hts.
get();
155 args.nthreads = omp_get_max_threads();
159 args.save_for_reprocess =
true;
160 typename HTST::Options opts;
161 opts.levelset_block_size = levelset_block_size_;
162 args.options = &opts;
165 Timpl_ = Teuchos::rcpWithDealloc(HTST::preprocess(args), TImplDeleter());
166 }
catch (
const std::exception& e) {
168 *out <<
"HTS preprocess threw: " << e.what() <<
"\n";
177 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
185 void localApply (
const MV& X, MV& Y,
192 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
193 const auto& X_view = X.getLocalViewHost ();
194 const auto& Y_view = Y.getLocalViewHost ();
197 HTST::reset_max_nrhs(Timpl_.get(), X_view.extent(1));
199 HTST::solve_omp(Timpl_.get(),
201 reinterpret_cast<const scalar_type*
>(X_view.data()),
210 #ifdef HAVE_IFPACK2_SHYLU_NODEHTS
211 typedef ::Experimental::HTS<local_ordinal_type, size_t, scalar_type> HTST;
212 typedef typename HTST::Impl TImpl;
213 typedef typename HTST::CrsMatrix HtsCrsMatrix;
215 struct TImplDeleter {
216 void free (TImpl* impl) {
217 HTST::delete_Impl(impl);
221 struct HtsCrsMatrixDeleter {
222 void free (HtsCrsMatrix* T) {
223 HTST::delete_CrsMatrix(T);
228 bool transpose_, conjugate_;
229 int levelset_block_size_;
233 template<
class MatrixType>
243 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
245 (A_crs.
is_null (), std::invalid_argument,
246 "Ifpack2::LocalSparseTriangularSolver constructor: "
247 "The input matrix A is not a Tpetra::CrsMatrix.");
252 template<
class MatrixType>
261 *out_ <<
">>> DEBUG Ifpack2::LocalSparseTriangularSolver constructor"
268 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
270 (A_crs.
is_null (), std::invalid_argument,
271 "Ifpack2::LocalSparseTriangularSolver constructor: "
272 "The input matrix A is not a Tpetra::CrsMatrix.");
277 template<
class MatrixType>
284 template<
class MatrixType>
291 *out_ <<
">>> DEBUG Ifpack2::LocalSparseTriangularSolver constructor"
296 template<
class MatrixType>
299 isInitialized_ =
false;
301 reverseStorage_ =
false;
302 isInternallyChanged_ =
false;
306 initializeTime_ = 0.0;
313 template<
class MatrixType>
318 template<
class MatrixType>
327 Details::TrisolverType::Enum trisolverType = Details::TrisolverType::Internal;
329 static const char typeName[] =
"trisolver: type";
331 if ( ! pl.
isType<std::string>(typeName))
break;
334 Array<std::string> trisolverTypeStrs;
335 Array<Details::TrisolverType::Enum> trisolverTypeEnums;
336 Details::TrisolverType::loadPLTypeOption (trisolverTypeStrs, trisolverTypeEnums);
338 s2i(trisolverTypeStrs (), trisolverTypeEnums (), typeName,
false);
343 if (trisolverType == Details::TrisolverType::HTS) {
345 htsImpl_->setParameters (pl);
349 reverseStorage_ = pl.
get<
bool>(
"trisolver: reverse U");
352 (reverseStorage_ && trisolverType == Details::TrisolverType::HTS,
353 std::logic_error,
"Ifpack2::LocalSparseTriangularSolver::setParameters: "
354 "You are not allowed to enable both HTS and the \"trisolver: reverse U\" "
355 "options. See GitHub issue #2647.");
358 template<
class MatrixType>
363 using Tpetra::Details::determineLocalTriangularStructure;
366 using local_matrix_type =
typename crs_matrix_type::local_matrix_type;
367 using LO = local_ordinal_type;
369 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::initialize: ";
370 if (! out_.is_null ()) {
371 *out_ <<
">>> DEBUG " << prefix << std::endl;
375 (A_.is_null (), std::runtime_error, prefix <<
"You must call "
376 "setMatrix() with a nonnull input matrix before you may call "
377 "initialize() or compute().");
378 if (A_crs_.is_null ()) {
381 (A_crs.get () ==
nullptr, std::invalid_argument,
382 prefix <<
"The input matrix A is not a Tpetra::CrsMatrix.");
385 auto G = A_crs_->getGraph ();
387 (G.is_null (), std::logic_error, prefix <<
"A_ and A_crs_ are nonnull, "
388 "but A_crs_'s RowGraph G is null. "
389 "Please report this bug to the Ifpack2 developers.");
394 (! G->isFillComplete (), std::runtime_error,
"If you call this method, "
395 "the matrix's graph must be fill complete. It is not.");
398 constexpr
bool ignoreMapsForTriStructure =
true;
399 auto lclTriStructure = [&] {
400 auto lclMatrix = A_crs_->getLocalMatrix ();
401 auto lclRowMap = A_crs_->getRowMap ()->getLocalMap ();
402 auto lclColMap = A_crs_->getColMap ()->getLocalMap ();
404 determineLocalTriangularStructure (lclMatrix.graph,
407 ignoreMapsForTriStructure);
408 const LO lclNumRows = lclRowMap.getNodeNumElements ();
409 this->diag_ = (lclTriStruct.diagCount < lclNumRows) ?
"U" :
"N";
410 this->uplo_ = lclTriStruct.couldBeLowerTriangular ?
"L" :
411 (lclTriStruct.couldBeUpperTriangular ?
"U" :
"N");
415 if (reverseStorage_ && lclTriStructure.couldBeUpperTriangular &&
416 htsImpl_.is_null ()) {
418 auto Alocal = A_crs_->getLocalMatrix();
419 auto ptr = Alocal.graph.row_map;
420 auto ind = Alocal.graph.entries;
421 auto val = Alocal.values;
423 auto numRows = Alocal.numRows();
424 auto numCols = Alocal.numCols();
425 auto numNnz = Alocal.nnz();
427 typename decltype(ptr)::non_const_type newptr (
"ptr", ptr.extent (0));
428 typename decltype(ind)::non_const_type newind (
"ind", ind.extent (0));
429 decltype(val) newval (
"val", val.extent (0));
432 typename crs_matrix_type::execution_space().fence();
434 for (local_ordinal_type row = 0, rowStart = 0; row < numRows; ++row) {
435 auto A_r = Alocal.row(numRows-1 - row);
437 auto numEnt = A_r.length;
438 for (local_ordinal_type k = 0; k < numEnt; ++k) {
439 newind(rowStart + k) = numCols-1 - A_r.colidx(numEnt-1 - k);
440 newval(rowStart + k) = A_r.value (numEnt-1 - k);
443 newptr(row+1) = rowStart;
445 typename crs_matrix_type::execution_space().fence();
448 using map_type =
typename crs_matrix_type::map_type;
452 auto rowMap = A_->getRowMap();
453 auto numElems = rowMap->getNodeNumElements();
454 auto rowElems = rowMap->getNodeElementList();
457 for (
size_t i = 0; i < numElems; i++)
458 newRowElems[i] = rowElems[numElems-1 - i];
460 newRowMap =
Teuchos::rcp(
new map_type(rowMap->getGlobalNumElements(), newRowElems, rowMap->getIndexBase(), rowMap->getComm()));
464 auto colMap = A_->getColMap();
465 auto numElems = colMap->getNodeNumElements();
466 auto colElems = colMap->getNodeElementList();
469 for (
size_t i = 0; i < numElems; i++)
470 newColElems[i] = colElems[numElems-1 - i];
472 newColMap =
Teuchos::rcp(
new map_type(colMap->getGlobalNumElements(), newColElems, colMap->getIndexBase(), colMap->getComm()));
476 local_matrix_type newLocalMatrix(
"Upermuted", numRows, numCols, numNnz, newval, newptr, newind);
480 isInternallyChanged_ =
true;
485 auto newLclTriStructure =
486 determineLocalTriangularStructure (newLocalMatrix.graph,
487 newRowMap->getLocalMap (),
488 newColMap->getLocalMap (),
489 ignoreMapsForTriStructure);
490 const LO newLclNumRows = newRowMap->getNodeNumElements ();
491 this->diag_ = (newLclTriStructure.diagCount < newLclNumRows) ?
"U" :
"N";
492 this->uplo_ = newLclTriStructure.couldBeLowerTriangular ?
"L" :
493 (newLclTriStructure.couldBeUpperTriangular ?
"U" :
"N");
498 htsImpl_->initialize (*A_crs_);
499 isInternallyChanged_ =
true;
502 isInitialized_ =
true;
506 template<
class MatrixType>
511 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::compute: ";
512 if (! out_.is_null ()) {
513 *out_ <<
">>> DEBUG " << prefix << std::endl;
517 (A_.is_null (), std::runtime_error, prefix <<
"You must call "
518 "setMatrix() with a nonnull input matrix before you may call "
519 "initialize() or compute().");
521 (A_crs_.is_null (), std::logic_error, prefix <<
"A_ is nonnull, but "
522 "A_crs_ is null. Please report this bug to the Ifpack2 developers.");
525 (! A_crs_->isFillComplete (), std::runtime_error,
"If you call this "
526 "method, the matrix must be fill complete. It is not.");
528 if (! isInitialized_) {
532 (! isInitialized_, std::logic_error, prefix <<
"initialize() should have "
533 "been called by this point, but isInitialized_ is false. "
534 "Please report this bug to the Ifpack2 developers.");
537 htsImpl_->compute (*A_crs_, out_);
543 template<
class MatrixType>
555 using Teuchos::rcpFromRef;
558 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::apply: ";
559 if (! out_.is_null ()) {
560 *out_ <<
">>> DEBUG " << prefix;
561 if (A_crs_.is_null ()) {
562 *out_ <<
"A_crs_ is null!" << std::endl;
567 const std::string uplo = this->uplo_;
570 const std::string diag = this->diag_;
571 *out_ <<
"uplo=\"" << uplo
572 <<
"\", trans=\"" << trans
573 <<
"\", diag=\"" << diag <<
"\"" << std::endl;
578 (! isComputed (), std::runtime_error, prefix <<
"If compute() has not yet "
579 "been called, or if you have changed the matrix via setMatrix(), you must "
580 "call compute() before you may call this method.");
584 (A_.is_null (), std::logic_error, prefix <<
"A_ is null. "
585 "Please report this bug to the Ifpack2 developers.");
587 (A_crs_.is_null (), std::logic_error, prefix <<
"A_crs_ is null. "
588 "Please report this bug to the Ifpack2 developers.");
592 (! A_crs_->isFillComplete (), std::runtime_error,
"If you call this "
593 "method, the matrix must be fill complete. It is not. This means that "
594 " you must have called resumeFill() on the matrix before calling apply(). "
595 "This is NOT allowed. Note that this class may use the matrix's data in "
596 "place without copying it. Thus, you cannot change the matrix and expect "
597 "the solver to stay the same. If you have changed the matrix, first call "
598 "fillComplete() on it, then call compute() on this object, before you call"
599 " apply(). You do NOT need to call setMatrix, as long as the matrix "
600 "itself (that is, its address in memory) is the same.");
602 auto G = A_crs_->getGraph ();
604 (G.is_null (), std::logic_error, prefix <<
"A_ and A_crs_ are nonnull, "
605 "but A_crs_'s RowGraph G is null. "
606 "Please report this bug to the Ifpack2 developers.");
607 auto importer = G->getImporter ();
608 auto exporter = G->getExporter ();
610 if (! importer.is_null ()) {
611 if (X_colMap_.is_null () || X_colMap_->getNumVectors () != X.getNumVectors ()) {
612 X_colMap_ =
rcp (
new MV (importer->getTargetMap (), X.getNumVectors ()));
615 X_colMap_->putScalar (STS::zero ());
620 X_colMap_->doImport (X, *importer, Tpetra::ZERO);
622 RCP<const MV> X_cur = importer.is_null () ? rcpFromRef (X) :
623 Teuchos::rcp_const_cast<
const MV> (X_colMap_);
625 if (! exporter.is_null ()) {
626 if (Y_rowMap_.is_null () || Y_rowMap_->getNumVectors () != Y.getNumVectors ()) {
627 Y_rowMap_ =
rcp (
new MV (exporter->getSourceMap (), Y.getNumVectors ()));
630 Y_rowMap_->putScalar (STS::zero ());
632 Y_rowMap_->doExport (Y, *importer, Tpetra::ADD);
634 RCP<MV> Y_cur = exporter.is_null () ? rcpFromRef (Y) : Y_rowMap_;
636 localApply (*X_cur, *Y_cur, mode, alpha, beta);
638 if (! exporter.is_null ()) {
639 Y.putScalar (STS::zero ());
640 Y.doExport (*Y_cur, *exporter, Tpetra::ADD);
646 template<
class MatrixType>
656 const char tfecfFuncName[] =
"localTriangularSolve: ";
659 (! A_crs_->isFillComplete (), std::runtime_error,
660 "The matrix is not fill complete.");
662 (! X.isConstantStride () || ! Y.isConstantStride (), std::invalid_argument,
663 "X and Y must be constant stride.");
665 ( A_crs_->getNodeNumRows() > 0 && this->uplo_ ==
"N", std::runtime_error,
666 "The matrix is neither upper triangular or lower triangular. "
667 "You may only call this method if the matrix is triangular. "
668 "Remember that this is a local (per MPI process) property, and that "
669 "Tpetra only knows how to do a local (per process) triangular solve.");
672 (STS::isComplex && mode == TRANS, std::logic_error,
"This method does "
673 "not currently support non-conjugated transposed solve (mode == "
674 "Teuchos::TRANS) for complex scalar types.");
683 const std::string uplo = this->uplo_;
686 const std::string diag = this->diag_;
687 auto A_lcl = this->A_crs_->getLocalMatrix ();
695 const_cast<MV&
> (Y).sync_host ();
698 if (X.isConstantStride () && Y.isConstantStride ()) {
699 auto X_lcl = X.getLocalViewHost ();
700 auto Y_lcl = Y.getLocalViewHost ();
701 KokkosSparse::trsv (uplo.c_str (), trans.c_str (), diag.c_str (),
702 A_lcl, Y_lcl, X_lcl);
705 const size_t numVecs =
706 std::min (X.getNumVectors (), Y.getNumVectors ());
707 for (
size_t j = 0; j < numVecs; ++j) {
708 auto X_j = X.getVector (j);
709 auto Y_j = X.getVector (j);
710 auto X_lcl = X_j->getLocalViewHost ();
711 auto Y_lcl = Y_j->getLocalViewHost ();
712 KokkosSparse::trsv (uplo.c_str (), trans.c_str (),
713 diag.c_str (), A_lcl, Y_lcl, X_lcl);
718 const_cast<MV&
> (Y).sync_device ();
721 template<
class MatrixType>
723 LocalSparseTriangularSolver<MatrixType>::
724 localApply (
const MV& X,
727 const scalar_type& alpha,
728 const scalar_type& beta)
const
731 htsImpl_->isComputed ()) {
732 htsImpl_->localApply (X, Y, mode, alpha, beta);
737 typedef scalar_type ST;
740 if (beta == STS::zero ()) {
741 if (alpha == STS::zero ()) {
742 Y.putScalar (STS::zero ());
745 this->localTriangularSolve (X, Y, mode);
746 if (alpha != STS::one ()) {
752 if (alpha == STS::zero ()) {
757 this->localTriangularSolve (X, Y_tmp, mode);
758 Y.update (alpha, Y_tmp, beta);
764 template <
class MatrixType>
768 return numInitialize_;
771 template <
class MatrixType>
778 template <
class MatrixType>
785 template <
class MatrixType>
789 return initializeTime_;
792 template<
class MatrixType>
799 template<
class MatrixType>
806 template <
class MatrixType>
811 std::ostringstream os;
816 os <<
"\"Ifpack2::LocalSparseTriangularSolver\": {";
817 if (this->getObjectLabel () !=
"") {
818 os <<
"Label: \"" << this->getObjectLabel () <<
"\", ";
820 os <<
"Initialized: " << (isInitialized () ?
"true" :
"false") <<
", "
821 <<
"Computed: " << (isComputed () ?
"true" :
"false") <<
", ";
824 os <<
"Matrix: null";
827 os <<
"Matrix: not null"
828 <<
", Global matrix dimensions: ["
829 << A_->getGlobalNumRows () <<
", "
830 << A_->getGlobalNumCols () <<
"]";
834 os <<
", HTS computed: " << (htsImpl_->isComputed () ?
"true" :
"false");
840 template <
class MatrixType>
856 auto comm = A_.is_null () ?
857 Tpetra::getDefaultComm () :
862 if (! comm.is_null () && comm->getRank () == 0) {
867 out <<
"\"Ifpack2::LocalSparseTriangularSolver\":" << endl;
877 template <
class MatrixType>
883 (A_.is_null (), std::runtime_error,
884 "Ifpack2::LocalSparseTriangularSolver::getDomainMap: "
885 "The matrix is null. Please call setMatrix() with a nonnull input "
886 "before calling this method.");
887 return A_->getDomainMap ();
890 template <
class MatrixType>
896 (A_.is_null (), std::runtime_error,
897 "Ifpack2::LocalSparseTriangularSolver::getRangeMap: "
898 "The matrix is null. Please call setMatrix() with a nonnull input "
899 "before calling this method.");
900 return A_->getRangeMap ();
903 template<
class MatrixType>
907 const char prefix[] =
"Ifpack2::LocalSparseTriangularSolver::setMatrix: ";
913 if (A.
getRawPtr () != A_.getRawPtr () || isInternallyChanged_) {
916 (! A.
is_null () && A->getComm ()->getSize () == 1 &&
917 A->getNodeNumRows () != A->getNodeNumCols (),
918 std::runtime_error, prefix <<
"If A's communicator only contains one "
919 "process, then A must be square. Instead, you provided a matrix A with "
920 << A->getNodeNumRows () <<
" rows and " << A->getNodeNumCols ()
926 isInitialized_ =
false;
932 A_crs_ = Teuchos::null;
937 Teuchos::rcp_dynamic_cast<
const crs_matrix_type> (A);
939 (A_crs.
is_null (), std::invalid_argument, prefix <<
940 "The input matrix A is not a Tpetra::CrsMatrix.");
952 #define IFPACK2_LOCALSPARSETRIANGULARSOLVER_INSTANT(S,LO,GO,N) \
953 template class Ifpack2::LocalSparseTriangularSolver< Tpetra::RowMatrix<S, LO, GO, N> >;
955 #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:545
int getNumCompute() const
Return the number of calls to compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:774
std::string description() const
A one-line description of this object.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:809
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:509
#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:802
double getComputeTime() const
Return the time spent in compute().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:795
double getInitializeTime() const
Return the time spent in initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:788
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:880
"Preconditioner" that solves local sparse triangular systems.
Definition: Ifpack2_LocalSparseTriangularSolver_decl.hpp:77
void initialize()
"Symbolic" phase of setup
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:361
int getNumInitialize() const
Return the number of calls to initialize().
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:767
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:905
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:781
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:893
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:321
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:842
virtual ~LocalSparseTriangularSolver()
Destructor (virtual for memory safety).
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:315
LocalSparseTriangularSolver()
Constructor that takes no input matrix.
Definition: Ifpack2_LocalSparseTriangularSolver_def.hpp:279
static std::string name()
std::string typeName(const T &t)