OGS 6.1.0-1699-ge946d4c5f
Property.cpp
Go to the documentation of this file.
1 
14 #include "Property.h"
15 
16 #include <string>
17 
18 namespace MaterialPropertyLib
19 {
20 
22 {
23  return _value;
24 }
27 PropertyDataType Property::value(VariableArray const& /*variable_array*/) const
28 {
29  return _value;
30 }
31 
35  Variables const /*variables*/) const
36 {
37  return _dvalue;
38 }
39 
42  Variables const /*variables*/,
43  Variables const /*variables*/) const
44 {
45  return 0.0;
46 }
47 
48 void Property::notImplemented(const std::string& property,
49  const std::string& material) const
50 {
51  OGS_FATAL("The property '%s' is not available on the '%s' scale",
52  property.c_str(), material.c_str());
53 }
54 } // namespace MaterialPropertyLib
boost::variant< double, Pair, Vector, SymmTensor, Tensor, std::string > PropertyDataType
Definition: Property.h:37
virtual PropertyDataType d2Value(VariableArray const &variable_array, Variables const variables1, Variables const variables2) const
Default implementation: 2nd derivative of any constant property is zero.
Definition: Property.cpp:41
virtual PropertyDataType value() const
Definition: Property.cpp:21
virtual PropertyDataType dValue(VariableArray const &variable_array, Variables const variables) const
Definition: Property.cpp:34
void notImplemented(const std::string &property, const std::string &material) const
Definition: Property.cpp:48
std::array< VariableType, Variables::number_of_variables > VariableArray
Definition: VariableType.h:59
#define OGS_FATAL(fmt,...)
Definition: Error.h:71
PropertyDataType _dvalue
Definition: Property.h:94
PropertyDataType _value
The single value of a property.
Definition: Property.h:93