MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_Details_registerLinearSolverFactory.cpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// MueLu: A package for multigrid based preconditioning
4//
5// Copyright 2012 NTESS and the MueLu contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
12#include "Tpetra_MultiVector.hpp"
13#include "Tpetra_Operator.hpp"
14#ifdef HAVE_MUELU_EPETRA
15#include "Epetra_MultiVector.h"
16#include "Epetra_Operator.h"
17#endif
18#include "TpetraCore_ETIHelperMacros.h"
19
20// Define Tpetra instantiation macros and typedefs that make the
21// macros work. The fix for Bug 6380 makes this work whether or not
22// ETI is ON. We use the Tpetra macros because MueLu doesn't have
23// its own macos.
24TPETRA_ETI_MANGLING_TYPEDEFS()
25
26// Macro that registers MueLu's LinearSolverFactory for Tpetra
27// objects, for the given four template parameters (Scalar = SC,
28// LocalOrdinal = LO, GlobalOrdinal = GO, Node = NT). The macro is
29// local to this file.
30//
31// NOTE: This macro does NOT do explicit instantiation! That's why I
32// call it LCL_CALL and not LCL_INST. We are just using the macros to
33// invoke this class method over the set of enabled template
34// parameters.
35#define LCL_CALL(SC, LO, GO, NT) \
36 ::MueLu::Details::LinearSolverFactory<Tpetra::MultiVector<SC, LO, GO, NT>, \
37 Tpetra::Operator<SC, LO, GO, NT>, \
38 typename Tpetra::MultiVector<SC, LO, GO, NT>::mag_type>::registerLinearSolverFactory();
39
40namespace MueLu {
41namespace Details {
42
44 // Fill in the body of the function with all the type-specific
45 // run-time registration functions, for registering MueLu's
46 // LinearSolverFactory with Tpetra objects.
47 TPETRA_INSTANTIATE_SLGN_NO_ORDINAL_SCALAR(LCL_CALL)
48
49 // If Epetra is enabled in MueLu, also register MueLu's
50 // LinearSolverFactory for Epetra objects.
51#ifdef HAVE_MUELU_EPETRA
54#endif // HAVE_MUELU_EPETRA
55}
56
57} // namespace Details
58} // namespace MueLu
#define LCL_CALL(SC, LO, GO, NT)
Declaration of MueLu::Details::registerLinearSolverFactory.
Interface for a "factory" that creates MueLu solvers.
void registerLinearSolverFactory()
Register MueLu's LinearSolverFactory with the central repository, for all enabled combinations of tem...
Namespace for MueLu classes and methods.