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.
 
std::string const getConditionClassStr () const override
 Returns the type of condition for displaying purposes.
 
ConditionType getType () const
 Returns the type of boundary condition this is.
 
- 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.
 
ProcessVariable const & getProcessVar () const
 Returns the numerical order of the process variable.
 
std::string const getParamName () const
 Returns the name of the parameter associated with the condition.
 
BaseObjType getBaseObjType () const
 Specifies if the condition is set a geometry or on a mesh.
 
std::string getBaseObjName () const
 Returns the name of the base object (i.e. geometry or mesh)
 
std::string const getObjName () const
 Returns the name of the geometric object.
 
void setMesh (std::string const &mesh_name)
 Sets a mesh as corresponding object for the condition.
 
virtual void setGeoObject (std::string const &geo_name, std::string const &obj_name)
 Sets a geometric object as corresponding object for the condition.
 

Static Public Member Functions

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

Private Attributes

ConditionType _type
 

Member Enumeration Documentation

◆ ConditionType

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 {
38 }
39
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: