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 
15 namespace Tempus {
16 
17 
19 enum Status {
23 };
24 
25 
27 inline
28 const std::string toString(const Status status)
29 {
30  std::string s = "Invalid Status!";
31  switch(status) {
32  case PASSED: { s = "PASSED"; break; }
33  case FAILED: { s = "FAILED"; break; }
34  case WORKING: { s = "WORKING"; break; }
35  default: { s = "Invalid Status!"; break; }
36  }
37  TEUCHOS_TEST_FOR_EXCEPTION(s == "Invalid Status!", std::logic_error,
38  "Error - Invalid status = " << status << "\n");
39  return s;
40 }
41 
42 
43 } // namespace Tempus
44 #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.