171 maxRestarts_ =
pl.get(
"Maximum Restarts", 50);
173 "Anasazi::TraceMinDavidsonSolMgr::constructor(): \"Maximum Restarts\" must be strictly positive.");
175 this->useHarmonic_ =
pl.get(
"Use Harmonic Ritz Values",
false);
177 TEUCHOS_TEST_FOR_EXCEPTION(this->useHarmonic_ &&
problem->getM() != Teuchos::null, std::invalid_argument,
"Anasazi::TraceMinDavidsonSolMgr::constructor(): Harmonic Ritz values do not currently work with generalized eigenvalue problems. Please disable \"Use Harmonic Ritz Values\".");
180 this->blockSize_ =
pl.get(
"Block Size", 1);
182 "Anasazi::TraceMinDavidsonSolMgr::constructor(): \"Block Size\" must be strictly positive.");
184 this->numRestartBlocks_ = (
int)std::ceil(this->problem_->getNEV() / this->blockSize_);
185 this->numRestartBlocks_ =
pl.get(
"Num Restart Blocks", this->numRestartBlocks_);
187 "Anasazi::TraceMinDavidsonSolMgr::constructor(): \"Num Restart Blocks\" must be strictly positive.");
189 this->numBlocks_ =
pl.get(
"Num Blocks", 3*this->numRestartBlocks_);
191 "Anasazi::TraceMinDavidsonSolMgr::constructor(): \"Num Blocks\" must be greater than 1. If you only wish to use one block, please use TraceMinSolMgr instead of TraceMinDavidsonSolMgr.");
194 "Anasazi::TraceMinDavidsonSolMgr::constructor(): \"Num Blocks\" must be strictly greater than \"Num Restart Blocks\".");
196 std::stringstream
ss;
197 ss <<
"Anasazi::TraceMinDavidsonSolMgr::constructor(): Potentially impossible orthogonality requests. Reduce basis size (" <<
static_cast<ptrdiff_t>(this->numBlocks_)*this->blockSize_ <<
") or locking size (" << this->maxLocked_ <<
") because " <<
static_cast<ptrdiff_t>(this->numBlocks_) <<
"*" << this->blockSize_ <<
" + " << this->maxLocked_ <<
" > " << MVT::GetGlobalLength(*this->problem_->getInitVec()) <<
".";
199 std::invalid_argument,
ss.str());
202 "Anasazi::TraceMinDavidsonSolMgr: Not enough storage space for requested number of eigenpairs.");