10#ifndef IFPACK2_DATABASESCHWARZ_DEF_HPP
11#define IFPACK2_DATABASESCHWARZ_DEF_HPP
13#include "Ifpack2_Parameters.hpp"
14#include "Teuchos_TimeMonitor.hpp"
15#include "Tpetra_CrsMatrix.hpp"
16#include "Teuchos_FancyOStream.hpp"
17#include "Teuchos_oblackholestream.hpp"
18#include "Teuchos_TypeNameTraits.hpp"
19#include "Teuchos_LAPACK.hpp"
26template<
class MatrixType>
30 IsInitialized_(false),
41 PatchTolerance_(1e-3),
45 this->setObjectLabel(
"Ifpack2::DatabaseSchwarz");
49template<
class MatrixType>
52 Teuchos::ParameterList& params)
54 IsInitialized_(false),
65 PatchTolerance_(1e-3),
69 this->setObjectLabel(
"Ifpack2::DatabaseSchwarz");
74template<
class MatrixType>
79template<
class MatrixType>
83 if (A.getRawPtr() !=
A_.getRawPtr()) {
84 IsInitialized_ =
false;
91template<
class MatrixType>
96 this->setParametersImpl(
const_cast<Teuchos::ParameterList&
>(params));
100template<
class MatrixType>
102DatabaseSchwarz<MatrixType>::setParametersImpl(Teuchos::ParameterList& params)
106 const int defaultPatchSize = 9;
107 const double defaultPatchTolerance = 1e-3;
108 const bool defaultSkipDatabase =
false;
109 const bool defaultVerbose =
false;
112 PatchSize_ = params.get<
int>(
"database schwarz: patch size",defaultPatchSize);
114 TEUCHOS_TEST_FOR_EXCEPTION(
115 PatchSize_ < 0, std::invalid_argument,
116 "Ifpack2::DatabaseSchwarz::setParameters: \"database schwarz: patch size\" parameter "
117 "must be a nonnegative integer. You gave a value of " << PatchSize_ <<
".");
120 PatchTolerance_ = params.get(
"database schwarz: patch tolerance", defaultPatchTolerance);
122 TEUCHOS_TEST_FOR_EXCEPTION(
123 PatchTolerance_ <= 0, std::invalid_argument,
124 "Ifpack2::DatabaseSchwarz::setParameters: \"database schwarz: patch tolerance\" parameter "
125 "must be a positive double. You gave a value of " << PatchTolerance_ <<
".");
128 SkipDatabase_ = params.get<
bool>(
"database schwarz: skip database",defaultSkipDatabase);
131 Verbose_ = params.get<
bool>(
"database schwarz: print database summary",defaultVerbose);
135template<
class MatrixType>
139 (void) zeroStartingSolution;
142template<
class MatrixType>
143Teuchos::RCP<const Teuchos::Comm<int> >
146 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
147 TEUCHOS_TEST_FOR_EXCEPTION(
148 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getComm: The input "
149 "matrix A is null. Please call setMatrix() with a nonnull input matrix "
150 "before calling this method.");
151 return A->getRowMap()->getComm();
155template<
class MatrixType>
156Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::row_matrix_type>
163template<
class MatrixType>
164Teuchos::RCP<
const Tpetra::CrsMatrix<
typename MatrixType::scalar_type,
165 typename MatrixType::local_ordinal_type,
166 typename MatrixType::global_ordinal_type,
167 typename MatrixType::node_type> >
172 return Teuchos::rcp_dynamic_cast<const crs_matrix_type> (
getMatrix());
176template<
class MatrixType>
177Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::map_type>
181 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
182 TEUCHOS_TEST_FOR_EXCEPTION(
183 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getDomainMap: The "
184 "input matrix A is null. Please call setMatrix() with a nonnull input "
185 "matrix before calling this method.");
186 return A->getDomainMap();
190template<
class MatrixType>
191Teuchos::RCP<const typename DatabaseSchwarz<MatrixType>::map_type>
195 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
196 TEUCHOS_TEST_FOR_EXCEPTION(
197 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getRangeMap: The "
198 "input matrix A is null. Please call setMatrix() with a nonnull input "
199 "matrix before calling this method.");
200 return A->getRangeMap();
204template<
class MatrixType>
210template<
class MatrixType>
212 return NumInitialize_;
216template<
class MatrixType>
222template<
class MatrixType>
228template<
class MatrixType>
230 return InitializeTime_;
234template<
class MatrixType>
240template<
class MatrixType>
246template<
class MatrixType>
248 return ComputeFlops_;
252template<
class MatrixType>
257template<
class MatrixType>
259 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
260 TEUCHOS_TEST_FOR_EXCEPTION(
261 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::getNodeSmootherComplexity: "
262 "The input matrix A is null. Please call setMatrix() with a nonnull "
263 "input matrix, then call compute(), before calling this method.");
265 return A->getLocalNumRows() + A->getLocalNumEntries();
270template<
class MatrixType>
273apply(
const Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& X,
274 Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& Y,
275 Teuchos::ETransp mode,
279 const std::string timerName (
"Ifpack2::DatabaseSchwarz::apply");
280 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
281 if (timer.is_null()) {
282 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
285 double startTime = timer->wallTime();
289 Teuchos::TimeMonitor timeMon (*timer);
293 TEUCHOS_TEST_FOR_EXCEPTION(
295 "Ifpack2::DatabaseSchwarz::apply(): You must call the compute() method before "
296 "you may call apply().");
297 TEUCHOS_TEST_FOR_EXCEPTION(
298 X.getNumVectors() != Y.getNumVectors(), std::runtime_error,
299 "Ifpack2::DatabaseSchwarz::apply(): X and Y must have the same number of "
300 "columns. X.getNumVectors() = " << X.getNumVectors() <<
" != "
301 <<
"Y.getNumVectors() = " << Y.getNumVectors() <<
".");
307 auto X_view = X.getLocalViewHost(Tpetra::Access::ReadOnly);
308 auto Y_view = Y.getLocalViewHost(Tpetra::Access::ReadWrite);
310 Teuchos::LAPACK<int, typename row_matrix_type::scalar_type> lapack;
312 for(
unsigned int ipatch=0; ipatch<NumPatches_; ipatch++) {
313 int idatabase = DatabaseIndices_[ipatch];
316 Teuchos::Array<typename row_matrix_type::scalar_type> x_patch(PatchSize_);
317 for(
unsigned int c=0; c<X_view.extent(1); ++c) {
318 for(
unsigned int i=0; i<x_patch.size(); ++i) {
319 x_patch[i] = X_view(PatchIndices_[ipatch][i],c);
328 int* ipiv = &ipiv_[idatabase*PatchSize_];
330 lapack.GETRS(
'N', DatabaseMatrices_[idatabase]->numRows(), numRhs,
331 DatabaseMatrices_[idatabase]->values(), DatabaseMatrices_[idatabase]->numRows(),
332 ipiv, x_patch.getRawPtr(),
333 DatabaseMatrices_[idatabase]->numRows(), &INFO);
336 TEUCHOS_TEST_FOR_EXCEPTION(
337 INFO < 0, std::logic_error,
"Ifpack2::DatabaseSchwarz::compute: "
338 "LAPACK's _GETRF (LU factorization with partial pivoting) was called "
339 "incorrectly. INFO = " << INFO <<
" < 0. "
340 "Please report this bug to the Ifpack2 developers.");
344 TEUCHOS_TEST_FOR_EXCEPTION(
345 INFO > 0, std::runtime_error,
"Ifpack2::DatabaseSchwarz::compute: "
346 "LAPACK's _GETRF (LU factorization with partial pivoting) reports that the "
347 "computed U factor is exactly singular. U(" << INFO <<
"," << INFO <<
") "
348 "(one-based index i) is exactly zero. This probably means that the input "
349 "patch is singular.");
352 for(
unsigned int c=0; c<Y_view.extent(1); ++c) {
353 for(
unsigned int i=0; i<x_patch.size(); ++i) {
354 Y_view(PatchIndices_[ipatch][i],c) += alpha*Weights_[PatchIndices_[ipatch][i]]*x_patch[i];
360 ApplyTime_ += (timer->wallTime() - startTime);
364template<
class MatrixType>
367applyMat (
const Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& X,
368 Tpetra::MultiVector<scalar_type, local_ordinal_type, global_ordinal_type, node_type>& Y,
369 Teuchos::ETransp mode)
const
371 TEUCHOS_TEST_FOR_EXCEPTION(
372 X.getNumVectors() != Y.getNumVectors(), std::invalid_argument,
373 "Ifpack2::DatabaseSchwarz::applyMat: X.getNumVectors() != Y.getNumVectors().");
375 Teuchos::RCP<const row_matrix_type> A =
getMatrix();
376 TEUCHOS_TEST_FOR_EXCEPTION(
377 A.is_null(), std::runtime_error,
"Ifpack2::DatabaseSchwarz::applyMat: The input "
378 "matrix A is null. Please call setMatrix() with a nonnull input matrix "
379 "before calling this method.");
381 A->apply (X, Y, mode);
385template<
class MatrixType>
390 const std::string timerName (
"Ifpack2::DatabaseSchwarz::initialize");
391 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
392 if (timer.is_null()) {
393 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
395 IsInitialized_ =
true;
400template<
class MatrixType>
403 const std::string timerName (
"Ifpack2::DatabaseSchwarz::compute");
404 Teuchos::RCP<Teuchos::Time> timer = Teuchos::TimeMonitor::lookupCounter (timerName);
405 if (timer.is_null()) {
406 timer = Teuchos::TimeMonitor::getNewCounter (timerName);
409 double startTime = timer->wallTime();
413 Teuchos::TimeMonitor timeMon(*timer);
418 const int maxNnzPerRow =
A_->getGlobalMaxNumRowEntries();
421 PatchIndices_.resize(0);
425 size_t num_entries =
A_->getNumEntriesInLocalRow(irow);
430 typename row_matrix_type::nonconst_local_inds_host_view_type row_inds(
"row indices", maxNnzPerRow);
431 typename row_matrix_type::nonconst_values_host_view_type row_vals(
"row values", maxNnzPerRow);
432 A_->getLocalRowCopy(irow, row_inds, row_vals, num_entries);
435 bool is_new_patch =
true;
436 for(
size_t ipatch=0; ipatch<PatchIndices_.size(); ++ipatch) {
437 for(
size_t i=0; i<PatchIndices_[ipatch].size(); ++i) {
438 if(PatchIndices_[ipatch][i] == irow) {
439 is_new_patch =
false;
440 ipatch=PatchIndices_.size();
448 Teuchos::ArrayView<typename row_matrix_type::local_ordinal_type> indices_array_view(row_inds.data(),num_entries);
449 std::vector<typename row_matrix_type::local_ordinal_type> indices_vector = Teuchos::createVector(indices_array_view);
450 PatchIndices_.push_back(indices_vector);
457 typedef typename Teuchos::SerialDenseMatrix<typename row_matrix_type::local_ordinal_type,typename row_matrix_type::scalar_type> DenseMatType;
458 typedef Teuchos::RCP<DenseMatType> DenseMatRCP;
459 DatabaseIndices_.resize(NumPatches_,-1);
460 Weights_.resize(
A_->getLocalNumRows(),0);
461 std::vector<double> index_count(
A_->getLocalNumRows(),0);
463 for(
unsigned int ipatch=0; ipatch< NumPatches_; ++ipatch) {
465 DenseMatRCP patch_matrix = Teuchos::rcp(
new DenseMatType(PatchSize_, PatchSize_));
466 auto indices_vector = PatchIndices_[ipatch];
469 index_count[indices_vector[i]]++;
471 typename row_matrix_type::nonconst_local_inds_host_view_type row_inds(
"row indices", maxNnzPerRow);
472 typename row_matrix_type::nonconst_values_host_view_type row_vals(
"row values", maxNnzPerRow);
474 A_->getLocalRowCopy(indices_vector[i], row_inds, row_vals, num_entries);
476 for(
size_t k=0; k<num_entries; ++k) {
477 if(row_inds(k) == indices_vector[j]) {
478 (*patch_matrix)(i,j) = row_vals(k);
486 bool found_match =
false;
488 for(
size_t idatabase=0; idatabase<DatabaseMatrices_.size(); ++idatabase) {
491 typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType abserror = 0.0;
494 DenseMatRCP database_candidate = DatabaseMatrices_[idatabase];
495 abserror += Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitude((*patch_matrix)(irow,icol)-(*database_candidate)(irow,icol));
498 if(abserror > Teuchos::as<
typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType>(PatchTolerance_))
503 if(abserror < Teuchos::as<
typename Teuchos::ScalarTraits<typename row_matrix_type::scalar_type>::magnitudeType>(PatchTolerance_)) {
504 DatabaseIndices_[ipatch] = idatabase;
513 DatabaseMatrices_.push_back(patch_matrix);
514 DatabaseIndices_[ipatch] = DatabaseMatrices_.size()-1;
515 TEUCHOS_TEST_FOR_EXCEPTION(DatabaseMatrices_[DatabaseMatrices_.size()-1].is_null(), std::logic_error,
516 "Ifpack2::DatabaseSchwarz::compute: A matrix was added to the database, but appears to be null!"
517 "Please report this bug to the Ifpack2 developers.");
522 for(
unsigned int i=0; i<index_count.size(); ++i) {
523 TEUCHOS_TEST_FOR_EXCEPTION(index_count[i] == 0.0, std::logic_error,
524 "Ifpack2::DatabaseSchwarz::compute: DOF " << i <<
" has no corresponding patch! "
525 "All DOFs must be able to locate in a patch to use this method! "
526 "Have you considered adjusting the patch size? Currently it is " << PatchSize_ <<
".");
527 Weights_[i] = 1./index_count[i];
529 DatabaseSize_ = DatabaseMatrices_.size();
532 std::vector<int> database_counts(DatabaseSize_,0);
533 for(
unsigned int ipatch=0; ipatch<NumPatches_; ++ipatch) {
534 database_counts[DatabaseIndices_[ipatch]]++;
538 Teuchos::LAPACK<int, typename row_matrix_type::scalar_type> lapack;
540 ipiv_.resize(DatabaseSize_*PatchSize_);
541 std::fill(ipiv_.begin (), ipiv_.end (), 0);
542 for(
unsigned int idatabase=0; idatabase<DatabaseSize_; idatabase++) {
543 int* ipiv = &ipiv_[idatabase*PatchSize_];
545 lapack.GETRF(DatabaseMatrices_[idatabase]->numRows(),
546 DatabaseMatrices_[idatabase]->numCols(),
547 DatabaseMatrices_[idatabase]->values(),
548 DatabaseMatrices_[idatabase]->stride(),
552 TEUCHOS_TEST_FOR_EXCEPTION(
553 INFO < 0, std::logic_error,
"Ifpack2::DatabaseSchwarz::compute: "
554 "LAPACK's _GETRF (LU factorization with partial pivoting) was called "
555 "incorrectly. INFO = " << INFO <<
" < 0. "
556 "Please report this bug to the Ifpack2 developers.");
561 std::cout <<
"SINGULAR LOCAL MATRIX, COUNT=" << database_counts[idatabase] << std::endl;
563 TEUCHOS_TEST_FOR_EXCEPTION(
564 INFO > 0, std::runtime_error,
"Ifpack2::DatabaseSchwarz::compute: "
565 "LAPACK's _GETRF (LU factorization with partial pivoting) reports that the "
566 "computed U factor is exactly singular. U(" << INFO <<
"," << INFO <<
") "
567 "(one-based index i) is exactly zero. This probably means that the input "
568 "patch is singular.");
574 ComputeTime_ += (timer->wallTime() - startTime);
578 std::cout <<
"Ifpack2::DatabaseSchwarz()::Compute() summary\n";
579 std::cout <<
"Found " << NumPatches_ <<
" patches of size " << PatchSize_ <<
" in matrix A\n";
580 std::cout <<
"Database tol = " << PatchTolerance_ <<
"\n";
581 std::cout <<
"Database size = " << DatabaseSize_ <<
" patches\n";
586template <
class MatrixType>
588 std::ostringstream out;
593 out <<
"\"Ifpack2::DatabaseSchwarz\": {";
594 out <<
"Initialized: " << (
isInitialized() ?
"true" :
"false")
595 <<
", Computed: " << (
isComputed() ?
"true" :
"false")
596 <<
", patch size: " << PatchSize_
597 <<
", patch tolerance: " << PatchTolerance_
598 <<
", skip database: " << (SkipDatabase_ ?
"true" :
"false")
599 <<
", print database summary: " << (Verbose_ ?
"true" :
"false");
602 out <<
"Matrix: null";
605 out <<
"Global matrix dimensions: ["
606 <<
getMatrix()->getGlobalNumRows() <<
", "
607 <<
getMatrix()->getGlobalNumCols() <<
"]"
608 <<
", Global nnz: " <<
getMatrix()->getGlobalNumEntries();
616template <
class MatrixType>
618describe (Teuchos::FancyOStream& out,
619 const Teuchos::EVerbosityLevel verbLevel)
const
621 using Teuchos::TypeNameTraits;
625 const Teuchos::EVerbosityLevel vl =
626 (verbLevel == Teuchos::VERB_DEFAULT) ? Teuchos::VERB_LOW : verbLevel;
628 if (vl == Teuchos::VERB_NONE) {
638 Teuchos::OSTab tab0 (out);
639 const int myRank = this->
getComm()->getRank();
643 out <<
"\"Ifpack2::DatabaseSchwarz\":" << endl;
646 Teuchos::OSTab tab1 (out);
647 if (vl >= Teuchos::VERB_LOW && myRank == 0) {
648 out <<
"Template parameters:" << endl;
650 Teuchos::OSTab tab2 (out);
651 out <<
"Scalar: " << TypeNameTraits<scalar_type>::name() << endl
652 <<
"LocalOrdinal: " << TypeNameTraits<local_ordinal_type>::name() << endl
653 <<
"GlobalOrdinal: " << TypeNameTraits<global_ordinal_type>::name() << endl
654 <<
"Device: " << TypeNameTraits<device_type>::name() << endl;
656 out <<
"Initialized: " << (
isInitialized() ?
"true" :
"false") << endl
657 <<
"Computed: " << (
isComputed() ?
"true" :
"false") << endl;
660 out <<
"Matrix: null" << endl;
663 out <<
"Global matrix dimensions: ["
664 <<
getMatrix()->getGlobalNumRows() <<
", "
665 <<
getMatrix()->getGlobalNumCols() <<
"]" << endl
666 <<
"Global nnz: " <<
getMatrix()->getGlobalNumEntries() << endl;
675#define IFPACK2_DATABASESCHWARZ_INSTANT(S,LO,GO,N) \
676 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:273
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:169
MatrixType::node_type node_type
The Node type used by the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:93
void setParameters(const Teuchos::ParameterList ¶ms)
Set (or reset) parameters.
Definition Ifpack2_DatabaseSchwarz_def.hpp:93
bool isInitialized() const
Definition Ifpack2_DatabaseSchwarz_decl.hpp:171
bool hasTransposeApply() const
Whether it's possible to apply the transpose of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:205
double getComputeFlops() const
The total number of floating-point operations taken by all calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:247
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:618
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:367
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Definition Ifpack2_DatabaseSchwarz_def.hpp:258
int getNumApply() const
The total number of successful calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:223
MatrixType::global_ordinal_type global_ordinal_type
The type of global indices in the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:87
DatabaseSchwarz(const Teuchos::RCP< const row_matrix_type > &A)
Constructor.
Definition Ifpack2_DatabaseSchwarz_def.hpp:28
bool isComputed() const
Whether compute() has been called at least once.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:180
Teuchos::RCP< const map_type > getDomainMap() const
The Tpetra::Map representing the domain of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:179
virtual ~DatabaseSchwarz()
Destructor.
Definition Ifpack2_DatabaseSchwarz_def.hpp:75
void setZeroStartingSolution(bool zeroStartingSolution)
Set this preconditioner's parameters.
Definition Ifpack2_DatabaseSchwarz_def.hpp:137
MatrixType::local_ordinal_type local_ordinal_type
The type of local indices in the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:84
int getNumCompute() const
The total number of successful calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:217
double getComputeTime() const
The total time spent in all calls to compute().
Definition Ifpack2_DatabaseSchwarz_def.hpp:235
double getApplyTime() const
The total time spent in all calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:241
virtual void setMatrix(const Teuchos::RCP< const row_matrix_type > &A)
Change the matrix to be preconditioned.
Definition Ifpack2_DatabaseSchwarz_def.hpp:80
MatrixType::scalar_type scalar_type
The type of the entries of the input MatrixType.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:81
Teuchos::RCP< const row_matrix_type > A_
The matrix for which this is a preconditioner.
Definition Ifpack2_DatabaseSchwarz_decl.hpp:231
double getInitializeTime() const
The total time spent in all calls to initialize().
Definition Ifpack2_DatabaseSchwarz_def.hpp:229
Teuchos::RCP< const map_type > getRangeMap() const
The Tpetra::Map representing the range of this operator.
Definition Ifpack2_DatabaseSchwarz_def.hpp:193
void compute()
(Re)compute the left scaling, and (if applicable) estimate max and min eigenvalues of D_inv * A.
Definition Ifpack2_DatabaseSchwarz_def.hpp:401
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
The communicator over which the matrix is distributed.
Definition Ifpack2_DatabaseSchwarz_def.hpp:144
int getNumInitialize() const
The total number of successful calls to initialize().
Definition Ifpack2_DatabaseSchwarz_def.hpp:211
double getApplyFlops() const
The total number of floating-point operations taken by all calls to apply().
Definition Ifpack2_DatabaseSchwarz_def.hpp:253
std::string description() const
A simple one-line description of this object.
Definition Ifpack2_DatabaseSchwarz_def.hpp:587
void initialize()
Initialize the preconditioner.
Definition Ifpack2_DatabaseSchwarz_def.hpp:386
Teuchos::RCP< const row_matrix_type > getMatrix() const
The matrix for which this is a preconditioner.
Definition Ifpack2_DatabaseSchwarz_def.hpp:157
Preconditioners and smoothers for Tpetra sparse matrices.
Definition Ifpack2_AdditiveSchwarz_decl.hpp:41