OGS
DataHolderLib::BoundaryCondition Class Referencefinal

Detailed Description

Definition at line 17 of file BoundaryCondition.h.

#include <BoundaryCondition.h>

Inheritance diagram for DataHolderLib::BoundaryCondition:
[legend]
Collaboration diagram for DataHolderLib::BoundaryCondition:
[legend]

Public Types

enum class  ConditionType { NONE , DIRICHLET , NEUMANN , ROBIN }
 

Public Member Functions

 BoundaryCondition (ProcessVariable const &process_var, std::string const &param_name, ConditionType type)
 Managing data associated with a boundary condition. More...
 
std::string const getConditionClassStr () const override
 Returns the type of condition for displaying purposes. More...
 
ConditionType getType () const
 Returns the type of boundary condition this is. More...
 
- Public Member Functions inherited from DataHolderLib::FemCondition
 FemCondition (ProcessVariable const &process_var, std::string const &param_name)
 
virtual ~FemCondition ()=default
 
std::string const getProcessVarName () const
 Returns the name of the associated process variable. More...
 
ProcessVariable const & getProcessVar () const
 Returns the numerical order of the process variable. More...
 
std::string const getParamName () const
 Returns the name of the parameter associated with the condition. More...
 
BaseObjType getBaseObjType () const
 Specifies if the condition is set a geometry or on a mesh. More...
 
std::string getBaseObjName () const
 Returns the name of the base object (i.e. geometry or mesh) More...
 
std::string const getObjName () const
 Returns the name of the geometric object. More...
 
void setMesh (std::string const &mesh_name)
 Sets a mesh as corresponding object for the condition. More...
 
virtual void setGeoObject (std::string const &geo_name, std::string const &obj_name)
 Sets a geometric object as corresponding object for the condition. More...
 

Static Public Member Functions

static ConditionType convertStringToType (std::string const &str)
 Converts the type enum into a string. More...
 
static std::string convertTypeToString (ConditionType type)
 Converts a string specifying the type into an enum. More...
 

Private Attributes

ConditionType _type
 

Member Enumeration Documentation

◆ ConditionType

Enumerator
NONE 
DIRICHLET 
NEUMANN 
ROBIN 

Definition at line 20 of file BoundaryCondition.h.

21  {
22  NONE,
23  DIRICHLET,
24  NEUMANN,
25  ROBIN
26  };

Constructor & Destructor Documentation

◆ BoundaryCondition()

DataHolderLib::BoundaryCondition::BoundaryCondition ( ProcessVariable const &  process_var,
std::string const &  param_name,
ConditionType  type 
)

Managing data associated with a boundary condition.

Definition at line 17 of file BoundaryCondition.cpp.

20  : FemCondition(process_var, param_name), _type(type)
21 {
22 }
FemCondition(ProcessVariable const &process_var, std::string const &param_name)

Member Function Documentation

◆ convertStringToType()

BoundaryCondition::ConditionType DataHolderLib::BoundaryCondition::convertStringToType ( std::string const &  str)
static

Converts the type enum into a string.

Definition at line 24 of file BoundaryCondition.cpp.

26 {
27  if (str == "Dirichlet")
28  {
30  }
31  if (str == "Neumann")
32  {
34  }
35  if (str == "Robin")
36  {
37  return ConditionType::ROBIN;
38  }
39 
40  return ConditionType::NONE;
41 }

References DIRICHLET, NEUMANN, NONE, and ROBIN.

◆ convertTypeToString()

std::string DataHolderLib::BoundaryCondition::convertTypeToString ( ConditionType  type)
static

Converts a string specifying the type into an enum.

Definition at line 43 of file BoundaryCondition.cpp.

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 }

References DIRICHLET, NEUMANN, and ROBIN.

Referenced by FemConditionModel::setFemCondition().

◆ getConditionClassStr()

std::string const DataHolderLib::BoundaryCondition::getConditionClassStr ( ) const
inlineoverridevirtual

Returns the type of condition for displaying purposes.

Implements DataHolderLib::FemCondition.

Definition at line 31 of file BoundaryCondition.h.

32  {
33  return "Boundary Condition";
34  }

◆ getType()

ConditionType DataHolderLib::BoundaryCondition::getType ( ) const
inline

Returns the type of boundary condition this is.

Definition at line 37 of file BoundaryCondition.h.

37 { return _type; }

References _type.

Member Data Documentation

◆ _type

ConditionType DataHolderLib::BoundaryCondition::_type
private

Definition at line 46 of file BoundaryCondition.h.

Referenced by getType().


The documentation for this class was generated from the following files: