OGS 6.2.1-97-g73d1aeda3
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 }
25 
29  ParameterLib::SpatialPosition const& /*pos*/,
30  double const /*t*/) const
31 {
32  return _value;
33 }
34 
38  Variable const /*variable*/) const
39 {
40  return _dvalue;
41 }
42 
45  Variable const /*variable*/,
46  Variable const /*variable*/) const
47 {
48  return 0.0;
49 }
50 
51 void Property::notImplemented(const std::string& property,
52  const std::string& material) const
53 {
54  OGS_FATAL("The property '%s' is not available on the '%s' scale",
55  property.c_str(), material.c_str());
56 }
57 } // namespace MaterialPropertyLib
std::variant< double, Pair, Vector, Tensor2d, SymmTensor, Tensor, std::string > PropertyDataType
Definition: Property.h:39
virtual PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2) const
Default implementation: 2nd derivative of any constant property is zero.
Definition: Property.cpp:44
virtual PropertyDataType value() const
Definition: Property.cpp:21
void notImplemented(const std::string &property, const std::string &material) const
Definition: Property.cpp:51
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
Definition: VariableType.h:62
#define OGS_FATAL(fmt,...)
Definition: Error.h:63
PropertyDataType _dvalue
Definition: Property.h:102
virtual PropertyDataType dValue(VariableArray const &variable_array, Variable const variable) const
Definition: Property.cpp:37
PropertyDataType _value
The single value of a property.
Definition: Property.h:101