Chi-Tech
chi_math_time_stepping.cc
Go to the documentation of this file.
1
#include "
chi_math_time_stepping.h
"
2
3
#include <stdexcept>
4
5
namespace
chi_math
6
{
7
8
#pragma GCC diagnostic push
9
#pragma GCC diagnostic error "-Wswitch-enum"
10
/**Returns the string name of a time stepping method.*/
11
std::string
SteppingMethodStringName
(
SteppingMethod
method)
12
{
13
switch
(method)
14
{
15
case
SteppingMethod::NONE
:
return
"none"
;
16
case
SteppingMethod::EXPLICIT_EULER
:
return
"explicit_euler"
;
17
case
SteppingMethod::IMPLICIT_EULER
:
return
"implicit_euler"
;
18
case
SteppingMethod::CRANK_NICOLSON
:
return
"crank_nicholson"
;
19
case
SteppingMethod::THETA_SCHEME
:
return
"theta_scheme"
;
20
default
:
21
throw
std::logic_error(__PRETTY_FUNCTION__);
22
}
23
}
24
#pragma GCC diagnostic pop
25
26
}
chi_math_time_stepping.h
chi_math
Definition:
chi_runtime.h:42
chi_math::SteppingMethod
SteppingMethod
Definition:
chi_math_time_stepping.h:10
chi_math::SteppingMethod::IMPLICIT_EULER
@ IMPLICIT_EULER
chi_math::SteppingMethod::CRANK_NICOLSON
@ CRANK_NICOLSON
chi_math::SteppingMethod::EXPLICIT_EULER
@ EXPLICIT_EULER
chi_math::SteppingMethod::NONE
@ NONE
chi_math::SteppingMethod::THETA_SCHEME
@ THETA_SCHEME
chi_math::SteppingMethodStringName
std::string SteppingMethodStringName(SteppingMethod method)
Definition:
chi_math_time_stepping.cc:11
framework
math
chi_math_time_stepping.cc
Generated by
1.9.3