diff --git a/ParameterLib/FunctionParameter.cpp b/ParameterLib/FunctionParameter.cpp index aae327c4727187ff7d73f4b65532206d07fa848c..11da80a75809b894742d1f35b191db2e1d6877ac 100644 --- a/ParameterLib/FunctionParameter.cpp +++ b/ParameterLib/FunctionParameter.cpp @@ -11,13 +11,11 @@ #include "FunctionParameter.h" #include "BaseLib/ConfigTree.h" -#include "MeshLib/Mesh.h" namespace ParameterLib { std::unique_ptr<ParameterBase> createFunctionParameter( - std::string const& name, BaseLib::ConfigTree const& config, - MeshLib::Mesh const& mesh) + std::string const& name, BaseLib::ConfigTree const& config) { //! \ogs_file_param{prj__parameters__parameter__type} config.checkConfigParameter("type", "Function"); @@ -31,8 +29,7 @@ std::unique_ptr<ParameterBase> createFunctionParameter( vec_expressions.emplace_back(expression_str); } - return std::make_unique<FunctionParameter<double>>(name, mesh, - vec_expressions); + return std::make_unique<FunctionParameter<double>>(name, vec_expressions); } } // namespace ParameterLib diff --git a/ParameterLib/FunctionParameter.h b/ParameterLib/FunctionParameter.h index 362dfe66e493a79ed723321a8ade3524b5286bcd..6f486b9f364cc35da9674d1e42b503b79a3af48d 100644 --- a/ParameterLib/FunctionParameter.h +++ b/ParameterLib/FunctionParameter.h @@ -15,9 +15,6 @@ #include <exprtk.hpp> -#include "MeshLib/Elements/Element.h" -#include "MeshLib/Node.h" - #include "Parameter.h" #include "Utils.h" @@ -40,14 +37,12 @@ struct FunctionParameter final : public Parameter<T> * Constructing from a vector of expressions * * @param name the parameter's name - * @param mesh the parameter's domain of definition. * @param vec_expression_str a vector of mathematical expressions * The vector size specifies the number of components of the parameter. */ FunctionParameter(std::string const& name, - MeshLib::Mesh const& mesh, std::vector<std::string> const& vec_expression_str) - : Parameter<T>(name, &mesh), _vec_expression_str(vec_expression_str) + : Parameter<T>(name, nullptr), _vec_expression_str(vec_expression_str) { _symbol_table.add_constants(); _symbol_table.create_variable("x"); @@ -89,14 +84,6 @@ struct FunctionParameter final : public Parameter<T> y = coords[1]; z = coords[2]; } - else if (pos.getNodeID()) - { - auto const& node = - *ParameterBase::_mesh->getNode(pos.getNodeID().get()); - x = node[0]; - y = node[1]; - z = node[2]; - } for (unsigned i = 0; i < _vec_expression.size(); i++) { @@ -118,7 +105,6 @@ private: }; std::unique_ptr<ParameterBase> createFunctionParameter( - std::string const& name, BaseLib::ConfigTree const& config, - MeshLib::Mesh const& mesh); + std::string const& name, BaseLib::ConfigTree const& config); } // namespace ParameterLib diff --git a/ParameterLib/Parameter.cpp b/ParameterLib/Parameter.cpp index 9cf0c794a34d48e6e5d4ed7e117b947b6e83f1c2..cd39a7309d7a42994d227920429a07dba5f0d4b1 100644 --- a/ParameterLib/Parameter.cpp +++ b/ParameterLib/Parameter.cpp @@ -59,7 +59,7 @@ std::unique_ptr<ParameterBase> createParameter( if (type == "Function") { INFO("FunctionParameter: {:s}", name); - return createFunctionParameter(name, config, mesh); + return createFunctionParameter(name, config); } if (type == "Group") {