Belos Version of the Day
Loading...
Searching...
No Matches
Belos_Details_LinearSolverFactory.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 BELOS_DETAILS_LINEARSOLVERFACTORY_HPP
11#define BELOS_DETAILS_LINEARSOLVERFACTORY_HPP
12
15
18#include "Trilinos_Details_LinearSolverFactory.hpp"
19
20namespace Belos {
21namespace Details {
22
25template<class MV, class OP, class ScalarType, class NormType>
27 public Trilinos::Details::LinearSolverFactory<MV, OP, NormType>
28{
29public:
39 virtual Teuchos::RCP<Trilinos::Details::LinearSolver<MV, OP, NormType> >
40 getLinearSolver (const std::string& solverName)
41 {
42 using Teuchos::rcp;
44 }
45
60 {
62
63#ifdef HAVE_TEUCHOSCORE_CXX11
64 typedef std::shared_ptr<this_type> ptr_type;
65 //typedef std::shared_ptr<Trilinos::Details::LinearSolverFactory<MV, OP> > base_ptr_type;
66#else
67 typedef Teuchos::RCP<this_type> ptr_type;
68 //typedef Teuchos::RCP<Trilinos::Details::LinearSolverFactory<MV, OP> > base_ptr_type;
69#endif // HAVE_TEUCHOSCORE_CXX11
70
71 ptr_type factory (new this_type ());
72 Trilinos::Details::registerLinearSolverFactory<MV, OP, NormType> ("Belos", factory);
73 }
74};
75
76} // namespace Details
77} // namespace Belos
78
79#endif /* BELOS_DETAILS_LINEARSOLVERFACTORY_HPP */
Implementation of Trilinos::Details::LinearSolver.
virtual Teuchos::RCP< Trilinos::Details::LinearSolver< MV, OP, NormType > > getLinearSolver(const std::string &solverName)
Get an instance of a Belos solver.
static void registerLinearSolverFactory()
Register this LinearSolverFactory with the central registry.
Belos' implementation of Trilinos::Details::LinearSolver.
Alternative run-time polymorphic interface for operators.

Generated for Belos by doxygen 1.9.8