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

[PL/DS] Explain copy of a curve. Move time intvl.

parent f82b4327
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ DeactivatedSubdomainDirichlet::DeactivatedSubdomainDirichlet(
_subdomain(subdomain),
_variable_id(variable_id),
_component_id(component_id),
_time_interval(time_interval),
_time_interval(std::move(time_interval)),
_active_element_ids(active_element_ids)
{
config(dof_table_bulk);
......
......@@ -119,6 +119,8 @@ static MathLib::PiecewiseLinearInterpolation parseTimeIntervalOrCurve(
if (curve_name)
{
DBUG("Using curve '{:s}'", *curve_name);
// Return a copy of the curve because the time interval in the other
// branch returns a temporary.
return *BaseLib::getOrError(curves, *curve_name,
"Could not find curve.");
}
......@@ -174,7 +176,7 @@ std::unique_ptr<DeactivatedSubdomain const> createDeactivatedSubdomain(
auto const& curve_name =
//! \ogs_file_param{prj__process_variables__process_variable__deactivated_subdomains__deactivated_subdomain__time_curve}
config.getConfigParameterOptional<std::string>("time_curve");
auto const time_interval =
auto time_interval =
parseTimeIntervalOrCurve(time_interval_config, curve_name, curves);
auto const line_segment_config =
......
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