Belos  Version of the Day
BelosPseudoBlockTFQMRIter.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 // This file contains an implementation of the TFQMR iteration
43 // for solving non-Hermitian linear systems of equations Ax = b,
44 // where b is a single-vector and x is the corresponding solution.
45 //
46 // The implementation is a slight modification on the TFQMR iteration
47 // found in Saad's "Iterative Methods for Sparse Linear Systems".
48 //
49 
50 #ifndef BELOS_PSEUDO_BLOCK_TFQMR_ITER_HPP
51 #define BELOS_PSEUDO_BLOCK_TFQMR_ITER_HPP
52 
60 #include "BelosConfigDefs.hpp"
61 #include "BelosIteration.hpp"
62 #include "BelosTypes.hpp"
63 
64 #include "BelosLinearProblem.hpp"
65 #include "BelosMatOrthoManager.hpp"
66 #include "BelosOutputManager.hpp"
67 #include "BelosStatusTest.hpp"
68 #include "BelosOperatorTraits.hpp"
69 #include "BelosMultiVecTraits.hpp"
70 
71 #include "Teuchos_BLAS.hpp"
72 #include "Teuchos_ScalarTraits.hpp"
73 #include "Teuchos_ParameterList.hpp"
74 #include "Teuchos_TimeMonitor.hpp"
75 
87 namespace Belos {
88 
93  template <class ScalarType, class MV>
95 
97  Teuchos::RCP<const MV> R;
98  Teuchos::RCP<const MV> W;
99  Teuchos::RCP<const MV> U;
100  Teuchos::RCP<const MV> Rtilde;
101  Teuchos::RCP<const MV> D;
102  Teuchos::RCP<const MV> V;
103 
104  PseudoBlockTFQMRIterState() : R(Teuchos::null), W(Teuchos::null), U(Teuchos::null),
105  Rtilde(Teuchos::null), D(Teuchos::null), V(Teuchos::null)
106  {}
107  };
108 
109 
111 
112 
125  PseudoBlockTFQMRIterInitFailure(const std::string& what_arg) : BelosError(what_arg)
126  {}};
127 
135  PseudoBlockTFQMRIterateFailure(const std::string& what_arg) : BelosError(what_arg)
136  {}};
137 
139 
140 
141  template <class ScalarType, class MV, class OP>
142  class PseudoBlockTFQMRIter : public Iteration<ScalarType,MV,OP> {
143  public:
144  //
145  // Convenience typedefs
146  //
149  typedef Teuchos::ScalarTraits<ScalarType> SCT;
150  typedef typename SCT::magnitudeType MagnitudeType;
151 
153 
154 
156  PseudoBlockTFQMRIter( const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
157  const Teuchos::RCP<OutputManager<ScalarType> > &printer,
158  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > &tester,
159  Teuchos::ParameterList &params );
160 
162  virtual ~PseudoBlockTFQMRIter() {};
164 
165 
167 
168 
190  void iterate();
191 
213  void initializeTFQMR(const PseudoBlockTFQMRIterState<ScalarType,MV> & newstate);
214 
218  void initialize()
219  {
221  initializeTFQMR(empty);
222  }
223 
233  state.R = R_;
234  state.W = W_;
235  state.U = U_;
236  state.Rtilde = Rtilde_;
237  state.D = D_;
238  state.V = V_;
239  state.solnUpdate = solnUpdate_;
240  return state;
241  }
242 
244 
245 
247 
248 
250  int getNumIters() const { return iter_; }
251 
253  void resetNumIters( int iter = 0 ) { iter_ = iter; }
254 
257  Teuchos::RCP<const MV> getNativeResiduals( std::vector<MagnitudeType> *norms ) const;
258 
260 
263  Teuchos::RCP<MV> getCurrentUpdate() const { return solnUpdate_; }
264 
266 
267 
269 
270 
272  const LinearProblem<ScalarType,MV,OP>& getProblem() const { return *lp_; }
273 
275  int getBlockSize() const { return 1; }
276 
278  void setBlockSize(int blockSize) {
279  TEUCHOS_TEST_FOR_EXCEPTION(blockSize!=1,std::invalid_argument,
280  "Belos::PseudoBlockTFQMRIter::setBlockSize(): Cannot use a block size that is not one.");
281  }
282 
284  bool isInitialized() { return initialized_; }
285 
287 
288 
289  private:
290 
291  //
292  // Classes inputed through constructor that define the linear problem to be solved.
293  //
294  const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > lp_;
295  const Teuchos::RCP<OutputManager<ScalarType> > om_;
296  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > stest_;
297 
298  //
299  // Algorithmic parameters
300  //
301 
302  // numRHS_ is the current number of linear systems being solved.
303  int numRHS_;
304 
305  // Storage for QR factorization of the least squares system.
306  std::vector<ScalarType> alpha_, rho_, rho_old_;
307  std::vector<MagnitudeType> tau_, cs_, theta_;
308 
309  //
310  // Current solver state
311  //
312  // initialized_ specifies that the basis vectors have been initialized and the iterate() routine
313  // is capable of running; _initialize is controlled by the initialize() member method
314  // For the implications of the state of initialized_, please see documentation for initialize()
315  bool initialized_;
316 
317  // Current subspace dimension, and number of iterations performed.
318  int iter_;
319 
320  //
321  // State Storage
322  //
323  Teuchos::RCP<MV> R_;
324  Teuchos::RCP<MV> W_;
325  Teuchos::RCP<MV> U_, AU_;
326  Teuchos::RCP<MV> Rtilde_;
327  Teuchos::RCP<MV> D_;
328  Teuchos::RCP<MV> V_;
329  Teuchos::RCP<MV> solnUpdate_;
330 
331  };
332 
333 
334  //
335  // Implementation
336  //
337 
339  // Constructor.
340  template <class ScalarType, class MV, class OP>
342  const Teuchos::RCP<OutputManager<ScalarType> > &printer,
343  const Teuchos::RCP<StatusTest<ScalarType,MV,OP> > &tester,
344  Teuchos::ParameterList &params
345  ) :
346  lp_(problem),
347  om_(printer),
348  stest_(tester),
349  numRHS_(0),
350  initialized_(false),
351  iter_(0)
352  {
353  }
354 
356  // Compute native residual from TFQMR recurrence.
357  template <class ScalarType, class MV, class OP>
358  Teuchos::RCP<const MV>
359  PseudoBlockTFQMRIter<ScalarType,MV,OP>::getNativeResiduals( std::vector<MagnitudeType> *normvec ) const
360  {
361  MagnitudeType one = Teuchos::ScalarTraits<MagnitudeType>::one();
362  if (normvec) {
363  // Resize the vector passed in, if it is too small.
364  if ((int) normvec->size() < numRHS_)
365  normvec->resize( numRHS_ );
366 
367  // Compute the native residuals.
368  for (int i=0; i<numRHS_; i++) {
369  (*normvec)[i] = Teuchos::ScalarTraits<MagnitudeType>::squareroot( iter_ + one )*tau_[i];
370  }
371  }
372 
373  return Teuchos::null;
374  }
375 
377  // Initialize this iteration object
378  template <class ScalarType, class MV, class OP>
380  {
381  // Check if there is a multivector to clone from.
382  Teuchos::RCP<const MV> lhsMV = lp_->getCurrLHSVec();
383  Teuchos::RCP<const MV> rhsMV = lp_->getCurrRHSVec();
384 
385  // Get the multivector that is not null.
386  Teuchos::RCP<const MV> tmp = ( (rhsMV!=Teuchos::null)? rhsMV: lhsMV );
387 
388  TEUCHOS_TEST_FOR_EXCEPTION(tmp == Teuchos::null,std::invalid_argument,
389  "Belos::PseudoBlockTFQMRIter::initialize(): linear problem does not specify multivectors to clone from.");
390 
391  // Get the number of right-hand sides we're solving for now.
392  int numRHS = MVT::GetNumberVecs(*tmp);
393  numRHS_ = numRHS;
394 
395  // Initialize the state storage
396  // If the subspace has not be initialized before or has changed sizes, generate it using the LHS or RHS from lp_.
397  if (Teuchos::is_null(R_) || MVT::GetNumberVecs(*R_)!=numRHS_) {
398  R_ = MVT::Clone( *tmp, numRHS_ );
399  AU_ = MVT::Clone( *tmp, numRHS_ );
400  D_ = MVT::Clone( *tmp, numRHS_ );
401  V_ = MVT::Clone( *tmp, numRHS_ );
402  solnUpdate_ = MVT::Clone( *tmp, numRHS_ );
403 
404  // Resize work vectors.
405  alpha_.resize( numRHS_ );
406  rho_.resize( numRHS_ );
407  rho_old_.resize( numRHS_ );
408  tau_.resize( numRHS_ );
409  cs_.resize( numRHS_ );
410  theta_.resize( numRHS_ );
411  }
412 
413  // NOTE: In PseudoBlockTFQMRIter R_, the initial residual, is required!!!
414  //
415  std::string errstr("Belos::PseudoBlockTFQMRIter::initialize(): Specified multivectors must have a consistent length and width.");
416 
417  // Create convenience variables for zero and one.
418  const ScalarType one = Teuchos::ScalarTraits<ScalarType>::one();
419  const ScalarType STzero = Teuchos::ScalarTraits<ScalarType>::zero();
420  const MagnitudeType MTzero = Teuchos::ScalarTraits<MagnitudeType>::zero();
421 
422  if (newstate.R != Teuchos::null) {
423 
424  TEUCHOS_TEST_FOR_EXCEPTION( MVT::GetGlobalLength(*newstate.R) != MVT::GetGlobalLength(*R_),
425  std::invalid_argument, errstr );
426 
427  // Copy basis vectors from newstate into V
428  if (newstate.R != R_) {
429  // copy over the initial residual (unpreconditioned).
430  MVT::MvAddMv( one, *newstate.R, STzero, *newstate.R, *R_ );
431  }
432 
433  // Compute initial vectors
434  // Initially, they are set to the preconditioned residuals
435  //
436  W_ = MVT::CloneCopy( *R_ );
437  U_ = MVT::CloneCopy( *R_ );
438  Rtilde_ = MVT::CloneCopy( *R_ );
439  MVT::MvInit( *D_ );
440  MVT::MvInit( *solnUpdate_ );
441  // Multiply the current residual by Op and store in V_
442  // V_ = Op * R_
443  //
444  lp_->apply( *U_, *V_ );
445  AU_ = MVT::CloneCopy( *V_ );
446  //
447  // Compute initial scalars: theta, eta, tau, rho_old
448  //
449  for (int i=0; i<numRHS_; i++)
450  theta_[i] = MTzero;
451  MVT::MvNorm( *R_, tau_ ); // tau = ||r_0||
452  MVT::MvDot( *Rtilde_, *R_, rho_old_ ); // rho = (r_tilde, r0)
453  }
454  else {
455 
456  TEUCHOS_TEST_FOR_EXCEPTION(newstate.R == Teuchos::null,std::invalid_argument,
457  "Belos::PseudoBlockTFQMRIter::initialize(): PseudoBlockTFQMRIterState does not have initial residual.");
458  }
459 
460  // The solver is initialized
461  initialized_ = true;
462  }
463 
464 
466  // Iterate until the status test informs us we should stop.
467  template <class ScalarType, class MV, class OP>
469  {
470  //
471  // Allocate/initialize data structures
472  //
473  if (initialized_ == false) {
474  initialize();
475  }
476 
477  // Create convenience variables for zero and one.
478  const ScalarType STone = Teuchos::ScalarTraits<ScalarType>::one();
479  const MagnitudeType MTone = Teuchos::ScalarTraits<MagnitudeType>::one();
480  const ScalarType STzero = Teuchos::ScalarTraits<ScalarType>::zero();
481  std::vector< ScalarType > eta(numRHS_,STzero), beta(numRHS_,STzero);
482  std::vector<int> index(1);
483  //
484  // Start executable statements.
485  //
486  // Get the current solution vector.
487  Teuchos::RCP<MV> cur_soln_vec = lp_->getCurrLHSVec();
488 
490  // Iterate until the status test tells us to stop.
491  //
492  while (stest_->checkStatus(this) != Passed) {
493 
494  //
495  //--------------------------------------------------------
496  // Compute the new alpha if we need to
497  //--------------------------------------------------------
498  //
499  if (iter_%2 == 0) {
500  MVT::MvDot( *Rtilde_, *V_, alpha_ ); // alpha = rho / (r_tilde, v)
501  for (int i=0; i<numRHS_; i++)
502  alpha_[i] = rho_old_[i]/alpha_[i];
503  }
504  //
505  //--------------------------------------------------------
506  // Loop over all RHS and compute updates.
507  //--------------------------------------------------------
508  //
509  for (int i=0; i<numRHS_; ++i) {
510  index[0] = i;
511 
512  //
513  //--------------------------------------------------------
514  // Update w.
515  // w = w - alpha*Au
516  //--------------------------------------------------------
517  //
518  Teuchos::RCP<const MV> AU_i = MVT::CloneView( *AU_, index );
519  Teuchos::RCP<MV> W_i = MVT::CloneViewNonConst( *W_, index );
520  MVT::MvAddMv( STone, *W_i, -alpha_[i], *AU_i, *W_i );
521  //
522  //--------------------------------------------------------
523  // Update d.
524  // d = u + (theta^2/alpha)eta*d
525  //--------------------------------------------------------
526  //
527  Teuchos::RCP<const MV> U_i = MVT::CloneView( *U_, index );
528  Teuchos::RCP<MV> D_i = MVT::CloneViewNonConst( *D_, index );
529  MVT::MvAddMv( STone, *U_i, (theta_[i]*theta_[i]/alpha_[i])*eta[i], *D_i, *D_i );
530  //
531  //--------------------------------------------------------
532  // Update u if we need to.
533  // u = u - alpha*v
534  //
535  // Note: This is usually computed with alpha (above), but we're trying be memory efficient.
536  //--------------------------------------------------------
537  //
538  if (iter_%2 == 0) {
539  // Compute new U.
540  Teuchos::RCP<const MV> V_i = MVT::CloneView( *V_, index );
541  Teuchos::RCP<MV> U2_i = MVT::CloneViewNonConst( *U_, index );
542  MVT::MvAddMv( STone, *U2_i, -alpha_[i], *V_i, *U2_i );
543  }
544  }
545  //
546  //--------------------------------------------------------
547  // Update Au for the next iteration.
548  //--------------------------------------------------------
549  //
550  if (iter_%2 == 0) {
551  lp_->apply( *U_, *AU_ );
552  }
553  //
554  //--------------------------------------------------------
555  // Compute the new theta, c, eta, tau; i.e. the update to the least squares solution.
556  //--------------------------------------------------------
557  //
558  MVT::MvNorm( *W_, theta_ ); // theta = ||w|| / tau
559 
560  for (int i=0; i<numRHS_; ++i) {
561  theta_[i] /= tau_[i];
562  // cs = 1.0 / sqrt(1.0 + theta^2)
563  cs_[i] = MTone / Teuchos::ScalarTraits<MagnitudeType>::squareroot(MTone + theta_[i]*theta_[i]);
564  tau_[i] *= theta_[i]*cs_[i]; // tau = tau * theta * cs
565  eta[i] = cs_[i]*cs_[i]*alpha_[i]; // eta = cs^2 * alpha
566  }
567  //
568  //--------------------------------------------------------
569  // Accumulate the update for the solution x := x + eta*D_
570  //--------------------------------------------------------
571  //
572  for (int i=0; i<numRHS_; ++i) {
573  index[0]=i;
574  Teuchos::RCP<const MV> D_i = MVT::CloneView( *D_, index );
575  Teuchos::RCP<MV> update_i = MVT::CloneViewNonConst( *solnUpdate_, index );
576  MVT::MvAddMv( STone, *update_i, eta[i], *D_i, *update_i );
577  }
578  //
579  if (iter_%2) {
580  //
581  //--------------------------------------------------------
582  // Compute the new rho, beta if we need to.
583  //--------------------------------------------------------
584  //
585  MVT::MvDot( *Rtilde_, *W_, rho_ ); // rho = (r_tilde, w)
586 
587  for (int i=0; i<numRHS_; ++i) {
588  beta[i] = rho_[i]/rho_old_[i]; // beta = rho / rho_old
589  rho_old_[i] = rho_[i]; // rho_old = rho
590 
591  //
592  //--------------------------------------------------------
593  // Update u, v, and Au if we need to.
594  // Note: We are updating v in two stages to be memory efficient
595  //--------------------------------------------------------
596  //
597  index[0]=i;
598  Teuchos::RCP<const MV> W_i = MVT::CloneView( *W_, index );
599  Teuchos::RCP<MV> U_i = MVT::CloneViewNonConst( *U_, index );
600  MVT::MvAddMv( STone, *W_i, beta[i], *U_i, *U_i ); // u = w + beta*u
601 
602  // First stage of v update.
603  Teuchos::RCP<const MV> AU_i = MVT::CloneView( *AU_, index );
604  Teuchos::RCP<MV> V_i = MVT::CloneViewNonConst( *V_, index );
605  MVT::MvAddMv( STone, *AU_i, beta[i], *V_i, *V_i ); // v = Au + beta*v
606  }
607 
608  // Update Au.
609  lp_->apply( *U_, *AU_ ); // Au = A*u
610 
611  // Second stage of v update.
612  for (int i=0; i<numRHS_; ++i) {
613  index[0]=i;
614  Teuchos::RCP<const MV> AU_i = MVT::CloneView( *AU_, index );
615  Teuchos::RCP<MV> V_i = MVT::CloneViewNonConst( *V_, index );
616  MVT::MvAddMv( STone, *AU_i, beta[i], *V_i, *V_i ); // v = Au + beta*v
617  }
618  }
619 
620  // Increment the iteration
621  iter_++;
622 
623  } // end while (sTest_->checkStatus(this) != Passed)
624  }
625 
626 } // namespace Belos
627 //
628 #endif // BELOS_PSEUDO_BLOCK_TFQMR_ITER_HPP
629 //
630 // End of file BelosPseudoBlockTFQMRIter.hpp
631 
632 
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...
OperatorTraits< ScalarType, MV, OP > OPT
Class which manages the output and verbosity of the Belos solvers.
static void MvDot(const MV &mv, const MV &A, std::vector< ScalarType > &b)
Compute a vector b where the components are the individual dot-products of the i-th columns of A and ...
This class implements the preconditioned transpose-free QMR algorithm for solving non-Hermitian linea...
void initialize()
Initialize the solver with the initial vectors from the linear problem or random data.
PseudoBlockTFQMRIterateFailure is thrown when the PseudoBlockTFQMRIter object is unable to compute th...
Structure to contain pointers to PseudoBlockTFQMRIter state variables.
MultiVecTraits< ScalarType, MV > MVT
Pure virtual base class for defining the status testing capabilities of Belos.
PseudoBlockTFQMRIterState< ScalarType, MV > getState() const
Get the current state of the linear solver.
static Teuchos::RCP< const MV > CloneView(const MV &mv, const std::vector< int > &index)
Creates a new const MV that shares the selected contents of mv (shallow copy).
Declaration of basic traits for the multivector type.
Teuchos::RCP< const MV > R
The current residual basis.
const LinearProblem< ScalarType, MV, OP > & getProblem() const
Get a constant reference to the linear problem.
int getNumIters() const
Get the current iteration count.
static void MvInit(MV &mv, const ScalarType alpha=Teuchos::ScalarTraits< ScalarType >::zero())
Replace each element of the vectors in mv with alpha.
Pure virtual base class which describes the basic interface to the linear solver iteration.
Teuchos::RCP< const MV > getNativeResiduals(std::vector< MagnitudeType > *norms) const
Get the norms of the residuals native to the solver.
A pure virtual class for defining the status tests for the Belos iterative solvers.
Class which defines basic traits for the operator type.
static int GetNumberVecs(const MV &mv)
Obtain the number of vectors in mv.
PseudoBlockTFQMRIterInitFailure(const std::string &what_arg)
static void MvAddMv(const ScalarType alpha, const MV &A, const ScalarType beta, const MV &B, MV &mv)
Replace mv with .
int getBlockSize() const
Get the blocksize to be used by the iterative solver in solving this linear problem.
Traits class which defines basic operations on multivectors.
PseudoBlockTFQMRIter(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)
Belos::PseudoBlockTFQMRIter constructor.
static Teuchos::RCP< MV > CloneViewNonConst(MV &mv, const std::vector< int > &index)
Creates a new MV that shares the selected contents of mv (shallow copy).
static Teuchos::RCP< MV > Clone(const MV &mv, const int numvecs)
Creates a new empty MV containing numvecs columns.
PseudoBlockTFQMRIterInitFailure is thrown when the PseudoBlockTFQMRIter object is unable to generate ...
Teuchos::RCP< MV > getCurrentUpdate() const
Get the current update to the linear system.
Teuchos::ScalarTraits< ScalarType > SCT
A linear system to solve, and its associated information.
Class which describes the linear problem to be solved by the iterative solver.
void setBlockSize(int blockSize)
Set the blocksize.
static Teuchos::RCP< MV > CloneCopy(const MV &mv)
Creates a new MV and copies contents of mv into the new vector (deep copy).
static ptrdiff_t GetGlobalLength(const MV &mv)
Return the number of rows in the given multivector mv.
PseudoBlockTFQMRIterateFailure(const std::string &what_arg)
virtual ~PseudoBlockTFQMRIter()
Belos::PseudoBlockTFQMRIter destructor.
static void MvNorm(const MV &mv, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec, NormType type=TwoNorm)
Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of ...
Class which defines basic traits for the operator type.
void iterate()
This method performs block TFQMR iterations until the status test indicates the need to stop or an er...
Parent class to all Belos exceptions.
Definition: BelosTypes.hpp:60
void resetNumIters(int iter=0)
Reset the iteration count.
Belos header file which uses auto-configuration information to include necessary C++ headers...
bool isInitialized()
States whether the solver has been initialized or not.
Templated virtual class for providing orthogonalization/orthonormalization methods with matrix-based ...
void initializeTFQMR(const PseudoBlockTFQMRIterState< ScalarType, MV > &newstate)
Initialize the solver to an iterate, providing a complete state.

Generated on Thu Jul 21 2016 14:43:57 for Belos by doxygen 1.8.11