Debian Codegraph @

packages/belos/tpetra/src/solvers/Belos_Tpetra_RCG.cpp

raw
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 "BelosSolverFactory.hpp"
11 #include "BelosSolverFactory_Tpetra.hpp"
12 #include "BelosRCGSolMgr.hpp"
13 #include "TpetraCore_ETIHelperMacros.h"
14 #include "Teuchos_TypeNameTraits.hpp"
15 #include <iostream>
16
17 namespace BelosTpetra {
18 namespace Impl {
19
20 template<class SC, class LO, class GO, class NT>
21 void register_RCG_tmpl (const bool verbose)
22 {
23 using ::Belos::Impl::registerSolverSubclassForTypes;
24 using MV = ::Tpetra::MultiVector<SC, LO, GO, NT>;
25 using OP = ::Tpetra::Operator<SC, LO, GO, NT>;
26 using solver_type = ::Belos::RCGSolMgr<SC, MV, OP>;
27
28 if (verbose) {
29 using Teuchos::TypeNameTraits;
30 std::cout << "Registering BelosTpetra RCGSolMgr<"
31 << TypeNameTraits<SC>::name () << ", "
32 << TypeNameTraits<LO>::name () << ", "
33 << TypeNameTraits<GO>::name () << ", "
34 << TypeNameTraits<NT>::name () << ">" << std::endl;
35 }
36 const char solverName[] = "RCG";
37 registerSolverSubclassForTypes<solver_type, SC, MV, OP> (solverName);
38 }
39
40 void register_RCG (const bool verbose)
41 {
42 TPETRA_ETI_MANGLING_TYPEDEFS()
43
44 #ifdef BELOS_TPETRA_REGISTER_RCG
45 # undef BELOS_TPETRA_REGISTER_RCG
46 #endif // BELOS_TPETRA_REGISTER_RCG
47 #define BELOS_TPETRA_REGISTER_RCG( SC, LO, GO, NT ) register_RCG_tmpl<SC, LO, GO, NT> (verbose);
48
49 TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR( BELOS_TPETRA_REGISTER_RCG )
50
51 #undef BELOS_TPETRA_REGISTER_RCG
52 }
53
54 } // namespace Impl
55 } // namespace BelosTpetra