OGS
DataHolderLib::SourceTerm Class Referencefinal

Detailed Description

Managing data associated with a source term.

Definition at line 18 of file SourceTerm.h.

#include <SourceTerm.h>

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

Public Types

enum class  ConditionType { NONE , NODAL , VOLUME }
 

Public Member Functions

 SourceTerm (ProcessVariable const &process_var, std::string const &param_name, ConditionType type)
 
std::string const getConditionClassStr () const override
 Returns the type of condition for displaying purposes.
 
ConditionType getType () const
 Returns the type of source term 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 std::string convertTypeToString (ConditionType type)
 Converts the type enum into a string.
 
static ConditionType convertStringToType (std::string const &str)
 Converts a string specifying the type into an enum.
 

Private Attributes

ConditionType _type
 

Member Enumeration Documentation

◆ ConditionType

Constructor & Destructor Documentation

◆ SourceTerm()

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

Definition at line 16 of file SourceTerm.cpp.

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

Member Function Documentation

◆ convertStringToType()

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

Converts a string specifying the type into an enum.

Definition at line 22 of file SourceTerm.cpp.

24{
25 if (str == "Nodal")
26 {
28 }
29 if (str == "Volume")
30 {
32 }
33
35}

References NODAL, NONE, and VOLUME.

◆ convertTypeToString()

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

Converts the type enum into a string.

Definition at line 37 of file SourceTerm.cpp.

38{
39 if (type == ConditionType::NODAL)
40 {
41 return "Nodal";
42 }
43 if (type == ConditionType::VOLUME)
44 {
45 return "Volume";
46 }
47
48 return "";
49}

References NODAL, and VOLUME.

Referenced by FemConditionModel::setFemCondition().

◆ getConditionClassStr()

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

Returns the type of condition for displaying purposes.

Implements DataHolderLib::FemCondition.

Definition at line 31 of file SourceTerm.h.

32 {
33 return "Source Term";
34 }

◆ getType()

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

Returns the type of source term this is.

Definition at line 37 of file SourceTerm.h.

37{ return _type; }

References _type.

Member Data Documentation

◆ _type

ConditionType DataHolderLib::SourceTerm::_type
private

Definition at line 46 of file SourceTerm.h.

Referenced by getType().


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