Belos
Version of the Day
Loading...
Searching...
No Matches
src
Belos_Details_registerLinearSolverFactory.cpp
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
#include "
Belos_Details_registerLinearSolverFactory.hpp
"
11
#include "
Belos_Details_LinearSolverFactory.hpp
"
12
#include "Teuchos_ConfigDefs.hpp"
// for __attribute__((weak)) check
13
14
// FIXME (mfh 23 Aug 2015) Belos' main library is upstream from
15
// libraries where Belos' Epetra and Tpetra specializations live.
16
// That's why we need to use weak symbols here. Otherwise, link
17
// errors result. Fixing this requires the same run-time registration
18
// solution that Bug 6392 is all about.
19
20
#if defined(HAVE_BELOS_TPETRA) && defined(HAVE_TEUCHOS_CXX_ATTRIBUTE_WEAK)
21
namespace
Belos
{
22
namespace
Details
{
23
namespace
Tpetra {
24
extern
void
__attribute__((weak))
registerLinearSolverFactory
();
25
}
// namespace Tpetra
26
}
// namespace Details
27
}
// namespace Belos
28
#endif
// defined(HAVE_BELOS_TPETRA) && defined(HAVE_TEUCHOS_CXX_ATTRIBUTE_WEAK)
29
30
//
31
// FIXME (mfh 23 Aug 2015) We should add Thyra as well.
32
//
33
34
namespace
Belos
{
35
namespace
Details
{
36
37
void
38
registerLinearSolverFactory
()
39
{
40
#if defined(HAVE_BELOS_TPETRA) && defined(HAVE_TEUCHOS_CXX_ATTRIBUTE_WEAK)
41
// It's a weak symbol, so it might be NULL.
42
if
(::Belos::Details::Tpetra::registerLinearSolverFactory != NULL) {
43
::Belos::Details::Tpetra::registerLinearSolverFactory ();
44
}
45
#endif
// defined(HAVE_BELOS_TPETRA) && defined(HAVE_TEUCHOS_CXX_ATTRIBUTE_WEAK)
46
}
47
48
}
// namespace Details
49
}
// namespace Belos
50
51
Belos_Details_LinearSolverFactory.hpp
Implementation of Trilinos::Details::LinearSolverFactory.
Belos_Details_registerLinearSolverFactory.hpp
Declaration of Belos::Details::registerLinearSolverFactory.
Belos::Details
Definition
Belos_Details_EBelosSolverType.cpp:14
Belos::Details::registerLinearSolverFactory
void registerLinearSolverFactory()
Register Belos' LinearSolverFactory with the central repository, for all enabled combinations of temp...
Definition
Belos_Details_registerLinearSolverFactory.cpp:38
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Generated for Belos by
1.15.0