OGS
BoundaryCondition.cpp
Go to the documentation of this file.
1
12
#include "
BoundaryCondition.h
"
13
14
namespace
DataHolderLib
15
{
17
BoundaryCondition::BoundaryCondition
(
ProcessVariable
const
& process_var,
18
std::string
const
& param_name,
19
ConditionType
type)
20
:
FemCondition
(process_var, param_name), _type(type)
21
{
22
}
23
24
BoundaryCondition::ConditionType
BoundaryCondition::convertStringToType
(
25
std::string
const
& str)
26
{
27
if
(str ==
"Dirichlet"
)
28
{
29
return
ConditionType::DIRICHLET
;
30
}
31
if
(str ==
"Neumann"
)
32
{
33
return
ConditionType::NEUMANN
;
34
}
35
if
(str ==
"Robin"
)
36
{
37
return
ConditionType::ROBIN
;
38
}
39
40
return
ConditionType::NONE
;
41
}
42
43
std::string
BoundaryCondition::convertTypeToString
(
ConditionType
type)
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
BoundaryCondition.h
DataHolderLib::BoundaryCondition::convertTypeToString
static std::string convertTypeToString(ConditionType type)
Converts a string specifying the type into an enum.
Definition
BoundaryCondition.cpp:43
DataHolderLib::BoundaryCondition::BoundaryCondition
BoundaryCondition(ProcessVariable const &process_var, std::string const ¶m_name, ConditionType type)
Managing data associated with a boundary condition.
Definition
BoundaryCondition.cpp:17
DataHolderLib::BoundaryCondition::convertStringToType
static ConditionType convertStringToType(std::string const &str)
Converts the type enum into a string.
Definition
BoundaryCondition.cpp:24
DataHolderLib::BoundaryCondition::ConditionType
ConditionType
Definition
BoundaryCondition.h:21
DataHolderLib::BoundaryCondition::ConditionType::NEUMANN
@ NEUMANN
DataHolderLib::BoundaryCondition::ConditionType::NONE
@ NONE
DataHolderLib::BoundaryCondition::ConditionType::ROBIN
@ ROBIN
DataHolderLib::BoundaryCondition::ConditionType::DIRICHLET
@ DIRICHLET
DataHolderLib::FemCondition
Base class for boundary conditions, initial conditions and source terms.
Definition
FemCondition.h:40
DataHolderLib
Definition
MeshElementRemovalDialog.h:26
DataHolderLib::ProcessVariable
Definition
FemCondition.h:19
Applications
DataHolderLib
BoundaryCondition.cpp
Generated by
1.12.0