OGS
BoundaryCondition.cpp
Go to the documentation of this file.
1
12#include "BoundaryCondition.h"
13
14namespace DataHolderLib
15{
18 std::string const& param_name,
19 ConditionType type)
20 : FemCondition(process_var, param_name), _type(type)
21{
22}
23
25 std::string const& str)
26{
27 if (str == "Dirichlet")
28 {
30 }
31 if (str == "Neumann")
32 {
34 }
35 if (str == "Robin")
36 {
38 }
39
41}
42
44{
45 if (type == ConditionType::DIRICHLET)
46 {
47 return "Dirichlet";
48 }
49 if (type == ConditionType::NEUMANN)
50 {
51 return "Neumann";
52 }
53 if (type == ConditionType::ROBIN)
54 {
55 return "Robin";
56 }
57
58 return "";
59}
60
61} // namespace DataHolderLib
static std::string convertTypeToString(ConditionType type)
Converts a string specifying the type into an enum.
BoundaryCondition(ProcessVariable const &process_var, std::string const &param_name, ConditionType type)
Managing data associated with a boundary condition.
static ConditionType convertStringToType(std::string const &str)
Converts the type enum into a string.
Base class for boundary conditions, initial conditions and source terms.