Belos  Version of the Day
BelosTypes.hpp
Go to the documentation of this file.
1 //@HEADER
2 // ************************************************************************
3 //
4 // Belos: Block Linear Solvers Package
5 // Copyright 2004 Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ************************************************************************
40 //@HEADER
41 
42 #ifndef BELOS_TYPES_HPP
43 #define BELOS_TYPES_HPP
44 
50 #include "BelosConfigDefs.hpp"
51 #include "Teuchos_Assert.hpp"
52 
53 namespace Belos {
54 
56 
57 
60  class BelosError : public std::logic_error {
61  public:
62  BelosError (const std::string& what_arg) : std::logic_error(what_arg) {}
63  };
64 
66 
67 
81  enum ETrans { NOTRANS = 0,
82  TRANS = 1,
83  CONJTRANS = 2
84  };
85 
97  enum NormType { OneNorm,
100  };
101 
124  };
125 
138  };
139 
149  enum ReturnType {
152  };
153 
155  std::string
156  convertReturnTypeToString (const ReturnType result);
157 
183  enum StatusType { Passed = 0x1,
184  Failed = 0x2,
185  Undefined = 0x4
186  };
187 
200  enum ResetType { Problem = 0x1,
202  };
203 
209  BELOS_DEPRECATED const char*
210  toString (const StatusType status);
211 
213  std::string
214  convertStatusTypeToString (const StatusType status);
215 
217  StatusType
218  convertStringToStatusType (const std::string& status);
219 
221  ScaleType
222  convertStringToScaleType (const std::string& scaleType);
223 
225  std::string
226  convertScaleTypeToString (const ScaleType scaleType);
227 
236  enum ConjType {
239  };
240 
252  enum MsgType {
253  Errors= 0,
254  Warnings = 0x1,
256  OrthoDetails = 0x4,
257  FinalSummary = 0x8,
258  TimingDetails = 0x10,
260  Debug = 0x40
261  };
262 
273  std::string
274  convertMsgTypeToString (const MsgType msgType);
275 
276 } // end Belos namespace
277 
278 #endif /* BELOS_TYPES_HPP */
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
Definition: BelosTypes.cpp:87
ScaleType
The type of scaling to use on the residual norm value.
Definition: BelosTypes.hpp:119
MsgType
Available message types recognized by the linear solvers.
Definition: BelosTypes.hpp:252
StatusType
Whether the StatusTest wants iteration to stop.
Definition: BelosTypes.hpp:183
std::string convertStatusTypeToString(const StatusType status)
The string name corresponding to the given StatusType enum value.
Definition: BelosTypes.cpp:65
std::string convertScaleTypeToString(const ScaleType scaleType)
Convert the given ScaleType enum value to its corresponding string.
Definition: BelosTypes.cpp:107
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition: BelosTypes.hpp:81
ConjType
Whether or not to conjugate the transpose for block inner products.
Definition: BelosTypes.hpp:236
ResetType
How to reset the solver.
Definition: BelosTypes.hpp:200
std::string convertMsgTypeToString(const MsgType msgType)
Show MsgType as a comma-delimited list of names.
Definition: BelosTypes.cpp:127
BelosError(const std::string &what_arg)
Definition: BelosTypes.hpp:62
ReturnType
Whether the Belos solve converged for all linear systems.
Definition: BelosTypes.hpp:149
NormType
The type of vector norm to compute.
Definition: BelosTypes.hpp:97
std::string convertReturnTypeToString(const ReturnType result)
Convert the given ReturnType enum value to its corresponding string.
Definition: BelosTypes.cpp:178
StatusType convertStringToStatusType(const std::string &status)
The StatusType enum value corresponding to the given string name.
Definition: BelosTypes.cpp:71
BELOS_DEPRECATED const char * toString(const StatusType status)
The string name corresponding to the given StatusType enum value.
Parent class to all Belos exceptions.
Definition: BelosTypes.hpp:60
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:136

Generated on Thu Jul 21 2016 14:43:57 for Belos by doxygen 1.8.11