DFT-EFE
 
Loading...
Searching...
No Matches
LinearAlgebraTypes.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Bikash Kanungo, Avirup Sircar
24 */
25
26#ifndef dftefeLinearAlgebraTypes_h
27#define dftefeLinearAlgebraTypes_h
28
29#include <map>
30#include <string>
31namespace dftefe
32{
33 namespace linearAlgebra
34 {
36 {
37 CG
38 };
39
41 {
42 NONE,
43 JACOBI
44 };
45
47 {
48 CG,
49 LBFGS
50 };
51
53 {
54 NONE,
56 ALL
57 };
58
59 enum class LapackErrorCode
60 {
61 SUCCESS,
70 };
71
73 {
74 SUCCESS,
81 };
82
84 {
85 SUCCESS,
90 };
91
93 {
94 SUCCESS,
106 };
107
109 {
110 SUCCESS,
115 };
116
118 {
119 SUCCESS,
123 };
124
126 {
127 SUCCESS,
130 };
131
133 {
136 std::string msg;
137 };
138
140 {
143 std::string msg;
144 };
145
147 {
150 std::string msg;
151 };
152
154 {
157 std::string msg;
158 };
159
161 {
164 std::string msg;
165 };
166
168 {
171 std::string msg;
172 };
173
175 {
178 std::string msg;
179 };
180
186 {
187 public:
188 static LapackError
189 isSuccessAndMsg(const LapackErrorCode &errorCode);
190
191 private:
192 static const std::map<LapackErrorCode, std::string> d_errToMsgMap;
193 }; // end of class LapackErrorMsg
194
200 {
201 public:
202 static ScalapackError
203 isSuccessAndMsg(const ScalapackErrorCode &errorCode);
204
205 private:
206 static const std::map<ScalapackErrorCode, std::string> d_errToMsgMap;
207 }; // end of class LapackErrorMsg
208
214 {
215 public:
216 static LinearSolverError
217 isSuccessAndMsg(const LinearSolverErrorCode &errorCode);
218
219 private:
220 static const std::map<LinearSolverErrorCode, std::string> d_errToMsgMap;
221 }; // end of class LinearSolverErrorMsg
222
224 {
225 public:
226 static EigenSolverError
227 isSuccessAndMsg(const EigenSolverErrorCode &errorCode);
228
229 private:
230 static const std::map<EigenSolverErrorCode, std::string> d_errToMsgMap;
231 }; // end of class EigenSolverErrorMsg
232
234 {
235 public:
238
239 private:
240 static const std::map<OrthonormalizationErrorCode, std::string>
242 }; // end of class OrthonormalizationErrorMsg
243
244
246 {
247 public:
248 static NewtonRaphsonError
249 isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode);
250
251 private:
252 static const std::map<NewtonRaphsonErrorCode, std::string> d_errToMsgMap;
253 }; // end of class NewtonRaphsonErrorMsg
254
256 {
257 public:
258 static BisectionError
259 isSuccessAndMsg(const BisectionErrorCode &errorCode);
260
261 private:
262 static const std::map<BisectionErrorCode, std::string> d_errToMsgMap;
263 }; // end of class BisectionErrorMsg
264
265 } // end of namespace linearAlgebra
266} // end of namespace dftefe
267#endif // dftefeLinearAlgebraTypes_h
Definition: LinearAlgebraTypes.h:256
static BisectionError isSuccessAndMsg(const BisectionErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:259
static const std::map< BisectionErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:262
Definition: LinearAlgebraTypes.h:224
static EigenSolverError isSuccessAndMsg(const EigenSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:191
static const std::map< EigenSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:230
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:186
static LapackError isSuccessAndMsg(const LapackErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:147
static const std::map< LapackErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:192
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:214
static const std::map< LinearSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:220
static LinearSolverError isSuccessAndMsg(const LinearSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:124
Definition: LinearAlgebraTypes.h:246
static const std::map< NewtonRaphsonErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:252
static NewtonRaphsonError isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:237
Definition: LinearAlgebraTypes.h:234
static const std::map< OrthonormalizationErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:241
static OrthonormalizationError isSuccessAndMsg(const OrthonormalizationErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:213
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:200
static ScalapackError isSuccessAndMsg(const ScalapackErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:169
static const std::map< ScalapackErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:206
EigenSolverErrorCode
Definition: LinearAlgebraTypes.h:93
LinearSolverErrorCode
Definition: LinearAlgebraTypes.h:84
NewtonRaphsonErrorCode
Definition: LinearAlgebraTypes.h:118
NonLinearSolverType
Definition: LinearAlgebraTypes.h:47
ScalapackErrorCode
Definition: LinearAlgebraTypes.h:73
PreconditionerType
Definition: LinearAlgebraTypes.h:41
BisectionErrorCode
Definition: LinearAlgebraTypes.h:126
LapackErrorCode
Definition: LinearAlgebraTypes.h:60
OrthonormalizationErrorCode
Definition: LinearAlgebraTypes.h:109
LinearSolverType
Definition: LinearAlgebraTypes.h:36
ParallelPrintType
Definition: LinearAlgebraTypes.h:53
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
Definition: LinearAlgebraTypes.h:175
BisectionErrorCode err
Definition: LinearAlgebraTypes.h:177
bool isSuccess
Definition: LinearAlgebraTypes.h:176
std::string msg
Definition: LinearAlgebraTypes.h:178
Definition: LinearAlgebraTypes.h:154
bool isSuccess
Definition: LinearAlgebraTypes.h:155
EigenSolverErrorCode err
Definition: LinearAlgebraTypes.h:156
std::string msg
Definition: LinearAlgebraTypes.h:157
Definition: LinearAlgebraTypes.h:133
std::string msg
Definition: LinearAlgebraTypes.h:136
bool isSuccess
Definition: LinearAlgebraTypes.h:134
LapackErrorCode err
Definition: LinearAlgebraTypes.h:135
Definition: LinearAlgebraTypes.h:147
std::string msg
Definition: LinearAlgebraTypes.h:150
bool isSuccess
Definition: LinearAlgebraTypes.h:148
LinearSolverErrorCode err
Definition: LinearAlgebraTypes.h:149
Definition: LinearAlgebraTypes.h:168
NewtonRaphsonErrorCode err
Definition: LinearAlgebraTypes.h:170
bool isSuccess
Definition: LinearAlgebraTypes.h:169
std::string msg
Definition: LinearAlgebraTypes.h:171
Definition: LinearAlgebraTypes.h:161
OrthonormalizationErrorCode err
Definition: LinearAlgebraTypes.h:163
std::string msg
Definition: LinearAlgebraTypes.h:164
bool isSuccess
Definition: LinearAlgebraTypes.h:162
Definition: LinearAlgebraTypes.h:140
ScalapackErrorCode err
Definition: LinearAlgebraTypes.h:142
bool isSuccess
Definition: LinearAlgebraTypes.h:141
std::string msg
Definition: LinearAlgebraTypes.h:143