Belos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosCustomSolverFactory.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Belos: Block Linear Solvers Package
4 //
5 // Copyright 2004-2016 NTESS and the Belos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef BELOSSOLVERFACTORYBASE_HPP
11 #define BELOSSOLVERFACTORYBASE_HPP
12 
13 #include <string>
14 #include <vector>
15 #include "Teuchos_RCP.hpp"
16 
17 #ifndef DOXYGEN_SHOULD_SKIP_THIS
18 namespace Teuchos {
19 // Forward declaration
20 class ParameterList;
21 } // namespace Teuchos
22 #endif // DOXYGEN_SHOULD_SKIP_THIS
23 
24 namespace Belos {
25 
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 // Forward declaration
28 template<class Scalar, class MV, class OP>
29 class SolverManager;
30 #endif // DOXYGEN_SHOULD_SKIP_THIS
31 
48 template<class Scalar, class MV, class OP>
50 public:
82  getSolver (const std::string& solverName,
83  const Teuchos::RCP<Teuchos::ParameterList>& solverParams) = 0;
84 
90  virtual int numSupportedSolvers () const = 0;
91 
97  virtual std::vector<std::string> supportedSolverNames () const = 0;
98 
100  virtual bool isSupported (const std::string& solverName) const = 0;
101 
103  virtual ~CustomSolverFactory () {}
104 };
105 
106 } // namespace Belos
107 
108 #endif // BELOSSOLVERFACTORYBASE_HPP
virtual int numSupportedSolvers() const =0
Number of supported solvers.
Interface for custom Belos solver factories.
virtual Teuchos::RCP< SolverManager< Scalar, MV, OP > > getSolver(const std::string &solverName, const Teuchos::RCP< Teuchos::ParameterList > &solverParams)=0
Return an instance of the specified solver, or Teuchos::null if this factory does not provide the req...
virtual ~CustomSolverFactory()
Destructor (virtual, for safety of derived classes).
virtual bool isSupported(const std::string &solverName) const =0
Whether the given solver name names a supported solver.
virtual std::vector< std::string > supportedSolverNames() const =0
List of supported solver names.