Belos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosRCGIter.hpp
Go to the documentation of this file.
1 //@HEADER
2 // ************************************************************************
3 //
4 // Belos: Block Linear Solvers Package
5 // Copyright 2004 Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ************************************************************************
40 //@HEADER
41 
42 #ifndef BELOS_RCG_ITER_HPP
43 #define BELOS_RCG_ITER_HPP
44 
49 #include "BelosConfigDefs.hpp"
50 #include "BelosTypes.hpp"
51 
52 #include "BelosLinearProblem.hpp"
53 #include "BelosMatOrthoManager.hpp"
54 #include "BelosOutputManager.hpp"
55 #include "BelosStatusTest.hpp"
56 #include "BelosOperatorTraits.hpp"
57 #include "BelosMultiVecTraits.hpp"
58 #include "BelosCGIteration.hpp"
59 
60 #include "Teuchos_LAPACK.hpp"
63 #include "Teuchos_ScalarTraits.hpp"
65 #include "Teuchos_TimeMonitor.hpp"
66 
67 // MLP Remove after debugging
68 #include <fstream>
69 #include <iomanip>
70 
82 namespace Belos {
83 
85 
86 
91  template <class ScalarType, class MV>
92  struct RCGIterState {
97  int curDim;
98 
101 
104 
107 
110 
112  bool existU;
113 
116 
123 
126 
131 
132 
133  RCGIterState() : curDim(0), P(Teuchos::null), Ap(Teuchos::null), r(Teuchos::null),
134  z(Teuchos::null),
135  existU(false),
136  U(Teuchos::null), AU(Teuchos::null),
137  Alpha(Teuchos::null), Beta(Teuchos::null), D(Teuchos::null), rTz_old(Teuchos::null),
138  Delta(Teuchos::null), LUUTAU(Teuchos::null), ipiv(Teuchos::null)
139  {}
140  };
141 
143 
144  template<class ScalarType, class MV, class OP>
145  class RCGIter : virtual public Iteration<ScalarType,MV,OP> {
146 
147  public:
148 
149  //
150  // Convenience typedefs
151  //
156 
158 
159 
168  const Teuchos::RCP<OutputManager<ScalarType> > &printer,
170  Teuchos::ParameterList &params );
171 
173  virtual ~RCGIter() {};
175 
176 
178 
179 
192  void iterate();
193 
208  void initialize(RCGIterState<ScalarType,MV> &newstate);
209 
213  void initialize()
214  {
216  initialize(empty);
217  }
218 
220 
222 
223 
225  int getNumIters() const { return iter_; }
226 
228  void resetNumIters( int iter = 0 ) { iter_ = iter; }
229 
232  Teuchos::RCP<const MV> getNativeResiduals( std::vector<MagnitudeType> * /* norms */ ) const { return r_; }
233 
235 
241 
243  int getCurSubspaceDim() const {
244  if (!initialized_) return 0;
245  return curDim_;
246  };
247 
249  int getMaxSubspaceDim() const { return numBlocks_+1; }
250 
252 
253 
255 
256 
258  const LinearProblem<ScalarType,MV,OP>& getProblem() const { return *lp_; }
259 
261  int getNumBlocks() const { return numBlocks_; }
262 
264  void setNumBlocks(int numBlocks) { setSize( recycleBlocks_, numBlocks ); };
265 
267  int getRecycledBlocks() const { return recycleBlocks_; }
268 
270  void setRecycledBlocks(int recycleBlocks) { setSize( recycleBlocks, numBlocks_ ); };
271 
273  int getBlockSize() const { return 1; }
274 
276  void setBlockSize(int blockSize) {
277  TEUCHOS_TEST_FOR_EXCEPTION(blockSize!=1,std::invalid_argument,
278  "Belos::RCGIter::setBlockSize(): Cannot use a block size that is not one.");
279  }
280 
282  void setSize( int recycleBlocks, int numBlocks );
283 
285  bool isInitialized() { return initialized_; }
286 
288 
289  private:
290 
291  //
292  // Internal methods
293  //
294 
295  //
296  // Classes input through constructor that define the linear problem to be solved.
297  //
301 
302  //
303  // Algorithmic parameters
304  //
305  // numBlocks_ is the size of the allocated space for the Krylov basis, in blocks.
307 
308  // recycleBlocks_ is the size of the allocated space for the recycled subspace, in blocks.
310 
311  //
312  // Current solver state
313  //
314  // initialized_ specifies that the basis vectors have been initialized and the iterate() routine
315  // is capable of running; _initialize is controlled by the initialize() member method
316  // For the implications of the state of initialized_, please see documentation for initialize()
318 
319  // Current subspace dimension, and number of iterations performed.
321 
322  //
323  // State Storage
324  //
325  // Search vectors
327  //
328  // A times current search vector
330  //
331  // Residual vector
333  //
334  // Preconditioned residual
336  //
337  // Flag to indicate that the recycle space should be used
338  bool existU_;
339  // Recycled subspace and its image
341  //
342  // Coefficients arising in RCG iteration
344  //
345  // Solutions to local least-squares problems
347  //
348  // The LU factorization of the matrix U^T A U
350  //
351  // Data from LU factorization of UTAU
353  //
354  // The scalar r'*z
356  };
357 
359  // Constructor.
360  template<class ScalarType, class MV, class OP>
362  const Teuchos::RCP<OutputManager<ScalarType> > &printer,
364  Teuchos::ParameterList &params ):
365  lp_(problem),
366  om_(printer),
367  stest_(tester),
368  numBlocks_(0),
369  recycleBlocks_(0),
370  initialized_(false),
371  curDim_(0),
372  iter_(0),
373  existU_(false)
374  {
375  // Get the maximum number of blocks allowed for this Krylov subspace
376  TEUCHOS_TEST_FOR_EXCEPTION(!params.isParameter("Num Blocks"), std::invalid_argument,
377  "Belos::RCGIter::constructor: mandatory parameter \"Num Blocks\" is not specified.");
378  int nb = Teuchos::getParameter<int>(params, "Num Blocks");
379 
380  TEUCHOS_TEST_FOR_EXCEPTION(!params.isParameter("Recycled Blocks"), std::invalid_argument,
381  "Belos::RCGIter::constructor: mandatory parameter \"Recycled Blocks\" is not specified.");
382  int rb = Teuchos::getParameter<int>(params, "Recycled Blocks");
383 
384  // Set the number of blocks and allocate data
385  setSize( rb, nb );
386  }
387 
389  // Set the block size and make necessary adjustments.
390  template <class ScalarType, class MV, class OP>
391  void RCGIter<ScalarType,MV,OP>::setSize( int recycleBlocks, int numBlocks )
392  {
393 
394  TEUCHOS_TEST_FOR_EXCEPTION(numBlocks <= 0, std::invalid_argument, "Belos::RCGIter::setSize() was passed a non-positive argument for \"Num Blocks\".");
395  TEUCHOS_TEST_FOR_EXCEPTION(recycleBlocks <= 0, std::invalid_argument, "Belos::RCGIter::setSize() was passed a non-positive argument for \"Recycled Blocks\".");
396  TEUCHOS_TEST_FOR_EXCEPTION(recycleBlocks >= numBlocks, std::invalid_argument, "Belos::RCGIter::setSize() the number of recycled blocks is larger than the allowable subspace.");
397 
398  numBlocks_ = numBlocks;
399  recycleBlocks_ = recycleBlocks;
400 
401  }
402 
404  // Initialize this iteration object
405  template <class ScalarType, class MV, class OP>
407  {
408 
409  if (newstate.P != Teuchos::null &&
410  newstate.Ap != Teuchos::null &&
411  newstate.r != Teuchos::null &&
412  newstate.z != Teuchos::null &&
413  newstate.U != Teuchos::null &&
414  newstate.AU != Teuchos::null &&
415  newstate.Alpha != Teuchos::null &&
416  newstate.Beta != Teuchos::null &&
417  newstate.D != Teuchos::null &&
418  newstate.Delta != Teuchos::null &&
419  newstate.LUUTAU != Teuchos::null &&
420  newstate.ipiv != Teuchos::null &&
421  newstate.rTz_old != Teuchos::null) {
422 
423  curDim_ = newstate.curDim;
424  P_ = newstate.P;
425  Ap_ = newstate.Ap;
426  r_ = newstate.r;
427  z_ = newstate.z;
428  existU_ = newstate.existU;
429  U_ = newstate.U;
430  AU_ = newstate.AU;
431  Alpha_ = newstate.Alpha;
432  Beta_ = newstate.Beta;
433  D_ = newstate.D;
434  Delta_ = newstate.Delta;
435  LUUTAU_ = newstate.LUUTAU;
436  ipiv_ = newstate.ipiv;
437  rTz_old_ = newstate.rTz_old;
438  }
439  else {
440 
441  TEUCHOS_TEST_FOR_EXCEPTION(newstate.P == Teuchos::null,std::invalid_argument,
442  "Belos::RCGIter::initialize(): RCGIterState does not have P initialized.");
443 
444  TEUCHOS_TEST_FOR_EXCEPTION(newstate.Ap == Teuchos::null,std::invalid_argument,
445  "Belos::RCGIter::initialize(): RCGIterState does not have Ap initialized.");
446 
447  TEUCHOS_TEST_FOR_EXCEPTION(newstate.r == Teuchos::null,std::invalid_argument,
448  "Belos::RCGIter::initialize(): RCGIterState does not have r initialized.");
449 
450  TEUCHOS_TEST_FOR_EXCEPTION(newstate.z == Teuchos::null,std::invalid_argument,
451  "Belos::RCGIter::initialize(): RCGIterState does not have z initialized.");
452 
453  TEUCHOS_TEST_FOR_EXCEPTION(newstate.U == Teuchos::null,std::invalid_argument,
454  "Belos::RCGIter::initialize(): RCGIterState does not have U initialized.");
455 
456  TEUCHOS_TEST_FOR_EXCEPTION(newstate.AU == Teuchos::null,std::invalid_argument,
457  "Belos::RCGIter::initialize(): RCGIterState does not have AU initialized.");
458 
459  TEUCHOS_TEST_FOR_EXCEPTION(newstate.Alpha == Teuchos::null,std::invalid_argument,
460  "Belos::RCGIter::initialize(): RCGIterState does not have Alpha initialized.");
461 
462  TEUCHOS_TEST_FOR_EXCEPTION(newstate.Beta == Teuchos::null,std::invalid_argument,
463  "Belos::RCGIter::initialize(): RCGIterState does not have Beta initialized.");
464 
465  TEUCHOS_TEST_FOR_EXCEPTION(newstate.D == Teuchos::null,std::invalid_argument,
466  "Belos::RCGIter::initialize(): RCGIterState does not have D initialized.");
467 
468  TEUCHOS_TEST_FOR_EXCEPTION(newstate.Delta == Teuchos::null,std::invalid_argument,
469  "Belos::RCGIter::initialize(): RCGIterState does not have Delta initialized.");
470 
471  TEUCHOS_TEST_FOR_EXCEPTION(newstate.LUUTAU == Teuchos::null,std::invalid_argument,
472  "Belos::RCGIter::initialize(): RCGIterState does not have LUUTAU initialized.");
473 
474  TEUCHOS_TEST_FOR_EXCEPTION(newstate.ipiv == Teuchos::null,std::invalid_argument,
475  "Belos::RCGIter::initialize(): RCGIterState does not have ipiv initialized.");
476 
477  TEUCHOS_TEST_FOR_EXCEPTION(newstate.rTz_old == Teuchos::null,std::invalid_argument,
478  "Belos::RCGIter::initialize(): RCGIterState does not have rTz_old initialized.");
479 
480  }
481 
482  // the solver is initialized
483  initialized_ = true;
484 
485  }
486 
488  // Iterate until the status test informs us we should stop.
489  template <class ScalarType, class MV, class OP>
491  {
492  TEUCHOS_TEST_FOR_EXCEPTION( initialized_ == false, CGIterateFailure,
493  "Belos::RCGIter::iterate(): RCGIter class not initialized." );
494 
495  // We'll need LAPACK
497 
498  // Create convenience variables for zero and one.
499  ScalarType one = Teuchos::ScalarTraits<ScalarType>::one();
500  ScalarType zero = Teuchos::ScalarTraits<ScalarType>::zero();
501 
502  // Allocate memory for scalars
503  std::vector<int> index(1);
505 
506  // Get the current solution std::vector.
507  Teuchos::RCP<MV> cur_soln_vec = lp_->getCurrLHSVec();
508 
509  // Check that the current solution std::vector only has one column.
510  TEUCHOS_TEST_FOR_EXCEPTION( MVT::GetNumberVecs(*cur_soln_vec) != 1, CGIterateFailure,
511  "Belos::RCGIter::iterate(): current linear system has more than one std::vector!" );
512 
513  // Compute the current search dimension.
514  int searchDim = numBlocks_+1;
515 
516  // index of iteration within current cycle
517  int i_ = 0;
518 
520  // iterate until the status test tells us to stop.
521  //
522  // also break if our basis is full
523  //
526  while (stest_->checkStatus(this) != Passed && curDim_+1 <= searchDim) {
527 
528  // Ap = A*p;
529  index.resize( 1 );
530  index[0] = i_;
531  p_ = MVT::CloneView( *P_, index );
532  lp_->applyOp( *p_, *Ap_ );
533 
534  // d = p'*Ap;
535  MVT::MvTransMv( one, *p_, *Ap_, pAp );
536  (*D_)(i_,0) = pAp(0,0);
537 
538  // alpha = rTz_old / pAp
539  (*Alpha_)(i_,0) = (*rTz_old_)(0,0) / pAp(0,0);
540 
541  // Check that alpha is a positive number
542  TEUCHOS_TEST_FOR_EXCEPTION( SCT::real(pAp(0,0)) <= zero, CGPositiveDefiniteFailure,
543  "Belos::RCGIter::iterate(): non-positive value for p^H*A*p encountered!" );
544 
545  // x = x + (alpha * p);
546  MVT::MvAddMv( one, *cur_soln_vec, (*Alpha_)(i_,0), *p_, *cur_soln_vec );
547  lp_->updateSolution();
548 
549  // r = r - (alpha * Ap);
550  MVT::MvAddMv( one, *r_, -(*Alpha_)(i_,0), *Ap_, *r_ );
551 
552  std::vector<MagnitudeType> norm(1);
553  MVT::MvNorm( *r_, norm );
554 //printf("i = %i\tnorm(r) = %e\n",i_,norm[0]);
555 
556  // z = M\r
557  if ( lp_->getLeftPrec() != Teuchos::null ) {
558  lp_->applyLeftPrec( *r_, *z_ );
559  }
560  else if ( lp_->getRightPrec() != Teuchos::null ) {
561  lp_->applyRightPrec( *r_, *z_ );
562  }
563  else {
564  z_ = r_;
565  }
566 
567  // rTz_new = r'*z;
568  MVT::MvTransMv( one, *r_, *z_, rTz );
569 
570  // beta = rTz_new/rTz_old;
571  (*Beta_)(i_,0) = rTz(0,0) / (*rTz_old_)(0,0);
572 
573  // rTz_old = rTz_new;
574  (*rTz_old_)(0,0) = rTz(0,0);
575 
576  // get pointer for next p
577  index.resize( 1 );
578  index[0] = i_+1;
579  pnext_ = MVT::CloneViewNonConst( *P_, index );
580 
581  if (existU_) {
582  // mu = UTAU \ (AU'*z);
583  Teuchos::SerialDenseMatrix<int,ScalarType> mu( Teuchos::View, *Delta_, recycleBlocks_, 1, 0, i_ );
584  MVT::MvTransMv( one, *AU_, *z_, mu );
585  char TRANS = 'N';
586  int info;
587  lapack.GETRS( TRANS, recycleBlocks_, 1, LUUTAU_->values(), LUUTAU_->stride(), &(*ipiv_)[0], mu.values(), mu.stride(), &info );
589  "Belos::RCGIter::solve(): LAPACK GETRS failed to compute a solution.");
590  // p = -(U*mu) + (beta*p) + z (in two steps)
591  // p = (beta*p) + z;
592  MVT::MvAddMv( (*Beta_)(i_,0), *p_, one, *z_, *pnext_ );
593  // pnext = -(U*mu) + (one)*pnext;
594  MVT::MvTimesMatAddMv( -one, *U_, mu, one, *pnext_ );
595  }
596  else {
597  // p = (beta*p) + z;
598  MVT::MvAddMv( (*Beta_)(i_,0), *p_, one, *z_, *pnext_ );
599  }
600 
601  // Done with this view; release pointer
602  p_ = Teuchos::null;
603  pnext_ = Teuchos::null;
604 
605  // increment iteration count and dimension index
606  i_++;
607  iter_++;
608  curDim_++;
609 
610  } // end while (statusTest == false)
611 
612  }
613 
614 } // end Belos namespace
615 
616 #endif /* BELOS_RCG_ITER_HPP */
const Teuchos::RCP< OutputManager< ScalarType > > om_
ScalarType * values() const
Teuchos::RCP< MV > r
The current residual.
Collection of types and exceptions used within the Belos solvers.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > rTz_old
Belos&#39;s basic output manager for sending information of select verbosity levels to the appropriate ou...
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Alpha_
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > rTz_old_
Teuchos::RCP< MV > P
The current Krylov basis.
Teuchos::RCP< std::vector< int > > ipiv
Data from LU factorization of U^T A U.
Class which manages the output and verbosity of the Belos solvers.
void setNumBlocks(int numBlocks)
Set the maximum number of blocks used by the iterative solver.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Beta_
Teuchos::RCP< MV > AU
int getNumBlocks() const
Get the maximum number of blocks used by the iterative solver in solving this linear problem...
Pure virtual base class which augments the basic interface for a conjugate gradient linear solver ite...
Teuchos::RCP< MV > getCurrentUpdate() const
Get the current update to the linear system.
Pure virtual base class for defining the status testing capabilities of Belos.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > D_
Teuchos::RCP< MV > U
The recycled subspace and its image.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > LUUTAU
The LU factorization of the matrix U^T A U.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Beta
Declaration of basic traits for the multivector type.
This class implements the RCG iteration, where a single-std::vector Krylov subspace is constructed...
int getRecycledBlocks() const
Get the maximum number of recycled blocks used by the iterative solver in solving this linear problem...
const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > lp_
int getMaxSubspaceDim() const
Get the maximum dimension allocated for the search subspace.
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Get a constant reference to the linear problem.
OperatorTraits< ScalarType, MV, OP > OPT
int getNumIters() const
Get the current iteration count.
A pure virtual class for defining the status tests for the Belos iterative solvers.
Class which defines basic traits for the operator type.
CGIterateFailure is thrown when the CGIteration object is unable to compute the next iterate in the C...
MultiVecTraits< ScalarType, MV > MVT
virtual ~RCGIter()
Destructor.
Traits class which defines basic operations on multivectors.
void setSize(int recycleBlocks, int numBlocks)
Set the maximum number of blocks used by the iterative solver and the number of recycled vectors...
CGPositiveDefiniteFailure is thrown when the the CG &#39;alpha = p^H*A*P&#39; value is less than zero...
bool isParameter(const std::string &name) const
const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > stest_
Structure to contain pointers to RCGIter state variables.
CGIterationLAPACKFailure is thrown when a nonzero return value is passed back from an LAPACK routine...
bool existU
Flag to indicate the recycle space should be used.
Teuchos::RCP< MV > z
The current preconditioned residual.
Teuchos::RCP< MV > Ap
A times current search vector.
RCGIter(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< OutputManager< ScalarType > > &printer, const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &tester, Teuchos::ParameterList &params)
RCGIter constructor with linear problem, solver utilities, and parameter list of solver options...
int getBlockSize() const
Get the blocksize to be used by the iterative solver in solving this linear problem.
Teuchos::RCP< MV > U_
A linear system to solve, and its associated information.
Class which describes the linear problem to be solved by the iterative solver.
Teuchos::RCP< MV > P_
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Alpha
Coefficients arising in RCG iteration.
TransListIter iter
Teuchos::RCP< MV > Ap_
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > LUUTAU_
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Delta_
int getCurSubspaceDim() const
Get the dimension of the search subspace used to generate the current solution to the linear problem...
void GETRS(const char &TRANS, const OrdinalType &n, const OrdinalType &nrhs, const ScalarType *A, const OrdinalType &lda, const OrdinalType *IPIV, ScalarType *B, const OrdinalType &ldb, OrdinalType *info) const
int curDim
The current dimension of the reduction.
void setRecycledBlocks(int recycleBlocks)
Set the maximum number of recycled blocks used by the iterative solver.
void initialize()
Initialize the solver with the initial vectors from the linear problem or random data.
Teuchos::RCP< MV > AU_
Class which defines basic traits for the operator type.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > D
void iterate()
This method performs RCG iterations until the status test indicates the need to stop or an error occu...
void resetNumIters(int iter=0)
Reset the iteration count.
Teuchos::RCP< std::vector< int > > ipiv_
void setBlockSize(int blockSize)
Set the blocksize.
Teuchos::RCP< const MV > getNativeResiduals(std::vector< MagnitudeType > *) const
Get the norms of the residuals native to the solver.
Belos header file which uses auto-configuration information to include necessary C++ headers...
Teuchos::ScalarTraits< ScalarType > SCT
Teuchos::RCP< MV > r_
bool isInitialized()
States whether the solver has been initialized or not.
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > Delta
Solutions to local least-squares problems.
OrdinalType stride() const
Teuchos::RCP< MV > z_
Templated virtual class for providing orthogonalization/orthonormalization methods with matrix-based ...
SCT::magnitudeType MagnitudeType