OGS
BoundaryCondition.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#include "BoundaryCondition.h"
5
6namespace DataHolderLib
7{
10 std::string const& param_name,
11 ConditionType type)
12 : FemCondition(process_var, param_name), _type(type)
13{
14}
15
17 std::string const& str)
18{
19 if (str == "Dirichlet")
20 {
22 }
23 if (str == "Neumann")
24 {
26 }
27 if (str == "Robin")
28 {
30 }
31
33}
34
36{
37 if (type == ConditionType::DIRICHLET)
38 {
39 return "Dirichlet";
40 }
41 if (type == ConditionType::NEUMANN)
42 {
43 return "Neumann";
44 }
45 if (type == ConditionType::ROBIN)
46 {
47 return "Robin";
48 }
49
50 return "";
51}
52
53} // 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.
FemCondition(ProcessVariable const &process_var, std::string const &param_name)