19 enum State {INIT_PHASE, CONFIGURED_PHASE, SOLVED_PHASE};
20 enum SolverType {BLOCK_KRYLOV_SCHUR, BLOCK_DAVIDSON, LOBPCG, RTR};
22 typedef Anasazi::MultiVec<ScalarT> MV;
23 typedef Anasazi::Operator<ScalarT> OP;
26 typedef Anasazi::MultiVecTraits<ScalarT, MV> MVT;
37 assert(phase_ == INIT_PHASE);
38 myProblem_->setM(Teuchos::rcp(
new OP_C(Teuchos::rcp(&M,
false) ) ));
42 assert(phase_ == INIT_PHASE);
49 int dim = A_->getOp().dimX();
53 myProblem_->setInitVec(
ivec);
56 void setNEV(
int nev=3) {
57 assert(phase_ == INIT_PHASE);
58 myProblem_->setNEV(
nev);
87 void setVerbosity(
int verbosity = Anasazi::Errors) {
88 assert(phase_ == INIT_PHASE);
94 assert(phase_ == INIT_PHASE);
95 myPL_.set(
"Orthogonalization", mode );
108 void setMode(std::string mode =
"LM") {
109 assert(phase_ == INIT_PHASE);
110 myPL_.set(
"Which", mode );
117 assert(phase_ == INIT_PHASE);
122 assert(phase_ == INIT_PHASE);
130 assert(phase_ == INIT_PHASE);
131 myPL_.set(
"Convergence Tolerance",
tolerance);
139 assert(phase_ == INIT_PHASE);
140 myPL_.set(
"Relative Convergence Tolerance",
rct);
146 assert(phase_ == INIT_PHASE);
147 myPL_.set(
"Convergence Norm", norm );
154 assert(phase_ == INIT_PHASE);
155 myPL_.set(
"Max Locked", val);
160 if(phase_ != SOLVED_PHASE) {
171 if(phase_ != SOLVED_PHASE) {
182 if(phase_ != SOLVED_PHASE)
185 const Anasazi::Eigensolution<ScalarT, MV>& sol = myProblem_->getSolution();
191 if(phase_ != SOLVED_PHASE)
194 return solver_->getNumIters();
197 Teuchos::RCP< Anasazi::BasicEigenproblem<ScalarT, MV, OP> > getProblem()
203 virtual std::ostream& (std::ostream&
os)
const {
208 Teuchos::RCP<OP_C> A_;
209 Teuchos::RCP< Anasazi::BasicEigenproblem<ScalarT, MV, OP> > myProblem_;
211 Teuchos::ParameterList myPL_;
213 Teuchos::RCP< Anasazi::SolverManager<ScalarT, MV, OP> > solver_;
219 SolverType solverType_;