Belos  Version of the Day
BelosSolverFactory.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_SolverFactory_hpp
43 #define __Belos_SolverFactory_hpp
44 
45 #include <BelosConfigDefs.hpp>
46 #include <BelosOutputManager.hpp>
47 #include <BelosSolverManager.hpp>
48 
49 #include <BelosBlockCGSolMgr.hpp>
51 #include <BelosGCRODRSolMgr.hpp>
55 #include <BelosLSQRSolMgr.hpp>
56 #include <BelosMinresSolMgr.hpp>
57 #include <BelosGmresPolySolMgr.hpp>
58 #include <BelosPCPGSolMgr.hpp>
59 #include <BelosRCGSolMgr.hpp>
60 #include <BelosTFQMRSolMgr.hpp>
63 #include <BelosBiCGStabSolMgr.hpp>
64 
65 #include <Teuchos_Array.hpp>
66 #include <Teuchos_Describable.hpp>
67 #include <Teuchos_StandardCatchMacros.hpp>
68 #include <Teuchos_TypeNameTraits.hpp>
69 
70 #include <algorithm>
71 #include <locale>
72 #include <map>
73 #include <sstream>
74 #include <stdexcept>
75 #include <vector>
76 
77 namespace Belos {
78 
79 namespace details {
80 
115 };
116 
117 } // namespace details
118 
245 template<class Scalar, class MV, class OP>
246 class SolverFactory : public Teuchos::Describable {
247 public:
254 
256  SolverFactory ();
257 
281  Teuchos::RCP<solver_base_type>
282  create (const std::string& solverName,
283  const Teuchos::RCP<Teuchos::ParameterList>& solverParams);
284 
290  int numSupportedSolvers () const;
291 
297  Teuchos::Array<std::string> supportedSolverNames () const;
298 
300  bool isSupported (const std::string& solverName) const;
301 
303 
304 
306  std::string description() const;
307 
313  void describe (Teuchos::FancyOStream& out,
314  const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default) const;
316 
317 private:
330  std::map<std::string, std::string> aliasToCanonicalName_;
331 
345  std::map<std::string, details::EBelosSolverType> canonicalNameToEnum_;
346 
352  void
353  reviseParameterListForAlias (const std::string& aliasName,
354  Teuchos::ParameterList& solverParams);
355 
357  Teuchos::Array<std::string> canonicalSolverNames () const;
358 
360  Teuchos::Array<std::string> solverNameAliases () const;
361 
363  static void
364  printStringArray (std::ostream& out,
365  const Teuchos::ArrayView<const std::string>& array)
366  {
367  typedef Teuchos::ArrayView<std::string>::const_iterator iter_type;
368 
369  out << "[";
370  for (iter_type iter = array.begin(); iter != array.end(); ++iter) {
371  out << "\"" << *iter << "\"";
372  if (iter + 1 != array.end()) {
373  out << ", ";
374  }
375  }
376  out << "]";
377  }
378 };
379 
380 
381 namespace details {
382 
401 template<class SolverManagerBaseType, class SolverManagerType>
402 Teuchos::RCP<SolverManagerBaseType>
403 makeSolverManagerTmpl (const Teuchos::RCP<Teuchos::ParameterList>& params);
404 
423 template<class Scalar, class MV, class OP>
424 Teuchos::RCP<SolverManager<Scalar, MV, OP> >
426  const Teuchos::RCP<Teuchos::ParameterList>& params)
427 {
428  typedef SolverManager<Scalar, MV, OP> base_type;
429 
430  switch (solverType) {
432  typedef BlockGmresSolMgr<Scalar, MV, OP> impl_type;
433  return makeSolverManagerTmpl<base_type, impl_type> (params);
434  break;
435  }
437  typedef PseudoBlockGmresSolMgr<Scalar, MV, OP> impl_type;
438  return makeSolverManagerTmpl<base_type, impl_type> (params);
439  break;
440  }
441  case SOLVER_TYPE_BLOCK_CG: {
442  typedef BlockCGSolMgr<Scalar, MV, OP> impl_type;
443  return makeSolverManagerTmpl<base_type, impl_type> (params);
444  break;
445  }
447  typedef PseudoBlockCGSolMgr<Scalar, MV, OP> impl_type;
448  return makeSolverManagerTmpl<base_type, impl_type> (params);
449  break;
450  }
451  case SOLVER_TYPE_GCRODR: {
452  typedef GCRODRSolMgr<Scalar, MV, OP> impl_type;
453  return makeSolverManagerTmpl<base_type, impl_type> (params);
454  break;
455  }
456  case SOLVER_TYPE_RCG: {
457  typedef RCGSolMgr<Scalar, MV, OP> impl_type;
458  return makeSolverManagerTmpl<base_type, impl_type> (params);
459  break;
460  }
461  case SOLVER_TYPE_MINRES: {
462  typedef MinresSolMgr<Scalar, MV, OP> impl_type;
463  return makeSolverManagerTmpl<base_type, impl_type> (params);
464  break;
465  }
466  case SOLVER_TYPE_LSQR: {
467  typedef LSQRSolMgr<Scalar, MV, OP> impl_type;
468  return makeSolverManagerTmpl<base_type, impl_type> (params);
469  break;
470  }
473  return makeSolverManagerTmpl<base_type, impl_type> (params);
474  }
475  case SOLVER_TYPE_TFQMR: {
476  typedef TFQMRSolMgr<Scalar, MV, OP> impl_type;
477  return makeSolverManagerTmpl<base_type, impl_type> (params);
478  }
480  typedef PseudoBlockTFQMRSolMgr<Scalar, MV, OP> impl_type;
481  return makeSolverManagerTmpl<base_type, impl_type> (params);
482  }
483  case SOLVER_TYPE_GMRES_POLY: {
484  typedef GmresPolySolMgr<Scalar, MV, OP> impl_type;
485  return makeSolverManagerTmpl<base_type, impl_type> (params);
486  }
487  case SOLVER_TYPE_PCPG: {
488  typedef PCPGSolMgr<Scalar, MV, OP> impl_type;
489  return makeSolverManagerTmpl<base_type, impl_type> (params);
490  }
492  typedef FixedPointSolMgr<Scalar, MV, OP> impl_type;
493  return makeSolverManagerTmpl<base_type, impl_type> (params);
494  }
495  case SOLVER_TYPE_BICGSTAB: {
496  typedef BiCGStabSolMgr<Scalar, MV, OP> impl_type;
497  return makeSolverManagerTmpl<base_type, impl_type> (params);
498  }
499  default: // Fall through; let the code below handle it.
500  TEUCHOS_TEST_FOR_EXCEPTION(
501  true, std::logic_error, "Belos::SolverFactory: Invalid EBelosSolverType "
502  "enum value " << solverType << ". Please report this bug to the Belos "
503  "developers.");
504  }
505 
506  // Compiler guard. This may result in a warning on some compilers
507  // for an unreachable statement, but it will prevent a warning on
508  // other compilers for a "missing return statement at end of
509  // non-void function."
510  return Teuchos::null;
511 }
512 
513 template<class SolverManagerBaseType, class SolverManagerType>
514 Teuchos::RCP<SolverManagerBaseType>
515 makeSolverManagerTmpl (const Teuchos::RCP<Teuchos::ParameterList>& params)
516 {
517  using Teuchos::ParameterList;
518  using Teuchos::parameterList;
519  using Teuchos::RCP;
520 
521  RCP<SolverManagerType> solver = rcp (new SolverManagerType);
522 
523  // Some solvers may not like to get a null ParameterList. If params
524  // is null, replace it with an empty parameter list. The solver
525  // will fill in default parameters for that case. Use the name of
526  // the solver's default parameters to name the new empty list.
527  RCP<ParameterList> pl;
528  if (params.is_null()) {
529  pl = parameterList (solver->getValidParameters ()->name ());
530  } else {
531  pl = params;
532  }
533  TEUCHOS_TEST_FOR_EXCEPTION(
534  pl.is_null(), std::logic_error,
535  "Belos::SolverFactory: ParameterList to pass to solver is null. This "
536  "should never happen. Please report this bug to the Belos developers.");
537  solver->setParameters (pl);
538  return solver;
539 }
540 
541 } // namespace details
542 
543 
544 template<class Scalar, class MV, class OP>
546 {
547  aliasToCanonicalName_["GMRES"] = "PSEUDOBLOCK GMRES";
548  // NOTE (mfh 29 Nov 2011) Accessing the flexible capability requires
549  // setting a parameter in the solver's parameter list. This affects
550  // the SolverFactory's interface, since using the "Flexible GMRES"
551  // alias requires modifying the user's parameter list if necessary.
552  // This is a good idea because users may not know about the
553  // parameter, or may have forgotten.
554  //
555  // NOTE (mfh 12 Aug 2015) The keys and values need to be all uppercase.
556  aliasToCanonicalName_["BLOCK GMRES"] = "BLOCK GMRES";
557  aliasToCanonicalName_["FLEXIBLE GMRES"] = "BLOCK GMRES";
558  aliasToCanonicalName_["CG"] = "PSEUDOBLOCK CG";
559  aliasToCanonicalName_["PSEUDOBLOCKCG"] = "PSEUDOBLOCK CG";
560  aliasToCanonicalName_["STOCHASTIC CG"] = "PSEUDOBLOCK STOCHASTIC CG";
561  aliasToCanonicalName_["RECYCLING CG"] = "RCG";
562  aliasToCanonicalName_["RECYCLING GMRES"] = "GCRODR";
563  // For compatibility with Stratimikos' Belos adapter.
564  aliasToCanonicalName_["PSEUDO BLOCK GMRES"] = "PSEUDOBLOCK GMRES";
565  aliasToCanonicalName_["PSEUDOBLOCKGMRES"] = "PSEUDOBLOCK GMRES";
566  aliasToCanonicalName_["PSEUDO BLOCK CG"] = "PSEUDOBLOCK CG";
567  aliasToCanonicalName_["PSEUDOBLOCKCG"] = "PSEUDOBLOCK CG";
568  aliasToCanonicalName_["TRANSPOSE-FREE QMR"] = "TFQMR";
569  aliasToCanonicalName_["PSEUDO BLOCK TFQMR"] = "PSEUDOBLOCK TFQMR";
570  aliasToCanonicalName_["PSEUDO BLOCK TRANSPOSE-FREE QMR"] = "PSEUDOBLOCK TFQMR";
571  aliasToCanonicalName_["GMRESPOLY"] = "HYBRID BLOCK GMRES";
572  aliasToCanonicalName_["SEED GMRES"] = "HYBRID BLOCK GMRES";
573  aliasToCanonicalName_["CGPOLY"] = "PCPG";
574  aliasToCanonicalName_["SEED CG"] = "PCPG";
575  aliasToCanonicalName_["FIXED POINT"] = "FIXED POINT";
576  aliasToCanonicalName_["BICGSTAB"] = "BICGSTAB";
577 
578  // Mapping from canonical solver name (a string) to its
579  // corresponding enum value. This mapping is one-to-one.
580  //
581  // NOTE (mfh 12 Aug 2015) The keys need to be all uppercase.
582  canonicalNameToEnum_["BLOCK GMRES"] = details::SOLVER_TYPE_BLOCK_GMRES;
583  canonicalNameToEnum_["PSEUDOBLOCK GMRES"] = details::SOLVER_TYPE_PSEUDO_BLOCK_GMRES;
584  canonicalNameToEnum_["BLOCK CG"] = details::SOLVER_TYPE_BLOCK_CG;
585  canonicalNameToEnum_["PSEUDOBLOCK CG"] = details::SOLVER_TYPE_PSEUDO_BLOCK_CG;
586  canonicalNameToEnum_["PSEUDOBLOCK STOCHASTIC CG"] = details::SOLVER_TYPE_STOCHASTIC_CG;
587  canonicalNameToEnum_["GCRODR"] = details::SOLVER_TYPE_GCRODR;
588  canonicalNameToEnum_["RCG"] = details::SOLVER_TYPE_RCG;
589  canonicalNameToEnum_["MINRES"] = details::SOLVER_TYPE_MINRES;
590  canonicalNameToEnum_["LSQR"] = details::SOLVER_TYPE_LSQR;
591  canonicalNameToEnum_["TFQMR"] = details::SOLVER_TYPE_TFQMR;
592  canonicalNameToEnum_["PSEUDOBLOCK TFQMR"] = details::SOLVER_TYPE_PSEUDO_BLOCK_TFQMR;
593  canonicalNameToEnum_["HYBRID BLOCK GMRES"] = details::SOLVER_TYPE_GMRES_POLY;
594  canonicalNameToEnum_["PCPG"] = details::SOLVER_TYPE_PCPG;
595  canonicalNameToEnum_["FIXED POINT"] = details::SOLVER_TYPE_FIXED_POINT;
596  canonicalNameToEnum_["BICGSTAB"] = details::SOLVER_TYPE_BICGSTAB;
597 }
598 
599 
600 template<class Scalar, class MV, class OP>
601 void
603 reviseParameterListForAlias (const std::string& aliasName,
604  Teuchos::ParameterList& solverParams)
605 {
606  if (aliasName == "FLEXIBLE GMRES") {
607  // "Gmres" uses title case in this solver's parameter list. For
608  // our alias, we prefer the all-capitals "GMRES" that the
609  // algorithm's authors (Saad and Schultz) used.
610  solverParams.set ("Flexible Gmres", true);
611  }
612 }
613 
614 
615 template<class Scalar, class MV, class OP>
616 Teuchos::RCP<typename SolverFactory<Scalar, MV, OP>::solver_base_type>
618 create (const std::string& solverName,
619  const Teuchos::RCP<Teuchos::ParameterList>& solverParams)
620 {
621  const char prefix[] = "Belos::SolverFactory: ";
622 
623  // Upper-case version of the input solver name.
624  std::string solverNameUC (solverName);
625  {
626  typedef std::string::value_type char_t;
627  typedef std::ctype<char_t> facet_type;
628  const facet_type& facet = std::use_facet<facet_type> (std::locale ());
629 
630  const std::string::size_type len = solverName.size ();
631  for (std::string::size_type k = 0; k < len; ++k) {
632  solverNameUC[k] = facet.toupper (solverName[k]);
633  }
634  }
635 
636  // Check whether the given name is an alias.
637  std::map<std::string, std::string>::const_iterator aliasIter =
638  aliasToCanonicalName_.find (solverNameUC);
639  const bool isAnAlias = (aliasIter != aliasToCanonicalName_.end());
640  const std::string candidateCanonicalName =
641  isAnAlias ? aliasIter->second : solverNameUC;
642 
643  // Get the canonical name.
644  std::map<std::string, details::EBelosSolverType>::const_iterator canonicalIter =
645  canonicalNameToEnum_.find (candidateCanonicalName);
646  const bool validCanonicalName = (canonicalIter != canonicalNameToEnum_.end());
647 
648  // Check whether we found a canonical name. If we didn't and the
649  // input name is a valid alias, that's a bug. Otherwise, the input
650  // name is invalid.
651  TEUCHOS_TEST_FOR_EXCEPTION
652  (! validCanonicalName && isAnAlias, std::logic_error,
653  prefix << "Valid alias \"" << solverName << "\" has candidate canonical "
654  "name \"" << candidateCanonicalName << "\", which is not a canonical "
655  "solver name. Please report this bug to the Belos developers.");
656  TEUCHOS_TEST_FOR_EXCEPTION
657  (! validCanonicalName && ! isAnAlias, std::invalid_argument,
658  prefix << "Invalid solver name \"" << solverName << "\".");
659 
660  // If the input list is null, we create a new list and use that.
661  // This is OK because the effect of a null parameter list input is
662  // to use default parameter values. Thus, we can always replace a
663  // null list with an empty list.
664  Teuchos::RCP<Teuchos::ParameterList> pl =
665  solverParams.is_null() ? Teuchos::parameterList() : solverParams;
666 
667  // Possibly modify the input parameter list as needed.
668  if (isAnAlias) {
669  reviseParameterListForAlias (solverNameUC, *pl);
670  }
671 
672  return details::makeSolverManagerFromEnum<Scalar, MV, OP> (canonicalIter->second, pl);
673 }
674 
675 
676 template<class Scalar, class MV, class OP>
677 std::string
679 {
680  using Teuchos::TypeNameTraits;
681 
682  std::ostringstream out;
683  out << "\"Belos::SolverFactory\": {";
684  if (this->getObjectLabel () != "") {
685  out << "Label: " << this->getObjectLabel () << ", ";
686  }
687  out << "Scalar: " << TypeNameTraits<Scalar>::name ()
688  << ", MV: " << TypeNameTraits<MV>::name ()
689  << ", OP: " << TypeNameTraits<OP>::name ()
690  << "}";
691  return out.str ();
692 }
693 
694 
695 template<class Scalar, class MV, class OP>
696 void
698 describe (Teuchos::FancyOStream& out,
699  const Teuchos::EVerbosityLevel verbLevel) const
700 {
701  using Teuchos::TypeNameTraits;
702  using std::endl;
703 
704  const Teuchos::EVerbosityLevel vl =
705  (verbLevel == Teuchos::VERB_DEFAULT) ? Teuchos::VERB_LOW : verbLevel;
706 
707  if (vl == Teuchos::VERB_NONE) {
708  return;
709  }
710 
711  // By convention, describe() always begins with a tab.
712  Teuchos::OSTab tab0 (out);
713  // The description prints in YAML format. The class name needs to
714  // be protected with quotes, so that YAML doesn't get confused
715  // between the colons in the class name and the colon separating
716  // (key,value) pairs.
717  out << "\"Belos::SolverFactory\":" << endl;
718  if (this->getObjectLabel () != "") {
719  out << "Label: " << this->getObjectLabel () << endl;
720  }
721  {
722  out << "Template parameters:" << endl;
723  Teuchos::OSTab tab1 (out);
724  out << "Scalar: " << TypeNameTraits<Scalar>::name () << endl
725  << "MV: " << TypeNameTraits<MV>::name () << endl
726  << "OP: " << TypeNameTraits<OP>::name () << endl;
727  }
728 
729  // At higher verbosity levels, print out the list of supported solvers.
730  if (vl > Teuchos::VERB_LOW) {
731  Teuchos::OSTab tab1 (out);
732  out << "Number of solvers: " << numSupportedSolvers ()
733  << endl;
734  out << "Canonical solver names: ";
735  printStringArray (out, canonicalSolverNames ());
736  out << endl;
737 
738  out << "Aliases to canonical names: ";
739  printStringArray (out, solverNameAliases ());
740  out << endl;
741  }
742 }
743 
744 template<class Scalar, class MV, class OP>
745 int
747 {
748  return static_cast<int> (canonicalNameToEnum_.size());
749 }
750 
751 template<class Scalar, class MV, class OP>
752 Teuchos::Array<std::string>
754 {
755  Teuchos::Array<std::string> canonicalNames;
756  typedef std::map<std::string, details::EBelosSolverType>::const_iterator iter_type;
757  for (iter_type iter = canonicalNameToEnum_.begin();
758  iter != canonicalNameToEnum_.end(); ++iter) {
759  canonicalNames.push_back (iter->first);
760  }
761  return canonicalNames;
762 }
763 
764 template<class Scalar, class MV, class OP>
765 Teuchos::Array<std::string>
767 {
768  Teuchos::Array<std::string> names;
769  {
770  typedef std::map<std::string, std::string>::const_iterator iter_type;
771  for (iter_type iter = aliasToCanonicalName_.begin();
772  iter != aliasToCanonicalName_.end(); ++iter) {
773  names.push_back (iter->first);
774  }
775  }
776  return names;
777 }
778 
779 template<class Scalar, class MV, class OP>
780 Teuchos::Array<std::string>
782 {
783  Teuchos::Array<std::string> names;
784  {
785  typedef std::map<std::string, std::string>::const_iterator iter_type;
786  for (iter_type iter = aliasToCanonicalName_.begin();
787  iter != aliasToCanonicalName_.end(); ++iter) {
788  names.push_back (iter->first);
789  }
790  }
791  {
792  typedef std::map<std::string, details::EBelosSolverType>::const_iterator iter_type;
793  for (iter_type iter = canonicalNameToEnum_.begin();
794  iter != canonicalNameToEnum_.end(); ++iter) {
795  names.push_back (iter->first);
796  }
797  }
798  return names;
799 }
800 
801 } // namespace Belos
802 
803 #endif // __Belos_SolverFactory_hpp
804 
Solver manager for the MINRES linear solver.
The Belos::FixedPointSolMgr provides a powerful and fully-featured solver manager over the FixedPoint...
Class which manages the output and verbosity of the Belos solvers.
The Belos::PseudoBlockCGSolMgr provides a solver manager for the BlockCG linear solver.
The Belos::PseudoBlockTFQMRSolMgr provides a solver manager for the pseudo-block TFQMR linear solver...
Teuchos::Array< std::string > supportedSolverNames() const
List of supported solver names.
Teuchos::RCP< SolverManager< Scalar, MV, OP > > makeSolverManagerFromEnum(const EBelosSolverType solverType, const Teuchos::RCP< Teuchos::ParameterList > &params)
Implementation of the RCG (Recycling Conjugate Gradient) iterative linear solver. ...
The Belos::BlockCGSolMgr provides a powerful and fully-featured solver manager over the CG and BlockC...
The Belos::FixedPointSolMgr provides a solver manager for the FixedPoint linear solver.
Declaration and definition of Belos::PCPGSolMgr (PCPG iterative linear solver).
Interface to Block GMRES and Flexible GMRES.
The Belos::PseudoBlockCGSolMgr provides a powerful and fully-featured solver manager over the pseudo-...
int numSupportedSolvers() const
Number of supported solvers.
Declaration and definition of Belos::GCRODRSolMgr, which implements the GCRODR (recycling GMRES) solv...
Pure virtual base class which describes the basic interface for a solver manager. ...
The Belos::BlockGmresSolMgr provides a solver manager for the BlockGmres linear solver.
MINRES linear solver solution manager.
Declaration and definition of Belos::GmresPolySolMgr (hybrid block GMRES linear solver).
The Belos::BiCGStabSolMgr provides a solver manager for the BiCGStab linear solver.
Teuchos::RCP< SolverManagerBaseType > makeSolverManagerTmpl(const Teuchos::RCP< Teuchos::ParameterList > &params)
Implementation of the GCRODR (Recycling GMRES) iterative linear solver.
The Belos::PseudoBlockTFQMRSolMgr provides a powerful and fully-featured solver manager over the pseu...
Interface to standard and "pseudoblock" GMRES.
The Belos::PseudoBlockStochasticCGSolMgr provides a solver manager for the stochastic BlockCG linear ...
Hybrid block GMRES iterative linear solver.
The Belos::SolverManager is a templated virtual base class that defines the basic interface that any ...
The Belos::TFQMRSolMgr provides a powerful and fully-featured solver manager over the TFQMR linear so...
The Belos::BlockCGSolMgr provides a solver manager for the BlockCG linear solver. ...
Teuchos::RCP< solver_base_type > create(const std::string &solverName, const Teuchos::RCP< Teuchos::ParameterList > &solverParams)
Create, configure, and return the specified solver.
LSQRSolMgr: interface to the LSQR method.
The Belos::BiCGStabSolMgr provides a powerful and fully-featured solver manager over the pseudo-block...
EBelosSolverType
1-to-1 enumeration of all supported SolverManager subclasses.
The Belos::PseudoBlockStochasticCGSolMgr provides a powerful and fully-featured solver manager over t...
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Describe this object.
PCPG iterative linear solver.
SolverManager< Scalar, MV, OP > solver_base_type
The type of the solver returned by create().
LSQR method (for linear systems and linear least-squares problems).
The Belos::RCGSolMgr provides a solver manager for the RCG (Recycling Conjugate Gradient) linear solv...
The Belos::PseudoBlockGmresSolMgr provides a solver manager for the BlockGmres linear solver...
SolverFactory()
Default constructor.
Factory for all solvers which Belos supports.
Belos header file which uses auto-configuration information to include necessary C++ headers...
The Belos::TFQMRSolMgr provides a solver manager for the TFQMR linear solver.
std::string description() const
A string description of this object.

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