Belos
Version of the Day
Loading...
Searching...
No Matches
src
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
"
17
#include "
Belos_Details_LinearSolver.hpp
"
18
#include "Trilinos_Details_LinearSolverFactory.hpp"
19
20
namespace
Belos
{
21
namespace
Details {
22
25
template
<
class
MV,
class
OP,
class
ScalarType,
class
NormType>
26
class
LinearSolverFactory
:
27
public
Trilinos::Details::LinearSolverFactory<MV, OP, NormType>
28
{
29
public
:
39
virtual
Teuchos::RCP<Trilinos::Details::LinearSolver<MV, OP, NormType> >
40
getLinearSolver
(
const
std::string&
solverName
)
41
{
42
using
Teuchos::rcp;
43
return
rcp
(
new
Belos::Details::LinearSolver<MV, OP, ScalarType, NormType>
(
solverName
));
44
}
45
59
static
void
registerLinearSolverFactory
()
60
{
61
typedef
Belos::Details::LinearSolverFactory<MV, OP, ScalarType, NormType>
this_type
;
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 */
BelosSolverFactory.hpp
Belos_Details_LinearSolver.hpp
Implementation of Trilinos::Details::LinearSolver.
Belos::Details::LinearSolverFactory
Definition
Belos_Details_LinearSolverFactory.hpp:28
Belos::Details::LinearSolverFactory::getLinearSolver
virtual Teuchos::RCP< Trilinos::Details::LinearSolver< MV, OP, NormType > > getLinearSolver(const std::string &solverName)
Get an instance of a Belos solver.
Definition
Belos_Details_LinearSolverFactory.hpp:40
Belos::Details::LinearSolverFactory::registerLinearSolverFactory
static void registerLinearSolverFactory()
Register this LinearSolverFactory with the central registry.
Definition
Belos_Details_LinearSolverFactory.hpp:59
Belos::Details::LinearSolver
Belos' implementation of Trilinos::Details::LinearSolver.
Definition
Belos_Details_LinearSolver.hpp:46
Belos::Operator
Alternative run-time polymorphic interface for operators.
Definition
BelosOperator.hpp:48
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Generated for Belos by
1.9.8