Belos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosBlockCGIter.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_BLOCK_CG_ITER_HPP
43 #define BELOS_BLOCK_CG_ITER_HPP
44 
49 #include "BelosConfigDefs.hpp"
50 #include "BelosTypes.hpp"
51 #include "BelosCGIteration.hpp"
52 
53 #include "BelosLinearProblem.hpp"
54 #include "BelosMatOrthoManager.hpp"
55 #include "BelosOutputManager.hpp"
56 #include "BelosStatusTest.hpp"
57 #include "BelosOperatorTraits.hpp"
58 #include "BelosMultiVecTraits.hpp"
59 
60 #include "Teuchos_LAPACK.hpp"
65 #include "Teuchos_ScalarTraits.hpp"
67 #include "Teuchos_TimeMonitor.hpp"
68 
69 namespace Belos {
70 
76 
79 template<class ScalarType, class MV, class OP,
80  const bool lapackSupportsScalarType =
82 class BlockCGIter : virtual public CGIteration<ScalarType, MV, OP> {
83 public:
88 
90  const Teuchos::RCP<OutputManager<ScalarType> > & /* printer */,
91  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > & /* tester */,
92  const Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> > & /* ortho */,
93  Teuchos::ParameterList & /* params */ )
94  {
95  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
96  }
97 
98  virtual ~BlockCGIter() {}
99 
100  void iterate () {
101  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
102  }
103 
105  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
106  }
107 
108  void initialize () {
109  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
110  }
111 
113  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
114  }
115 
116  int getNumIters() const {
117  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
118  }
119 
120  void resetNumIters( int iter=0 ) {
121  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
122  }
123 
125  getNativeResiduals (std::vector<MagnitudeType>* /* norms */) const {
126  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
127  }
128 
130  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
131  }
132 
134  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
135  }
136 
137  int getBlockSize() const {
138  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
139  }
140 
141  void setBlockSize(int blockSize) {
142  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
143  }
144 
145  bool isInitialized() {
146  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
147  }
148 
149  void setDoCondEst(bool val){
150  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
151  }
152 
153 
154 private:
155  void setStateSize() {
156  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "Stub");
157  }
158 };
159 
164 template<class ScalarType, class MV, class OP>
165 class BlockCGIter<ScalarType, MV, OP, true> :
166  virtual public CGIteration<ScalarType,MV,OP>
167 {
168 public:
169  //
170  // Convenience typedefs
171  //
176 
178 
179 
186  const Teuchos::RCP<OutputManager<ScalarType> > &printer,
189  Teuchos::ParameterList &params );
190 
192  virtual ~BlockCGIter() {};
194 
195 
197 
198 
211  void iterate();
212 
228 
232  void initialize()
233  {
235  initializeCG(empty);
236  }
237 
246  state.R = R_;
247  state.P = P_;
248  state.AP = AP_;
249  state.Z = Z_;
250  return state;
251  }
252 
254 
255 
257 
258 
260  int getNumIters() const { return iter_; }
261 
263  void resetNumIters( int iter=0 ) { iter_ = iter; }
264 
267  Teuchos::RCP<const MV> getNativeResiduals( std::vector<MagnitudeType> * /* norms */ ) const { return R_; }
268 
270 
273 
275 
277 
278 
280  const LinearProblem<ScalarType,MV,OP>& getProblem() const { return *lp_; }
281 
283  int getBlockSize() const { return blockSize_; }
284 
286  void setBlockSize(int blockSize);
287 
289  bool isInitialized() { return initialized_; }
290 
292  void setDoCondEst(bool /* val */){/*ignored*/}
293 
297  return temp;
298  }
299 
303  return temp;
304  }
306 
307  private:
308 
309  //
310  // Internal methods
311  //
313  void setStateSize();
314 
315  //
316  // Classes inputed through constructor that define the linear problem to be solved.
317  //
322 
323  //
324  // Algorithmic parameters
325  //
326  // blockSize_ is the solver block size.
328 
329  //
330  // Current solver state
331  //
332  // initialized_ specifies that the basis vectors have been initialized and the iterate() routine
333  // is capable of running; _initialize is controlled by the initialize() member method
334  // For the implications of the state of initialized_, please see documentation for initialize()
336 
337  // stateStorageInitialized_ specified that the state storage has be initialized.
338  // This initialization may be postponed if the linear problem was generated without
339  // the right-hand side or solution vectors.
341 
342  // Current subspace dimension, and number of iterations performed.
343  int iter_;
344 
345  //
346  // State Storage
347  //
348  // Residual
350  //
351  // Preconditioned residual
353  //
354  // Direction std::vector
356  //
357  // Operator applied to direction std::vector
359 
360 };
361 
362  template<class ScalarType, class MV, class OP>
365  const Teuchos::RCP<OutputManager<ScalarType> >& printer,
368  Teuchos::ParameterList& params) :
369  lp_(problem),
370  om_(printer),
371  stest_(tester),
372  ortho_(ortho),
373  blockSize_(0),
374  initialized_(false),
375  stateStorageInitialized_(false),
376  iter_(0)
377  {
378  // Set the block size and allocate data
379  int bs = params.get("Block Size", 1);
380  setBlockSize( bs );
381  }
382 
383  template <class ScalarType, class MV, class OP>
385  {
386  if (! stateStorageInitialized_) {
387  // Check if there is any multivector to clone from.
388  Teuchos::RCP<const MV> lhsMV = lp_->getLHS();
389  Teuchos::RCP<const MV> rhsMV = lp_->getRHS();
390  if (lhsMV == Teuchos::null && rhsMV == Teuchos::null) {
391  stateStorageInitialized_ = false;
392  return;
393  }
394  else {
395  // Initialize the state storage If the subspace has not be
396  // initialized before, generate it using the LHS or RHS from
397  // lp_.
398  if (R_ == Teuchos::null || MVT::GetNumberVecs(*R_)!=blockSize_) {
399  // Get the multivector that is not null.
400  Teuchos::RCP<const MV> tmp = ( (rhsMV!=Teuchos::null)? rhsMV: lhsMV );
402  (tmp == Teuchos::null,std:: invalid_argument,
403  "Belos::BlockCGIter::setStateSize: LinearProblem lacks "
404  "multivectors from which to clone.");
405  R_ = MVT::Clone (*tmp, blockSize_);
406  Z_ = MVT::Clone (*tmp, blockSize_);
407  P_ = MVT::Clone (*tmp, blockSize_);
408  AP_ = MVT::Clone (*tmp, blockSize_);
409  }
410 
411  // State storage has now been initialized.
412  stateStorageInitialized_ = true;
413  }
414  }
415  }
416 
417  template <class ScalarType, class MV, class OP>
419  {
420  // This routine only allocates space; it doesn't not perform any computation
421  // any change in size will invalidate the state of the solver.
423  (blockSize <= 0, std::invalid_argument, "Belos::BlockGmresIter::"
424  "setBlockSize: blockSize = " << blockSize << " <= 0.");
425  if (blockSize == blockSize_) {
426  return; // do nothing
427  }
428  if (blockSize!=blockSize_) {
429  stateStorageInitialized_ = false;
430  }
431  blockSize_ = blockSize;
432  initialized_ = false;
433  // Use the current blockSize_ to initialize the state storage.
434  setStateSize ();
435  }
436 
437  template <class ScalarType, class MV, class OP>
440  {
441  const char prefix[] = "Belos::BlockCGIter::initialize: ";
442 
443  // Initialize the state storage if it isn't already.
444  if (! stateStorageInitialized_) {
445  setStateSize();
446  }
447 
449  (! stateStorageInitialized_, std::invalid_argument,
450  prefix << "Cannot initialize state storage!");
451 
452  // NOTE: In BlockCGIter R_, the initial residual, is required!!!
453  const char errstr[] = "Specified multivectors must have a consistent "
454  "length and width.";
455 
456  // Create convenience variables for zero and one.
457  //const MagnitudeType zero = Teuchos::ScalarTraits<MagnitudeType>::zero(); // unused
458 
459  if (newstate.R != Teuchos::null) {
460 
462  (MVT::GetGlobalLength(*newstate.R) != MVT::GetGlobalLength(*R_),
463  std::invalid_argument, prefix << errstr );
465  (MVT::GetNumberVecs(*newstate.R) != blockSize_,
466  std::invalid_argument, prefix << errstr );
467 
468  // Copy basis vectors from newstate into V
469  if (newstate.R != R_) {
470  // copy over the initial residual (unpreconditioned).
471  MVT::Assign( *newstate.R, *R_ );
472  }
473  // Compute initial direction vectors
474  // Initially, they are set to the preconditioned residuals
475  //
476  if ( lp_->getLeftPrec() != Teuchos::null ) {
477  lp_->applyLeftPrec( *R_, *Z_ );
478  if ( lp_->getRightPrec() != Teuchos::null ) {
479  Teuchos::RCP<MV> tmp = MVT::Clone( *Z_, blockSize_ );
480  lp_->applyRightPrec( *Z_, *tmp );
481  Z_ = tmp;
482  }
483  }
484  else if ( lp_->getRightPrec() != Teuchos::null ) {
485  lp_->applyRightPrec( *R_, *Z_ );
486  }
487  else {
488  Z_ = R_;
489  }
490  MVT::Assign( *Z_, *P_ );
491  }
492  else {
494  (newstate.R == Teuchos::null, std::invalid_argument,
495  prefix << "BlockCGStateIterState does not have initial residual.");
496  }
497 
498  // The solver is initialized
499  initialized_ = true;
500  }
501 
502  template <class ScalarType, class MV, class OP>
504  {
505  const char prefix[] = "Belos::BlockCGIter::iterate: ";
506 
507  //
508  // Allocate/initialize data structures
509  //
510  if (initialized_ == false) {
511  initialize();
512  }
513  // Allocate data needed for LAPACK work.
514  int info = 0;
515  //char UPLO = 'U';
516  //(void) UPLO; // silence "unused variable" compiler warnings
517  bool uplo = true;
519 
520  // Allocate memory for scalars.
521  Teuchos::SerialDenseMatrix<int,ScalarType> alpha( blockSize_, blockSize_ );
522  Teuchos::SerialDenseMatrix<int,ScalarType> beta( blockSize_, blockSize_ );
523  Teuchos::SerialDenseMatrix<int,ScalarType> rHz( blockSize_, blockSize_ ),
524  rHz_old( blockSize_, blockSize_ ), pAp( blockSize_, blockSize_ );
525  Teuchos::SerialSymDenseMatrix<int,ScalarType> pApHerm(Teuchos::View, uplo, pAp.values(), blockSize_, blockSize_);
526 
527  // Create dense spd solver.
529 
530  // Create convenience variable for one.
531  const ScalarType one = Teuchos::ScalarTraits<ScalarType>::one();
532 
533  // Get the current solution std::vector.
534  Teuchos::RCP<MV> cur_soln_vec = lp_->getCurrLHSVec();
535 
536  // Check that the current solution std::vector has blockSize_ columns.
538  (MVT::GetNumberVecs(*cur_soln_vec) != blockSize_, CGIterateFailure,
539  prefix << "Current linear system does not have the right number of vectors!" );
540  int rank = ortho_->normalize( *P_, Teuchos::null );
542  (rank != blockSize_, CGIterationOrthoFailure,
543  prefix << "Failed to compute initial block of orthonormal direction vectors.");
544 
545  //
546  // Iterate until the status test tells us to stop.
547  //
548  while (stest_->checkStatus(this) != Passed) {
549  // Increment the iteration
550  iter_++;
551 
552  // Multiply the current direction std::vector by A and store in Ap_
553  lp_->applyOp( *P_, *AP_ );
554 
555  // Compute alpha := <P_,R_> / <P_,AP_>
556  // 1) Compute P^T * A * P = pAp and P^T * R
557  // 2) Compute the Cholesky Factorization of pAp
558  // 3) Back and forward solves to compute alpha
559  //
560  MVT::MvTransMv( one, *P_, *R_, alpha );
561  MVT::MvTransMv( one, *P_, *AP_, pAp );
562 
563  // Compute Cholesky factorization of pAp
564  lltSolver.setMatrix( Teuchos::rcp(&pApHerm, false) );
565  lltSolver.factorWithEquilibration( true );
566  info = lltSolver.factor();
568  (info != 0, CGIterationLAPACKFailure,
569  prefix << "Failed to compute Cholesky factorization using LAPACK routine POTRF.");
570 
571  // Compute alpha by performing a back and forward solve with the
572  // Cholesky factorization in pAp.
573  lltSolver.setVectors (Teuchos::rcpFromRef (alpha), Teuchos::rcpFromRef (alpha));
574  info = lltSolver.solve();
576  (info != 0, CGIterationLAPACKFailure,
577  prefix << "Failed to compute alpha using Cholesky factorization (POTRS).");
578 
579  // Update the solution std::vector X := X + alpha * P_
580  MVT::MvTimesMatAddMv( one, *P_, alpha, one, *cur_soln_vec );
581  lp_->updateSolution();
582 
583  // Compute the new residual R_ := R_ - alpha * AP_
584  MVT::MvTimesMatAddMv( -one, *AP_, alpha, one, *R_ );
585 
586  // Compute the new preconditioned residual, Z_.
587  if ( lp_->getLeftPrec() != Teuchos::null ) {
588  lp_->applyLeftPrec( *R_, *Z_ );
589  if ( lp_->getRightPrec() != Teuchos::null ) {
590  Teuchos::RCP<MV> tmp = MVT::Clone( *Z_, blockSize_ );
591  lp_->applyRightPrec( *Z_, *tmp );
592  Z_ = tmp;
593  }
594  }
595  else if ( lp_->getRightPrec() != Teuchos::null ) {
596  lp_->applyRightPrec( *R_, *Z_ );
597  }
598  else {
599  Z_ = R_;
600  }
601 
602  // Compute beta := <AP_,Z_> / <P_,AP_>
603  // 1) Compute AP_^T * Z_
604  // 2) Compute the Cholesky Factorization of pAp (already have)
605  // 3) Back and forward solves to compute beta
606 
607  // Compute <AP_,Z>
608  MVT::MvTransMv( -one, *AP_, *Z_, beta );
609 
610  lltSolver.setVectors( Teuchos::rcp( &beta, false ), Teuchos::rcp( &beta, false ) );
611  info = lltSolver.solve();
613  (info != 0, CGIterationLAPACKFailure,
614  prefix << "Failed to compute beta using Cholesky factorization (POTRS).");
615 
616  // Compute the new direction vectors P_ = Z_ + P_ * beta
617  Teuchos::RCP<MV> Pnew = MVT::CloneCopy( *Z_ );
618  MVT::MvTimesMatAddMv(one, *P_, beta, one, *Pnew);
619  P_ = Pnew;
620 
621  // Compute orthonormal block of new direction vectors.
622  rank = ortho_->normalize( *P_, Teuchos::null );
624  (rank != blockSize_, CGIterationOrthoFailure,
625  prefix << "Failed to compute block of orthonormal direction vectors.");
626 
627  } // end while (sTest_->checkStatus(this) != Passed)
628  }
629 
630 } // namespace Belos
631 
632 #endif /* BELOS_BLOCK_CG_ITER_HPP */
ScalarType * values() const
Teuchos::RCP< const MV > R
The current residual.
Collection of types and exceptions used within the Belos solvers.
Belos&#39;s basic output manager for sending information of select verbosity levels to the appropriate ou...
CGIterationState< ScalarType, MV > getState() const
Get the current state of the linear solver.
void setDoCondEst(bool val)
Sets whether or not to store the diagonal for condition estimation.
Teuchos::ArrayView< MagnitudeType > getOffDiag()
Gets the off-diagonal for condition estimation (NOT_IMPLEMENTED)
int getBlockSize() const
Get the blocksize to be used by the iterative solver in solving this linear problem.
Class which manages the output and verbosity of the Belos solvers.
Teuchos::ScalarTraits< ScalarType > SCT
void initialize()
Initialize the solver with the initial vectors from the linear problem or random data.
int getNumIters() const
Get the current iteration count.
const Teuchos::RCP< OutputManager< ScalarType > > om_
BlockCGIter(const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > &, const Teuchos::RCP< OutputManager< ScalarType > > &, const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &, const Teuchos::RCP< MatOrthoManager< ScalarType, MV, OP > > &, Teuchos::ParameterList &)
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Get a constant reference to the linear problem.
T & get(ParameterList &l, const std::string &name)
Structure to contain pointers to CGIteration state variables.
Pure virtual base class which augments the basic interface for a conjugate gradient linear solver ite...
void resetNumIters(int iter=0)
Reset the iteration count.
Pure virtual base class for defining the status testing capabilities of Belos.
void setDoCondEst(bool)
Sets whether or not to store the diagonal for condition estimation.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
MultiVecTraits< ScalarType, MV > MVT
Declaration of basic traits for the multivector type.
Teuchos::ScalarTraits< ScalarType > SCT
static void MvTransMv(const ScalarType alpha, const MV &A, const MV &mv, Teuchos::SerialDenseMatrix< int, ScalarType > &B)
Compute a dense matrix B through the matrix-matrix multiply .
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...
Teuchos::RCP< const MV > AP
The matrix A applied to current decent direction vector.
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Get a constant reference to the linear problem.
static int GetNumberVecs(const MV &mv)
Obtain the number of vectors in mv.
static void Assign(const MV &A, MV &mv)
mv := A
Teuchos::RCP< MV > getCurrentUpdate() const
Get the current update to the linear system.
Traits class which defines basic operations on multivectors.
OperatorTraits< ScalarType, MV, OP > OPT
void initializeCG(CGIterationState< ScalarType, MV > &)
Initialize the solver to an iterate, providing a complete state.
CGIterationLAPACKFailure is thrown when a nonzero return value is passed back from an LAPACK routine...
static Teuchos::RCP< MV > Clone(const MV &mv, const int numvecs)
Creates a new empty MV containing numvecs columns.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< const MV > getNativeResiduals(std::vector< MagnitudeType > *) const
Get the norms of the residuals native to the solver.
void iterate()
This method performs linear solver iterations until the status test indicates the need to stop or an ...
A linear system to solve, and its associated information.
int getNumIters() const
Get the current iteration count.
Class which describes the linear problem to be solved by the iterative solver.
SCT::magnitudeType MagnitudeType
Type traits class that says whether Teuchos::LAPACK has a valid implementation for the given ScalarTy...
static Teuchos::RCP< MV > CloneCopy(const MV &mv)
Creates a new MV and copies contents of mv into the new vector (deep copy).
static void MvTimesMatAddMv(const ScalarType alpha, const MV &A, const Teuchos::SerialDenseMatrix< int, ScalarType > &B, const ScalarType beta, MV &mv)
Update mv with .
const Teuchos::RCP< LinearProblem< ScalarType, MV, OP > > lp_
Teuchos::RCP< MV > getCurrentUpdate() const
Get the current update to the linear system.
bool isInitialized()
States whether the solver has been initialized or not.
bool isInitialized()
States whether the solver has been initialized or not.
void resetNumIters(int iter=0)
Reset the iteration count to iter.
const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > stest_
const Teuchos::RCP< OrthoManager< ScalarType, MV > > ortho_
Teuchos::RCP< const MV > Z
The current preconditioned residual.
Teuchos::ArrayView< MagnitudeType > getDiag()
Gets the diagonal for condition estimation (NOT_IMPLEMENTED)
TransListIter iter
OperatorTraits< ScalarType, MV, OP > OPT
static ptrdiff_t GetGlobalLength(const MV &mv)
Return the number of rows in the given multivector mv.
CGIterationOrthoFailure is thrown when the CGIteration object is unable to compute independent direct...
void setBlockSize(int blockSize)
Set the blocksize to be used by the iterative solver in solving this linear problem.
Teuchos::RCP< const MV > getNativeResiduals(std::vector< MagnitudeType > *) const
int getBlockSize() const
Get the block size to be used by the iterative solver in solving this linear problem.
void initialize()
Initialize the solver with the initial vectors from the linear problem or random data.
Class which defines basic traits for the operator type.
Belos&#39;s templated virtual class for providing routines for orthogonalization and orthonormzalition of...
Belos header file which uses auto-configuration information to include necessary C++ headers...
CGIterationState< ScalarType, MV > getState() const
Get the current state of the linear solver.
Teuchos::RCP< const MV > P
The current decent direction vector.
Templated virtual class for providing orthogonalization/orthonormalization methods with matrix-based ...
Stub implementation of BlockCGIter, for ScalarType types for which Teuchos::LAPACK does NOT have a va...