Skip to content
Snippets Groups Projects
Commit 0c1d852e authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'MPL_fixing' into 'master'

Fixed a bug in MPL/Curve

See merge request ogs/ogs!3471
parents 25f1eb4e 052f28f9
No related branches found
No related tags found
No related merge requests found
...@@ -30,10 +30,15 @@ PropertyDataType Curve::value(VariableArray const& variable_array, ...@@ -30,10 +30,15 @@ PropertyDataType Curve::value(VariableArray const& variable_array,
} }
PropertyDataType Curve::dValue(VariableArray const& variable_array, PropertyDataType Curve::dValue(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 /*dt*/) const double const /*t*/, double const /*dt*/) const
{ {
if (primary_variable != independent_variable_)
{
return 0.0;
}
auto const x = std::get<double>( auto const x = std::get<double>(
variable_array[static_cast<int>(independent_variable_)]); variable_array[static_cast<int>(independent_variable_)]);
return curve_.getDerivative(x); return curve_.getDerivative(x);
......
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