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,
79 };
80
82 {
83 SUCCESS,
94 };
95
97 {
98 SUCCESS,
102 };
103
105 {
106 SUCCESS,
110 };
111
113 {
116 std::string msg;
117 };
118
120 {
123 std::string msg;
124 };
125
127 {
130 std::string msg;
131 };
132
134 {
137 std::string msg;
138 };
139
141 {
144 std::string msg;
145 };
146
152 {
153 public:
154 static LapackError
155 isSuccessAndMsg(const LapackErrorCode &errorCode);
156
157 private:
158 static const std::map<LapackErrorCode, std::string> d_errToMsgMap;
159 }; // end of class LapackErrorMsg
160
166 {
167 public:
168 static LinearSolverError
169 isSuccessAndMsg(const LinearSolverErrorCode &errorCode);
170
171 private:
172 static const std::map<LinearSolverErrorCode, std::string> d_errToMsgMap;
173 }; // end of class LinearSolverErrorMsg
174
176 {
177 public:
178 static EigenSolverError
179 isSuccessAndMsg(const EigenSolverErrorCode &errorCode);
180
181 private:
182 static const std::map<EigenSolverErrorCode, std::string> d_errToMsgMap;
183 }; // end of class EigenSolverErrorMsg
184
186 {
187 public:
190
191 private:
192 static const std::map<OrthonormalizationErrorCode, std::string>
194 }; // end of class OrthonormalizationErrorMsg
195
196
198 {
199 public:
200 static NewtonRaphsonError
201 isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode);
202
203 private:
204 static const std::map<NewtonRaphsonErrorCode, std::string> d_errToMsgMap;
205 }; // end of class NewtonRaphsonErrorMsg
206
207 } // end of namespace linearAlgebra
208} // end of namespace dftefe
209#endif // dftefeLinearAlgebraTypes_h
Definition: LinearAlgebraTypes.h:176
static EigenSolverError isSuccessAndMsg(const EigenSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:144
static const std::map< EigenSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:182
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:152
static LapackError isSuccessAndMsg(const LapackErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:122
static const std::map< LapackErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:158
A class to map Error to a message.
Definition: LinearAlgebraTypes.h:166
static const std::map< LinearSolverErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:172
static LinearSolverError isSuccessAndMsg(const LinearSolverErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:99
Definition: LinearAlgebraTypes.h:198
static const std::map< NewtonRaphsonErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:204
static NewtonRaphsonError isSuccessAndMsg(const NewtonRaphsonErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:190
Definition: LinearAlgebraTypes.h:186
static const std::map< OrthonormalizationErrorCode, std::string > d_errToMsgMap
Definition: LinearAlgebraTypes.h:193
static OrthonormalizationError isSuccessAndMsg(const OrthonormalizationErrorCode &errorCode)
Definition: LinearAlgebraTypes.cpp:166
EigenSolverErrorCode
Definition: LinearAlgebraTypes.h:82
LinearSolverErrorCode
Definition: LinearAlgebraTypes.h:73
NewtonRaphsonErrorCode
Definition: LinearAlgebraTypes.h:105
NonLinearSolverType
Definition: LinearAlgebraTypes.h:47
PreconditionerType
Definition: LinearAlgebraTypes.h:41
LapackErrorCode
Definition: LinearAlgebraTypes.h:60
OrthonormalizationErrorCode
Definition: LinearAlgebraTypes.h:97
LinearSolverType
Definition: LinearAlgebraTypes.h:36
ParallelPrintType
Definition: LinearAlgebraTypes.h:53
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
Definition: LinearAlgebraTypes.h:127
bool isSuccess
Definition: LinearAlgebraTypes.h:128
EigenSolverErrorCode err
Definition: LinearAlgebraTypes.h:129
std::string msg
Definition: LinearAlgebraTypes.h:130
Definition: LinearAlgebraTypes.h:113
std::string msg
Definition: LinearAlgebraTypes.h:116
bool isSuccess
Definition: LinearAlgebraTypes.h:114
LapackErrorCode err
Definition: LinearAlgebraTypes.h:115
Definition: LinearAlgebraTypes.h:120
std::string msg
Definition: LinearAlgebraTypes.h:123
bool isSuccess
Definition: LinearAlgebraTypes.h:121
LinearSolverErrorCode err
Definition: LinearAlgebraTypes.h:122
Definition: LinearAlgebraTypes.h:141
NewtonRaphsonErrorCode err
Definition: LinearAlgebraTypes.h:143
bool isSuccess
Definition: LinearAlgebraTypes.h:142
std::string msg
Definition: LinearAlgebraTypes.h:144
Definition: LinearAlgebraTypes.h:134
OrthonormalizationErrorCode err
Definition: LinearAlgebraTypes.h:136
std::string msg
Definition: LinearAlgebraTypes.h:137
bool isSuccess
Definition: LinearAlgebraTypes.h:135