diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 2c5e86d18f4a29bbe82099b6ec8be6dcc0638f9c..d0e92051910bcdb15db524a33f597647049d1b55 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -385,7 +385,7 @@ void ProjectData::parseProcessVariables( "Expected to find a mesh named " + mesh_name + "."); auto pv = ProcessLib::ProcessVariable{var_config, mesh, _mesh_vec, - _parameters}; + _parameters, _curves}; if (!names.insert(pv.getName()).second) { OGS_FATAL("A process variable with name `{:s}' already exists.", diff --git a/ProcessLib/DeactivatedSubdomain.cpp b/ProcessLib/DeactivatedSubdomain.cpp index 3425d570da37ca3437e03eea5a6541f3e6efe055..b2f766f9dd49145d8b993ef169ee16af06d3c80d 100644 --- a/ProcessLib/DeactivatedSubdomain.cpp +++ b/ProcessLib/DeactivatedSubdomain.cpp @@ -110,7 +110,10 @@ static std::unique_ptr<DeactivatedSubdomainMesh> createDeactivatedSubdomainMesh( } std::unique_ptr<DeactivatedSubdomain const> createDeactivatedSubdomain( - BaseLib::ConfigTree const& config, MeshLib::Mesh const& mesh) + BaseLib::ConfigTree const& config, MeshLib::Mesh const& mesh, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves) { //! \ogs_file_param{prj__process_variables__process_variable__deactivated_subdomains__deactivated_subdomain__time_interval} auto const& time_interval_config = config.getConfigSubtree("time_interval"); @@ -165,8 +168,12 @@ std::unique_ptr<DeactivatedSubdomain const> createDeactivatedSubdomain( } std::vector<std::unique_ptr<DeactivatedSubdomain const>> -createDeactivatedSubdomains(BaseLib::ConfigTree const& config, - MeshLib::Mesh const& mesh) +createDeactivatedSubdomains( + BaseLib::ConfigTree const& config, + MeshLib::Mesh const& mesh, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves) { std::vector<std::unique_ptr<DeactivatedSubdomain const>> deactivated_subdomains; @@ -183,7 +190,7 @@ createDeactivatedSubdomains(BaseLib::ConfigTree const& config, subdomains_config->getConfigSubtreeList("deactivated_subdomain")) { deactivated_subdomains.emplace_back( - createDeactivatedSubdomain(subdomain_config, mesh)); + createDeactivatedSubdomain(subdomain_config, mesh, curves)); } } return deactivated_subdomains; diff --git a/ProcessLib/DeactivatedSubdomain.h b/ProcessLib/DeactivatedSubdomain.h index 3c043ad9f6c24f7bcf46374f4e3f8cf5a2d7777b..3cf1be57ba0fc349f2c70dc8aa9fb8743d2a4834 100644 --- a/ProcessLib/DeactivatedSubdomain.h +++ b/ProcessLib/DeactivatedSubdomain.h @@ -64,7 +64,11 @@ struct DeactivatedSubdomain }; std::vector<std::unique_ptr<DeactivatedSubdomain const>> -createDeactivatedSubdomains(BaseLib::ConfigTree const& config, - MeshLib::Mesh const& mesh); +createDeactivatedSubdomains( + BaseLib::ConfigTree const& config, + MeshLib::Mesh const& mesh, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves); } // namespace ProcessLib diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 8bb2524353b5e25f1ff6dc3ac870cd7a6087a4d8..eb6ace6bc5a1edcd412a9132c890a66d3482c5a1 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -92,7 +92,10 @@ ProcessVariable::ProcessVariable( BaseLib::ConfigTree const& config, MeshLib::Mesh& mesh, std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes, - std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters) + std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves) : //! \ogs_file_param{prj__process_variables__process_variable__name} _name(config.getConfigParameter<std::string>("name")), _mesh(mesh), @@ -100,7 +103,8 @@ ProcessVariable::ProcessVariable( _n_components(config.getConfigParameter<int>("components")), //! \ogs_file_param{prj__process_variables__process_variable__order} _shapefunction_order(config.getConfigParameter<unsigned>("order")), - _deactivated_subdomains(createDeactivatedSubdomains(config, mesh)), + _deactivated_subdomains( + createDeactivatedSubdomains(config, mesh, curves)), _initial_condition(ParameterLib::findParameter<double>( //! \ogs_file_param{prj__process_variables__process_variable__initial_condition} config.getConfigParameter<std::string>("initial_condition"), diff --git a/ProcessLib/ProcessVariable.h b/ProcessLib/ProcessVariable.h index afa8edfefb2d022b6d71d5f3d25bef26a7830c27..01edb1583f0d6f8742ba12a862b396214ff30768 100644 --- a/ProcessLib/ProcessVariable.h +++ b/ProcessLib/ProcessVariable.h @@ -50,7 +50,10 @@ public: BaseLib::ConfigTree const& config, MeshLib::Mesh& mesh, std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes, std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& - parameters); + parameters, + std::map<std::string, + std::unique_ptr<MathLib::PiecewiseLinearInterpolation>> const& + curves); ProcessVariable(ProcessVariable&& other);