43#ifndef IFPACK2_DATABASESCHWARZ_DEF_HPP
44#define IFPACK2_DATABASESCHWARZ_DEF_HPP
46#include "Ifpack2_Parameters.hpp"
47#include "Teuchos_TimeMonitor.hpp"
48#include "Tpetra_CrsMatrix.hpp"
49#include "Teuchos_FancyOStream.hpp"
50#include "Teuchos_oblackholestream.hpp"
51#include "Teuchos_TypeNameTraits.hpp"
52#include "Teuchos_LAPACK.hpp"
59template<
class MatrixType>
63 IsInitialized_(false),
74 PatchTolerance_(1e-3),
78 this->setObjectLabel(
"Ifpack2::DatabaseSchwarz");
82template<
class MatrixType>
85 Teuchos::ParameterList& params)
87 IsInitialized_(false),
98 PatchTolerance_(1e-3),
102 this->setObjectLabel(
"Ifpack2::DatabaseSchwarz");
107template<
class MatrixType>
112template<
class MatrixType>
116 if (A.getRawPtr() !=
A_.getRawPtr()) {
117 IsInitialized_ =
false;
124template<
class MatrixType>
129 this->setParametersImpl(
const_cast<Teuchos::ParameterList&
>(params));
133template<
class MatrixType>
135DatabaseSchwarz<MatrixType>::setParametersImpl(Teuchos::ParameterList& params)
139 const int defaultPatchSize = 9;
140 const double defaultPatchTolerance = 1e-3;
141 const bool defaultSkipDatabase =
false;
142 const bool defaultVerbose =
false;
145 PatchSize_ = params.get<
int>(
"database schwarz: patch size",defaultPatchSize);
147 TEUCHOS_TEST_FOR_EXCEPTION(
148 PatchSize_ < 0, std::invalid_argument,
149 "Ifpack2::DatabaseSchwarz::setParameters: \"database schwarz: patch size\" parameter "
150 "must be a nonnegative integer. You gave a value of " << PatchSize_ <<
".");
153 PatchTolerance_ = params.get(
"database schwarz: patch tolerance", defaultPatchTolerance);
155 TEUCHOS_TEST_FOR_EXCEPTION(
156 PatchTolerance_ <= 0, std::invalid_argument,
157 "Ifpack2::DatabaseSchwarz::setParameters: \"database schwarz: patch tolerance\" parameter "
158 "must be a positive double. You gave a value of " << PatchTolerance_ <<
".");
161 SkipDatabase_ = params.get<
bool>(
"database schwarz: skip database",defaultSkipDatabase);
164 Verbose_ = params.get<
bool>(
"database schwarz: print database summary",defaultVerbose);
168template<
class MatrixType>
172 (void) zeroStartingSolution;
175template<
class MatrixType>
176Teuchos::RCP<const Teuchos::Comm<int> >
179 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
180 TEUCHOS_TEST_FOR_EXCEPTION(
181 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getComm: The input "
182 "matrix A is null. Please call setMatrix() with a nonnull input matrix "
183 "before calling this method.");
184 return A->getRowMap()->getComm();
188template<
class MatrixType>
189Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::row_matrix_type>
196template<
class MatrixType>
197Teuchos::RCP<
const Tpetra::CrsMatrix<
typename MatrixType::scalar_type,
198 typename MatrixType::local_ordinal_type,
199 typename MatrixType::global_ordinal_type,
200 typename MatrixType::node_type> >
205 return Teuchos::rcp_dynamic_cast<const crs_matrix_type> (
getMatrix());
209template<
class MatrixType>
210Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::map_type>
214 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
215 TEUCHOS_TEST_FOR_EXCEPTION(
216 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getDomainMap: The "
217 "input matrix A is null. Please call setMatrix() with a nonnull input "
218 "matrix before calling this method.");
219 return A->getDomainMap();
223template<
class MatrixType>
224Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::map_type>
228 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
229 TEUCHOS_TEST_FOR_EXCEPTION(
230 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getRangeMap: The "
231 "input matrix A is null. Please call setMatrix() with a nonnull input "
232 "matrix before calling this method.");
233 return A->getRangeMap();
237template<
class MatrixType>
243template<
class MatrixType>
245 return NumInitialize_;
249template<
class MatrixType>
255template<
class MatrixType>
261template<
class MatrixType>
263 return InitializeTime_;
267template<
class MatrixType>
273template<
class MatrixType>
279template<
class MatrixType>
281 return ComputeFlops_;
285template<
class MatrixType>
290template<
class MatrixType>
292 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
293 TEUCHOS_TEST_FOR_EXCEPTION(
294 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getNodeSmootherComplexity: "
295 "The input matrix A is null. Please call setMatrix() with a nonnull "
296 "input matrix, then call compute(), before calling this method.");
298 return A->getLocalNumRows() + A->getLocalNumEntries();
303template<
class MatrixType>
306apply(
const Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& X,
307 Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& Y,
308 Teuchos::ETransp mode,
312 const std::string timerName (
"Ifpack2::DatabaseSchwarz::apply");
313 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
314 if (timer.is_null()) {
315 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
318 double startTime = timer->wallTime();
322 Teuchos::TimeMonitor timeMon (*timer);
326 TEUCHOS_TEST_FOR_EXCEPTION(
328 "Ifpack2::DatabaseSchwarz::apply(): You must call the compute() method before "
329 "you may call apply().");
330 TEUCHOS_TEST_FOR_EXCEPTION(
331 X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
332 "Ifpack2::DatabaseSchwarz::apply(): X and Y must have the same number of "
333 "columns. X.getNumVectors() = " << X.getNumVectors() <<
" != "
334 <<
"Y.getNumVectors() = " << Y.getNumVectors() <<
".");
340 auto X_view = X.getLocalViewHost(Tpetra::Access::ReadOnly);
341 auto Y_view = Y.getLocalViewHost(Tpetra::Access::ReadWrite);
343 Teuchos::LAPACK<int, typename row_matrix_type::scalar_type> lapack;
345 for(
unsigned int ipatch=0; ipatch<NumPatches_; ipatch++) {
346 int idatabase = DatabaseIndices_[ipatch];
349 Teuchos::Array<typename row_matrix_type::scalar_type> x_patch(PatchSize_);
350 for(
unsigned int c=0; c<X_view.extent(1); ++c) {
351 for(
unsigned int i=0; i<x_patch.size(); ++i) {
352 x_patch[i] = X_view(PatchIndices_[ipatch][i],c);
361 int* ipiv = &ipiv_[idatabase*PatchSize_];
363 lapack.GETRS(
'N', DatabaseMatrices_[idatabase]->numRows(), numRhs,
364 DatabaseMatrices_[idatabase]->values(), DatabaseMatrices_[idatabase]->numRows(),
365 ipiv, x_patch.getRawPtr(),
366 DatabaseMatrices_[idatabase]->numRows(), &INFO);
369 TEUCHOS_TEST_FOR_EXCEPTION(
370 INFO < 0, std::logic_error,
"Ifpack2::DatabaseSchwarz::compute: "
371 "LAPACK's _GETRF (LU factorization with partial pivoting) was called "
372 "incorrectly. INFO = " << INFO <<
" < 0. "
373 "Please report this bug to the Ifpack2 developers.");
377 TEUCHOS_TEST_FOR_EXCEPTION(
378 INFO > 0, std::runtime_error,
"Ifpack2::DatabaseSchwarz::compute: "
379 "LAPACK's _GETRF (LU factorization with partial pivoting) reports that the "
380 "computed U factor is exactly singular. U(" << INFO <<
"," << INFO <<
") "
381 "(one-based index i) is exactly zero. This probably means that the input "
382 "patch is singular.");
385 for(
unsigned int c=0; c<Y_view.extent(1); ++c) {
386 for(
unsigned int i=0; i<x_patch.size(); ++i) {
387 Y_view(PatchIndices_[ipatch][i],c) += alpha*Weights_[PatchIndices_[ipatch][i]]*x_patch[i];
393 ApplyTime_ += (timer->wallTime() - startTime);
397template<
class MatrixType>
400applyMat (
const Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& X,
401 Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& Y,
402 Teuchos::ETransp mode)
const
404 TEUCHOS_TEST_FOR_EXCEPTION(
405 X.getNumVectors() != Y.getNumVectors(), std::invalid_argument,
406 "Ifpack2::DatabaseSchwarz::applyMat: X.getNumVectors() != Y.getNumVectors().");
408 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
409 TEUCHOS_TEST_FOR_EXCEPTION(
410 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::applyMat: The input "
411 "matrix A is null. Please call setMatrix() with a nonnull input matrix "
412 "before calling this method.");
414 A->apply (X, Y, mode);
418template<
class MatrixType>
423 const std::string timerName (
"Ifpack2::DatabaseSchwarz::initialize");
424 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
425 if (timer.is_null()) {
426 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
428 IsInitialized_ =
true;
433template<
class MatrixType>
436 const std::string timerName (
"Ifpack2::DatabaseSchwarz::compute");
437 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
438 if (timer.is_null()) {
439 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
442 double startTime = timer->wallTime();
446 Teuchos::TimeMonitor timeMon(*timer);
451 const int maxNnzPerRow =
A_->getGlobalMaxNumRowEntries();
454 PatchIndices_.resize(0);
458 size_t num_entries =
A_->getNumEntriesInLocalRow(irow);
463 typename row_matrix_type::nonconst_local_inds_host_view_type row_inds(
"row indices", maxNnzPerRow);
464 typename row_matrix_type::nonconst_values_host_view_type row_vals(
"row values", maxNnzPerRow);
465 A_->getLocalRowCopy(irow, row_inds, row_vals, num_entries);
468 bool is_new_patch =
true;
469 for(
size_t ipatch=0; ipatch<PatchIndices_.size(); ++ipatch) {
470 for(
size_t i=0; i<PatchIndices_[ipatch].size(); ++i) {
471 if(PatchIndices_[ipatch][i] == irow) {
472 is_new_patch =
false;
473 ipatch=PatchIndices_.size();
481 Teuchos::ArrayView<typename row_matrix_type::local_ordinal_type> indices_array_view(row_inds.data(),num_entries);
482 std::vector<typename row_matrix_type::local_ordinal_type> indices_vector = Teuchos::createVector(indices_array_view);
483 PatchIndices_.push_back(indices_vector);
490 typedef typename Teuchos::SerialDenseMatrix<typename row_matrix_type::local_ordinal_type,typename row_matrix_type::scalar_type> DenseMatType;
491 typedef Teuchos::RCP<DenseMatType> DenseMatRCP;
492 DatabaseIndices_.resize(NumPatches_,-1);
493 Weights_.resize(
A_->getLocalNumRows(),0);
494 std::vector<double> index_count(
A_->getLocalNumRows(),0);
496 for(
unsigned int ipatch=0; ipatch< NumPatches_; ++ipatch) {
498 DenseMatRCP patch_matrix = Teuchos::rcp(
new DenseMatType(PatchSize_, PatchSize_));
499 auto indices_vector = PatchIndices_[ipatch];
502 index_count[indices_vector[i]]++;
504 typename row_matrix_type::nonconst_local_inds_host_view_type row_inds(
"row indices", maxNnzPerRow);
505 typename row_matrix_type::nonconst_values_host_view_type row_vals(
"row values", maxNnzPerRow);
507 A_->getLocalRowCopy(indices_vector[i], row_inds, row_vals, num_entries);
509 for(
size_t k=0; k<num_entries; ++k) {
510 if(row_inds(k) == indices_vector[j]) {
511 (*patch_matrix)(i,j) = row_vals(k);
519 bool found_match =
false;
521 for(
size_t idatabase=0; idatabase<DatabaseMatrices_.size(); ++idatabase) {
524 typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType abserror = 0.0;
527 DenseMatRCP database_candidate = DatabaseMatrices_[idatabase];
528 abserror += Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitude((*patch_matrix)(irow,icol)-(*database_candidate)(irow,icol));
531 if(abserror > Teuchos::as<
typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType>(PatchTolerance_))
536 if(abserror < Teuchos::as<
typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType>(PatchTolerance_)) {
537 DatabaseIndices_[ipatch] = idatabase;
546 DatabaseMatrices_.push_back(patch_matrix);
547 DatabaseIndices_[ipatch] = DatabaseMatrices_.size()-1;
548 TEUCHOS_TEST_FOR_EXCEPTION(DatabaseMatrices_[DatabaseMatrices_.size()-1].is_null(), std::logic_error,
549 "Ifpack2::DatabaseSchwarz::compute: A matrix was added to the database, but appears to be null!"
550 "Please report this bug to the Ifpack2 developers.");
555 for(
unsigned int i=0; i<index_count.size(); ++i) {
556 TEUCHOS_TEST_FOR_EXCEPTION(index_count[i] == 0.0, std::logic_error,
557 "Ifpack2::DatabaseSchwarz::compute: DOF " << i <<
" has no corresponding patch! "
558 "All DOFs must be able to locate in a patch to use this method! "
559 "Have you considered adjusting the patch size? Currently it is " << PatchSize_ <<
".");
560 Weights_[i] = 1./index_count[i];
562 DatabaseSize_ = DatabaseMatrices_.size();
565 std::vector<int> database_counts(DatabaseSize_,0);
566 for(
unsigned int ipatch=0; ipatch<NumPatches_; ++ipatch) {
567 database_counts[DatabaseIndices_[ipatch]]++;
571 Teuchos::LAPACK<int, typename row_matrix_type::scalar_type> lapack;
573 ipiv_.resize(DatabaseSize_*PatchSize_);
574 std::fill(ipiv_.begin (), ipiv_.end (), 0);
575 for(
unsigned int idatabase=0; idatabase<DatabaseSize_; idatabase++) {
576 int* ipiv = &ipiv_[idatabase*PatchSize_];
578 lapack.GETRF(DatabaseMatrices_[idatabase]->numRows(),
579 DatabaseMatrices_[idatabase]->numCols(),
580 DatabaseMatrices_[idatabase]->values(),
581 DatabaseMatrices_[idatabase]->stride(),
585 TEUCHOS_TEST_FOR_EXCEPTION(
586 INFO < 0, std::logic_error,
"Ifpack2::DatabaseSchwarz::compute: "
587 "LAPACK's _GETRF (LU factorization with partial pivoting) was called "
588 "incorrectly. INFO = " << INFO <<
" < 0. "
589 "Please report this bug to the Ifpack2 developers.");
594 std::cout <<
"SINGULAR LOCAL MATRIX, COUNT=" << database_counts[idatabase] << std::endl;
596 TEUCHOS_TEST_FOR_EXCEPTION(
597 INFO > 0, std::runtime_error,
"Ifpack2::DatabaseSchwarz::compute: "
598 "LAPACK's _GETRF (LU factorization with partial pivoting) reports that the "
599 "computed U factor is exactly singular. U(" << INFO <<
"," << INFO <<
") "
600 "(one-based index i) is exactly zero. This probably means that the input "
601 "patch is singular.");
607 ComputeTime_ += (timer->wallTime() - startTime);
611 std::cout <<
"Ifpack2::DatabaseSchwarz()::Compute() summary\n";
612 std::cout <<
"Found " << NumPatches_ <<
" patches of size " << PatchSize_ <<
" in matrix A\n";
613 std::cout <<
"Database tol = " << PatchTolerance_ <<
"\n";
614 std::cout <<
"Database size = " << DatabaseSize_ <<
" patches\n";
619template <
class MatrixType>
621 std::ostringstream out;
626 out <<
"\"Ifpack2::DatabaseSchwarz\": {";
627 out <<
"Initialized: " << (
isInitialized() ?
"true" :
"false")
628 <<
", Computed: " << (
isComputed() ?
"true" :
"false")
629 <<
", patch size: " << PatchSize_
630 <<
", patch tolerance: " << PatchTolerance_
631 <<
", skip database: " << (SkipDatabase_ ?
"true" :
"false")
632 <<
", print database summary: " << (Verbose_ ?
"true" :
"false");
635 out <<
"Matrix: null";
638 out <<
"Global matrix dimensions: ["
639 <<
getMatrix()->getGlobalNumRows() <<
", "
640 <<
getMatrix()->getGlobalNumCols() <<
"]"
641 <<
", Global nnz: " <<
getMatrix()->getGlobalNumEntries();
649template <
class MatrixType>
651describe (Teuchos::FancyOStream& out,
652 const Teuchos::EVerbosityLevel verbLevel)
const
654 using Teuchos::TypeNameTraits;
658 const Teuchos::EVerbosityLevel vl =
659 (verbLevel == Teuchos::VERB_DEFAULT) ? Teuchos::VERB_LOW : verbLevel;
661 if (vl == Teuchos::VERB_NONE) {
671 Teuchos::OSTab tab0 (out);
672 const int myRank = this->
getComm()->getRank();
676 out <<
"\"Ifpack2::DatabaseSchwarz\":" << endl;
679 Teuchos::OSTab tab1 (out);
680 if (vl >= Teuchos::VERB_LOW && myRank == 0) {
681 out <<
"Template parameters:" << endl;
683 Teuchos::OSTab tab2 (out);
684 out <<
"Scalar: " << TypeNameTraits<scalar_type>::name() << endl
685 <<
"LocalOrdinal: " << TypeNameTraits<local_ordinal_type>::name() << endl
686 <<
"GlobalOrdinal: " << TypeNameTraits<global_ordinal_type>::name() << endl
687 <<
"Device: " << TypeNameTraits<device_type>::name() << endl;
689 out <<
"Initialized: " << (
isInitialized() ?
"true" :
"false") << endl
690 <<
"Computed: " << (
isComputed() ?
"true" :
"false") << endl;
693 out <<
"Matrix: null" << endl;
696 out <<
"Global matrix dimensions: ["
697 <<
getMatrix()->getGlobalNumRows() <<
", "
698 <<
getMatrix()->getGlobalNumCols() <<
"]" << endl
699 <<
"Global nnz: " <<
getMatrix()->getGlobalNumEntries() << endl;
708#define IFPACK2_DATABASESCHWARZ_INSTANT(S,LO,GO,N) \
709 template class Ifpack2::DatabaseSchwarz< Tpetra::RowMatrix<S, LO, GO, N> >;
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, returning the result in Y. Y = alpha*Op(A)*X + beta*Y.
Definition Ifpack2_DatabaseSchwarz_def.hpp:306
Teuchos::RCP< const Tpetra::CrsMatrix< scalar_type, local_ordinal_type, global_ordinal_type, node_type > > getCrsMatrix() const
Attempt to return the matrix A as a Tpetra::CrsMatrix.
Definition Ifpack2_DatabaseSchwarz_def.hpp:202
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:127
void setParameters(const Teuchos::ParameterList ¶ms)
Set (or reset) parameters.
Definition Ifpack2_DatabaseSchwarz_def.hpp:126
bool isInitialized() const
Definition Ifpack2_DatabaseSchwarz_decl.hpp:205
bool hasTransposeApply() const
Whether it's possible to apply the transpose of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:238
double getComputeFlops() const
The total number of floating-point operations taken by all calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:280
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to a Teuchos::FancyOStream.
Definition Ifpack2_DatabaseSchwarz_def.hpp:651
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
Compute Y = Op(A)*X, where Op(A) is either A, , or .
Definition Ifpack2_DatabaseSchwarz_def.hpp:400
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Definition Ifpack2_DatabaseSchwarz_def.hpp:291
int getNumApply() const
The total number of successful calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:256
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:121
DatabaseSchwarz(const Teuchos::RCP< const row_matrix_type > &A)
Constructor.
Definition Ifpack2_DatabaseSchwarz_def.hpp:61
bool isComputed() const
Whether compute() has been called at least once.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:214
Teuchos::RCP< const map_type > getDomainMap() const
The Tpetra::Map representing the domain of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:212
virtual ~DatabaseSchwarz()
Destructor.
Definition Ifpack2_DatabaseSchwarz_def.hpp:108
void setZeroStartingSolution(bool zeroStartingSolution)
Set this preconditioner's parameters.
Definition Ifpack2_DatabaseSchwarz_def.hpp:170
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:118
int getNumCompute() const
The total number of successful calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:250
double getComputeTime() const
The total time spent in all calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:268
double getApplyTime() const
The total time spent in all calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:274
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Change the matrix to be preconditioned.
Definition Ifpack2_DatabaseSchwarz_def.hpp:113
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:115
Teuchos::RCP< const row_matrix_type > A_
The matrix for which this is a preconditioner.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:265
double getInitializeTime() const
The total time spent in all calls to initialize().
Definition Ifpack2_DatabaseSchwarz_def.hpp:262
Teuchos::RCP< const map_type > getRangeMap() const
The Tpetra::Map representing the range of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:226
void compute()
(Re)compute the left scaling, and (if applicable) estimate max and min eigenvalues of D_inv * A.
Definition Ifpack2_DatabaseSchwarz_def.hpp:434
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
The communicator over which the matrix is distributed.
Definition Ifpack2_DatabaseSchwarz_def.hpp:177
int getNumInitialize() const
The total number of successful calls to initialize().
Definition Ifpack2_DatabaseSchwarz_def.hpp:244
double getApplyFlops() const
The total number of floating-point operations taken by all calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:286
std::string description() const
A simple one-line description of this object.
Definition Ifpack2_DatabaseSchwarz_def.hpp:620
void initialize()
Initialize the preconditioner.
Definition Ifpack2_DatabaseSchwarz_def.hpp:419
Teuchos::RCP< const row_matrix_type > getMatrix() const
The matrix for which this is a preconditioner.
Definition Ifpack2_DatabaseSchwarz_def.hpp:190
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:74