OGS 6.2.0-244-g47b8a9a9d
ConstantFluidProperty.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "FluidProperty.h"
16 
17 namespace MaterialLib
18 {
19 namespace Fluid
20 {
23 {
24 public:
25  explicit ConstantFluidProperty(const double value)
26  : FluidProperty(), _value(value)
27  {
28  }
29 
31  std::string getName() const override { return "Constant"; }
35  double getValue(const ArrayType& var_vals) const override
36  {
37  (void)var_vals;
38  return _value;
39  }
40 
45  double getdValue(const ArrayType& var_vals,
46  const PropertyVariableType var) const override
47  {
48  (void)var_vals;
49  (void)var;
50  return 0.;
51  }
52 
53 private:
54  const double _value;
55 };
56 
57 } // namespace Fluid
58 } // namespace MaterialLib
double getdValue(const ArrayType &var_vals, const PropertyVariableType var) const override
PropertyVariableType
Variable that determine the property.
std::array< double, PropertyVariableNumber > ArrayType
Definition: FluidProperty.h:28
std::string getName() const override
Get model name.
Base class of fluid properties.
Definition: FluidProperty.h:25
double getValue(const ArrayType &var_vals) const override