Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosTypes.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Belos: Block Linear Solvers Package
4 //
5 // Copyright 2004-2016 NTESS and the Belos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef BELOS_TYPES_HPP
11 #define BELOS_TYPES_HPP
12 
18 #include "BelosConfigDefs.hpp"
19 #include "Teuchos_Assert.hpp"
20 
21 namespace Belos {
22 
24 
25 
28  class BelosError : public std::logic_error {
29  public:
30  BelosError (const std::string& what_arg) : std::logic_error(what_arg) {}
31  };
32 
34 
35 
49  enum ETrans { NOTRANS = 0,
50  TRANS = 1,
51  CONJTRANS = 2
52  };
53 
65  enum NormType { OneNorm,
69  };
70 
91  None,
97  };
98 
112  };
113 
123  enum ReturnType {
126  };
127 
129  std::string
130  convertReturnTypeToString (const ReturnType result);
131 
157  enum StatusType { Passed = 0x1,
158  Failed = 0x2,
159  Undefined = 0x4
160  };
161 
174  enum ResetType { Problem = 0x1,
176  };
177 
179  std::string
180  convertStatusTypeToString (const StatusType status);
181 
183  StatusType
184  convertStringToStatusType (const std::string& status);
185 
187  NormType
188  convertStringToNormType (const std::string& normType);
189 
191  ScaleType
192  convertStringToScaleType (const std::string& scaleType);
193 
195  std::string
196  convertScaleTypeToString (const ScaleType scaleType);
197 
206  enum ConjType {
209  };
210 
222  enum MsgType {
223  Errors= 0,
224  Warnings = 0x1,
226  OrthoDetails = 0x4,
227  FinalSummary = 0x8,
228  TimingDetails = 0x10,
230  Debug = 0x40
231  };
232 
243  std::string
244  convertMsgTypeToString (const MsgType msgType);
245 
261  static const double convTol;
262 
264  static const double polyTol;
265 
267  static const double orthoKappa;
268 
270  static const double resScaleFactor;
271 
273  static const double impTolScale;
274  };
275 
276 
277 } // end Belos namespace
278 
279 #endif /* BELOS_TYPES_HPP */
static const double orthoKappa
DGKS orthogonalization constant.
Definition: BelosTypes.hpp:267
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
Definition: BelosTypes.cpp:74
ScaleType
The type of scaling to use on the residual norm value.
Definition: BelosTypes.hpp:88
MsgType
Available message types recognized by the linear solvers.
Definition: BelosTypes.hpp:222
static const double convTol
Default convergence tolerance.
Definition: BelosTypes.hpp:261
static const double polyTol
Relative residual tolerance for matrix polynomial construction.
Definition: BelosTypes.hpp:264
StatusType
Whether the StatusTest wants iteration to stop.
Definition: BelosTypes.hpp:157
std::string convertStatusTypeToString(const StatusType status)
The string name corresponding to the given StatusType enum value.
Definition: BelosTypes.cpp:34
std::string convertScaleTypeToString(const ScaleType scaleType)
Convert the given ScaleType enum value to its corresponding string.
Definition: BelosTypes.cpp:94
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition: BelosTypes.hpp:49
ConjType
Whether or not to conjugate the transpose for block inner products.
Definition: BelosTypes.hpp:206
ResetType
How to reset the solver.
Definition: BelosTypes.hpp:174
static const double impTolScale
"Implicit Tolerance Scale Factor"
Definition: BelosTypes.hpp:273
NormType convertStringToNormType(const std::string &normType)
Convert the given string to its NormType enum value.
Definition: BelosTypes.cpp:56
std::string convertMsgTypeToString(const MsgType msgType)
Show MsgType as a comma-delimited list of names.
Definition: BelosTypes.cpp:114
BelosError(const std::string &what_arg)
Definition: BelosTypes.hpp:30
ReturnType
Whether the Belos solve converged for all linear systems.
Definition: BelosTypes.hpp:123
NormType
The type of vector norm to compute.
Definition: BelosTypes.hpp:65
std::string convertReturnTypeToString(const ReturnType result)
Convert the given ReturnType enum value to its corresponding string.
Definition: BelosTypes.cpp:165
StatusType convertStringToStatusType(const std::string &status)
The StatusType enum value corresponding to the given string name.
Definition: BelosTypes.cpp:40
Parent class to all Belos exceptions.
Definition: BelosTypes.hpp:28
Default parameters common to most Belos solvers.
Definition: BelosTypes.hpp:251
static const double resScaleFactor
User-defined residual scaling factor.
Definition: BelosTypes.hpp:270
Belos header file which uses auto-configuration information to include necessary C++ headers...
OutputType
Style of output used to display status test information.
Definition: BelosTypes.hpp:109

Generated on Wed Oct 23 2024 09:24:27 for Belos by doxygen 1.8.5