Chi-Tech
time_integration.cc
Go to the documentation of this file.
1#include "time_integration.h"
2
4
5#define scint static_cast<int>
6
7namespace chi_math
8{
9
11{
13
14 params.AddRequiredParameter<int>("method",
15 "Integer representing time stepping scheme");
16
17 return params;
18}
19
21 : ChiObject(params)
22{
23 const int method_option = params.GetParamValue<int>("method");
24 if (method_option == scint(SteppingMethod::EXPLICIT_EULER))
26 else if (method_option == scint(SteppingMethod::IMPLICIT_EULER))
28 else if (method_option == scint(SteppingMethod::CRANK_NICOLSON))
30 else if (method_option == scint(SteppingMethod::THETA_SCHEME))
32 else
33 ChiInvalidArgument("Unsupported Time Integration scheme");
34}
35
37
38} // namespace chi_math
#define ChiInvalidArgument(message)
static chi::InputParameters GetInputParameters()
Definition: ChiObject.cc:4
void AddRequiredParameter(const std::string &name, const std::string &doc_string)
T GetParamValue(const std::string &param_name) const
static chi::InputParameters GetInputParameters()
SteppingMethod Method() const
TimeIntegration(const chi::InputParameters &params)
#define scint