Skip to content
Snippets Groups Projects
Commit 05b8f273 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MPL] Rename ParameterProperty -> Parameter for consistency.

parent 9a5386d8
No related branches found
No related tags found
No related merge requests found
...@@ -10,17 +10,17 @@ ...@@ -10,17 +10,17 @@
* http://www.opengeosys.org/project/license * http://www.opengeosys.org/project/license
*/ */
#include "CreateParameterProperty.h" #include "CreateParameter.h"
#include "BaseLib/ConfigTree.h" #include "BaseLib/ConfigTree.h"
#include "ParameterLib/Parameter.h" #include "ParameterLib/Parameter.h"
#include "ParameterLib/Utils.h" #include "ParameterLib/Utils.h"
#include "ParameterProperty.h" #include "Parameter.h"
namespace MaterialPropertyLib namespace MaterialPropertyLib
{ {
std::unique_ptr<ParameterProperty> createParameterProperty( std::unique_ptr<Parameter> createParameterProperty(
BaseLib::ConfigTree const& config, BaseLib::ConfigTree const& config,
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters) std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters)
{ {
...@@ -38,7 +38,7 @@ std::unique_ptr<ParameterProperty> createParameterProperty( ...@@ -38,7 +38,7 @@ std::unique_ptr<ParameterProperty> createParameterProperty(
config.getConfigParameter<std::string>("parameter_name"); config.getConfigParameter<std::string>("parameter_name");
auto const& parameter = ParameterLib::findParameter<double>( auto const& parameter = ParameterLib::findParameter<double>(
parameter_name, parameters, 0, nullptr); parameter_name, parameters, 0, nullptr);
return std::make_unique<MaterialPropertyLib::ParameterProperty>( return std::make_unique<MaterialPropertyLib::Parameter>(
std::move(property_name), parameter); std::move(property_name), parameter);
} }
} // namespace MaterialPropertyLib } // namespace MaterialPropertyLib
...@@ -22,7 +22,7 @@ class ConfigTree; ...@@ -22,7 +22,7 @@ class ConfigTree;
namespace MaterialPropertyLib namespace MaterialPropertyLib
{ {
class ParameterProperty; class Parameter;
} }
namespace ParameterLib namespace ParameterLib
...@@ -32,7 +32,7 @@ struct ParameterBase; ...@@ -32,7 +32,7 @@ struct ParameterBase;
namespace MaterialPropertyLib namespace MaterialPropertyLib
{ {
std::unique_ptr<ParameterProperty> createParameterProperty( std::unique_ptr<Parameter> createParameterProperty(
BaseLib::ConfigTree const& config, BaseLib::ConfigTree const& config,
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
parameters); parameters);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "CreateExponential.h" #include "CreateExponential.h"
#include "CreateIdealGasLaw.h" #include "CreateIdealGasLaw.h"
#include "CreateLinear.h" #include "CreateLinear.h"
#include "CreateParameterProperty.h" #include "CreateParameter.h"
#include "CreatePermeabilityOrthotropicPowerLaw.h" #include "CreatePermeabilityOrthotropicPowerLaw.h"
#include "CreatePorosityFromMassBalance.h" #include "CreatePorosityFromMassBalance.h"
#include "CreateSaturationDependentSwelling.h" #include "CreateSaturationDependentSwelling.h"
......
...@@ -8,35 +8,34 @@ ...@@ -8,35 +8,34 @@
* http://www.opengeosys.org/project/license * http://www.opengeosys.org/project/license
*/ */
#include "MaterialLib/MPL/Properties/ParameterProperty.h" #include "MaterialLib/MPL/Properties/Parameter.h"
namespace MaterialPropertyLib namespace MaterialPropertyLib
{ {
ParameterProperty::ParameterProperty( Parameter::Parameter(std::string name,
std::string name, ParameterLib::Parameter<double> const& parameter) ParameterLib::Parameter<double> const& parameter)
: parameter_(parameter) : parameter_(parameter)
{ {
name_ = std::move(name); name_ = std::move(name);
} }
PropertyDataType ParameterProperty::value( PropertyDataType Parameter::value(VariableArray const& /*variable_array*/,
VariableArray const& /*variable_array*/, ParameterLib::SpatialPosition const& pos,
ParameterLib::SpatialPosition const& pos, double const t, double const t, double const /*dt*/) const
double const /*dt*/) const
{ {
return fromVector(parameter_(t, pos)); return fromVector(parameter_(t, pos));
} }
PropertyDataType ParameterProperty::dValue( PropertyDataType Parameter::dValue(VariableArray const& /*variable_array*/,
VariableArray const& /*variable_array*/, Variable const /*primary_variable*/,
Variable const /*primary_variable*/, ParameterLib::SpatialPosition const& /*pos*/,
ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/, double const /*t*/,
double const /*dt*/) const double const /*dt*/) const
{ {
return double{}; return double{};
} }
PropertyDataType ParameterProperty::d2Value( PropertyDataType Parameter::d2Value(
VariableArray const& /*variable_array*/, Variable const /*pv1*/, VariableArray const& /*variable_array*/, Variable const /*pv1*/,
Variable const /*pv2*/, ParameterLib::SpatialPosition const& /*pos*/, Variable const /*pv2*/, ParameterLib::SpatialPosition const& /*pos*/,
double const /*t*/, double const /*dt*/) const double const /*t*/, double const /*dt*/) const
......
...@@ -19,11 +19,11 @@ namespace MaterialPropertyLib ...@@ -19,11 +19,11 @@ namespace MaterialPropertyLib
/// The parameter property class. The property reads the value from a parameter. /// The parameter property class. The property reads the value from a parameter.
/// The current implementation accepts only the double datatype defined in /// The current implementation accepts only the double datatype defined in
/// PropertyDataType. /// PropertyDataType.
class ParameterProperty final : public Property class Parameter final : public Property
{ {
public: public:
ParameterProperty(std::string name, Parameter(std::string name,
ParameterLib::Parameter<double> const& parameter); ParameterLib::Parameter<double> const& parameter);
/// This method computes the value of a property depending linearly on /// This method computes the value of a property depending linearly on
/// the value of the given primary variable. /// the value of the given primary variable.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Exponential.h" #include "Exponential.h"
#include "IdealGasLaw.h" #include "IdealGasLaw.h"
#include "Linear.h" #include "Linear.h"
#include "ParameterProperty.h" #include "Parameter.h"
#include "PorosityFromMassBalance.h" #include "PorosityFromMassBalance.h"
#include "RelativePermeability/RelPermBrooksCorey.h" #include "RelativePermeability/RelPermBrooksCorey.h"
#include "RelativePermeability/RelPermLiakopoulos.h" #include "RelativePermeability/RelPermLiakopoulos.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment