Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_Types.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_Types_hpp
10 #define Tempus_Types_hpp
11 
12 #include "Tempus_config.hpp"
13 
14 namespace Tempus {
15 
17 enum Status { PASSED,
20 
22 inline const std::string toString(const Status status)
23 {
24  std::string s = "Invalid Status!";
25  switch (status) {
26  case PASSED: {
27  s = "PASSED";
28  break;
29  }
30  case FAILED: {
31  s = "FAILED";
32  break;
33  }
34  case WORKING: {
35  s = "WORKING";
36  break;
37  }
38  default: {
39  s = "Invalid Status!";
40  break;
41  }
42  }
43  TEUCHOS_TEST_FOR_EXCEPTION(s == "Invalid Status!", std::logic_error,
44  "Error - Invalid status = " << status << "\n");
45  return s;
46 }
47 
48 } // namespace Tempus
49 #endif // Tempus_Types_hpp
const std::string toString(const Status status)
Convert Status to string.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Status
Status for the Integrator, the Stepper and the SolutionState.