Belos Version of the Day
Loading...
Searching...
No Matches
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
18namespace Teuchos {
19// Forward declaration
20class ParameterList;
21} // namespace Teuchos
22#endif // DOXYGEN_SHOULD_SKIP_THIS
23
24namespace Belos {
25
26#ifndef DOXYGEN_SHOULD_SKIP_THIS
27// Forward declaration
28template<class Scalar, class MV, class OP>
29class SolverManager;
30#endif // DOXYGEN_SHOULD_SKIP_THIS
31
48template<class Scalar, class MV, class OP>
50public:
81 virtual Teuchos::RCP<SolverManager<Scalar, MV, OP> >
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
104};
105
106} // namespace Belos
107
108#endif // BELOSSOLVERFACTORYBASE_HPP
Interface for custom Belos solver factories.
virtual ~CustomSolverFactory()
Destructor (virtual, for safety of derived classes).
virtual int numSupportedSolvers() const =0
Number of supported solvers.
virtual bool isSupported(const std::string &solverName) const =0
Whether the given solver name names a supported solver.
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 std::vector< std::string > supportedSolverNames() const =0
List of supported solver names.
Alternative run-time polymorphic interface for operators.

Generated for Belos by doxygen 1.9.8