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 {
129 std::string msg;
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
172 {
173 public:
174 static LapackError
175 isSuccessAndMsg(const LapackErrorCode &errorCode);
176
177 private:
178 static const std::map<LapackErrorCode, std::string> d_errToMsgMap;
179 }; // end of class LapackErrorMsg
180
186 {
187 public:
188 static ScalapackError
189 isSuccessAndMsg(const ScalapackErrorCode &errorCode);
190
191 private:
192 static const std::map<ScalapackErrorCode, std::string> d_errToMsgMap;
193 }; // end of class LapackErrorMsg
194
200 {
201 public:
202 static LinearSolverError
203 isSuccessAndMsg(const LinearSolverErrorCode &errorCode);
204
205 private:
206 static const std::map<LinearSolverErrorCode, std::string> d_errToMsgMap;
207 }; // end of class LinearSolverErrorMsg
208
210 {
211 public:
212 static EigenSolverError
213 isSuccessAndMsg(const EigenSolverErrorCode &errorCode);
214
215 private:
216 static const std::map<EigenSolverErrorCode, std::string> d_errToMsgMap;
217 }; // end of class EigenSolverErrorMsg
218
220 {
221 public:
224
225 private:
226 static const std::map<OrthonormalizationErrorCode, std::string>
228 }; // end of class OrthonormalizationErrorMsg
229
230
232 {
233 public:
234 static NewtonRaphsonError
235 isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode);
236
237 private:
238 static const std::map<NewtonRaphsonErrorCode, std::string> d_errToMsgMap;
239 }; // end of class NewtonRaphsonErrorMsg
240
241 } // end of namespace linearAlgebra
242} // end of namespace dftefe
243#endif // dftefeLinearAlgebraTypes_h
Definition: LinearAlgebraTypes.h:210
static EigenSolverError isSuccessAndMsg(const EigenSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:185
static const std::map< EigenSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:216
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:172
static LapackError isSuccessAndMsg(const LapackErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:141
static const std::map< LapackErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:178
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:200
static const std::map< LinearSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:206
static LinearSolverError isSuccessAndMsg(const LinearSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:118
Definition: LinearAlgebraTypes.h:232
static const std::map< NewtonRaphsonErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:238
static NewtonRaphsonError isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:231
Definition: LinearAlgebraTypes.h:220
static const std::map< OrthonormalizationErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:227
static OrthonormalizationError isSuccessAndMsg(const OrthonormalizationErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:207
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:186
static ScalapackError isSuccessAndMsg(const ScalapackErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:163
static const std::map< ScalapackErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:192
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
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:147
bool isSuccess
Definition: LinearAlgebraTypes.h:148
EigenSolverErrorCode err
Definition: LinearAlgebraTypes.h:149
std::string msg
Definition: LinearAlgebraTypes.h:150
Definition: LinearAlgebraTypes.h:126
std::string msg
Definition: LinearAlgebraTypes.h:129
bool isSuccess
Definition: LinearAlgebraTypes.h:127
LapackErrorCode err
Definition: LinearAlgebraTypes.h:128
Definition: LinearAlgebraTypes.h:140
std::string msg
Definition: LinearAlgebraTypes.h:143
bool isSuccess
Definition: LinearAlgebraTypes.h:141
LinearSolverErrorCode err
Definition: LinearAlgebraTypes.h:142
Definition: LinearAlgebraTypes.h:161
NewtonRaphsonErrorCode err
Definition: LinearAlgebraTypes.h:163
bool isSuccess
Definition: LinearAlgebraTypes.h:162
std::string msg
Definition: LinearAlgebraTypes.h:164
Definition: LinearAlgebraTypes.h:154
OrthonormalizationErrorCode err
Definition: LinearAlgebraTypes.h:156
std::string msg
Definition: LinearAlgebraTypes.h:157
bool isSuccess
Definition: LinearAlgebraTypes.h:155
Definition: LinearAlgebraTypes.h:133
ScalapackErrorCode err
Definition: LinearAlgebraTypes.h:135
bool isSuccess
Definition: LinearAlgebraTypes.h:134
std::string msg
Definition: LinearAlgebraTypes.h:136