MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_LowPrecisionFactory_decl.hpp
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
10#ifndef MUELU_LOWPRECISIONFACTORY_DECL_HPP
11#define MUELU_LOWPRECISIONFACTORY_DECL_HPP
12
13#include <string>
14
15#include "MueLu_ConfigDefs.hpp"
17
18#include "MueLu_Level_fwd.hpp"
20
21namespace MueLu {
22
28template <class Scalar = double, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
30#undef MUELU_LOWPRECISIONFACTORY_SHORT
32
33 public:
35
36
38
41
42 RCP<const ParameterList> GetValidParameterList() const;
43
45
47
48
49 void DeclareInput(Level& currentLevel) const;
50
52
54
55
61 void Build(Level& currentLevel) const;
62
64
65}; // class LowPrecisionFactory
66
67#if defined(HAVE_TPETRA_INST_DOUBLE) && defined(HAVE_TPETRA_INST_FLOAT)
68template <class LocalOrdinal, class GlobalOrdinal, class Node>
69class LowPrecisionFactory<double, LocalOrdinal, GlobalOrdinal, Node> : public SingleLevelFactoryBase {
70 typedef double Scalar;
71#undef MUELU_LOWPRECISIONFACTORY_SHORT
73
74 public:
76
77
79
81 virtual ~LowPrecisionFactory() {}
82
83 RCP<const ParameterList> GetValidParameterList() const;
84
86
88
89
90 void DeclareInput(Level& currentLevel) const;
91
93
95
96
102 void Build(Level& currentLevel) const;
103
105
106}; // class LowPrecisionFactory
107#endif
108
109#if defined(HAVE_TPETRA_INST_COMPLEX_DOUBLE) && defined(HAVE_TPETRA_INST_COMPLEX_FLOAT)
110template <class LocalOrdinal, class GlobalOrdinal, class Node>
111class LowPrecisionFactory<std::complex<double>, LocalOrdinal, GlobalOrdinal, Node> : public SingleLevelFactoryBase {
112 typedef std::complex<double> Scalar;
113#undef MUELU_LOWPRECISIONFACTORY_SHORT
115
116 public:
118
119
121
123 virtual ~LowPrecisionFactory() {}
124
125 RCP<const ParameterList> GetValidParameterList() const;
126
128
130
131
132 void DeclareInput(Level& currentLevel) const;
133
135
137
138
144 void Build(Level& currentLevel) const;
145
147
148}; // class LowPrecisionFactory
149#endif
150
151} // namespace MueLu
152
153#define MUELU_LOWPRECISIONFACTORY_SHORT
154#endif // MUELU_LOWPRECISIONFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Factory for converting matrices to half precision operators.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void DeclareInput(Level &currentLevel) const
Input.
void Build(Level &currentLevel) const
Build method.
Base class for factories that use one level (currentLevel).
Namespace for MueLu classes and methods.