Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
16 #include "BelosSolverFactory.hpp"
19 
20 namespace Belos {
21 namespace Details {
22 
25 template<class MV, class OP, class ScalarType, class NormType>
27  public Trilinos::Details::LinearSolverFactory<MV, OP, NormType>
28 {
29 public:
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 */
Belos&#39; implementation of Trilinos::Details::LinearSolver.
Implementation of Trilinos::Details::LinearSolver.
static void registerLinearSolverFactory()
Register this LinearSolverFactory with the central registry.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual Teuchos::RCP< Trilinos::Details::LinearSolver< MV, OP, NormType > > getLinearSolver(const std::string &solverName)
Get an instance of a Belos solver.

Generated on Fri Dec 20 2024 09:24:48 for Belos by doxygen 1.8.5