OGS
MaterialPropertyLib::Parameter Class Referencefinal

Detailed Description

The parameter property class. The property reads the value from a parameter. The current implementation accepts only the double datatype defined in PropertyDataType.

Definition at line 21 of file Parameter.h.

#include <Parameter.h>

Inheritance diagram for MaterialPropertyLib::Parameter:
[legend]
Collaboration diagram for MaterialPropertyLib::Parameter:
[legend]

Public Member Functions

 Parameter (std::string name, ParameterLib::Parameter< double > const &parameter)
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
 
PropertyDataType d2Value (VariableArray const &variable_array, Variable const pv1, Variable const pv2, ParameterLib::SpatialPosition const &, double const, double const) const override
 
- Public Member Functions inherited from MaterialPropertyLib::Property
virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation:
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Private Attributes

ParameterLib::Parameter< double > const & parameter_
 

Additional Inherited Members

- Protected Attributes inherited from MaterialPropertyLib::Property
std::string name_
 
PropertyDataType value_
 The single value of a property.
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Constructor & Destructor Documentation

◆ Parameter()

MaterialPropertyLib::Parameter::Parameter ( std::string name,
ParameterLib::Parameter< double > const & parameter )

Definition at line 15 of file Parameter.cpp.

17 : parameter_(parameter)
18{
19 name_ = std::move(name);
20}
ParameterLib::Parameter< double > const & parameter_
Definition Parameter.h:54

References MaterialPropertyLib::name, and MaterialPropertyLib::Property::name_.

Member Function Documentation

◆ d2Value()

PropertyDataType MaterialPropertyLib::Parameter::d2Value ( VariableArray const & variable_array,
Variable const pv1,
Variable const pv2,
ParameterLib::SpatialPosition const & ,
double const ,
double const  ) const
overridevirtual

This method will compute the second derivative of a property with respect to the given primary variables pv1 and pv2.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 46 of file Parameter.cpp.

50{
51 return double{};
52}

◆ dValue()

PropertyDataType MaterialPropertyLib::Parameter::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & ,
double const ,
double const  ) const
overridevirtual

This method will compute the derivative of a property with respect to the given primary variable.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 37 of file Parameter.cpp.

42{
43 return double{};
44}

◆ value() [1/2]

PropertyDataType MaterialPropertyLib::Parameter::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This method computes the value of a property depending linearly on the value of the given primary variable.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 22 of file Parameter.cpp.

25{
26 return fromVector(parameter_(t, pos));
27}
PropertyDataType fromVector(std::vector< double > const &values)
Definition Property.cpp:23

References MaterialPropertyLib::fromVector(), and parameter_.

◆ value() [2/2]

PropertyDataType MaterialPropertyLib::Parameter::value ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This virtual method will compute the property value based on the variables that are passed as arguments and the variables from the previous time step.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 29 of file Parameter.cpp.

33{
34 return fromVector(parameter_(t, pos));
35}

References MaterialPropertyLib::fromVector(), and parameter_.

Member Data Documentation

◆ parameter_

ParameterLib::Parameter<double> const& MaterialPropertyLib::Parameter::parameter_
private

Definition at line 54 of file Parameter.h.

Referenced by value(), and value().


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