diff --git a/dumux/porousmediumflow/problem.hh b/dumux/porousmediumflow/problem.hh index 06c58cbb8f56acf7b08ab0fa95dd5c33ed0c73d6..3d5054f5a292625c8ba3550054febbe69a4e50c5 100644 --- a/dumux/porousmediumflow/problem.hh +++ b/dumux/porousmediumflow/problem.hh @@ -52,22 +52,37 @@ public: using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); /*! - * \brief The constructor + * \brief Constructor * * \param fvGridGeometry The finite volume grid geometry + * \param spatialParams The spatial parameter class * \param paramGroup The parameter group in which to look for runtime parameters first (default is "") */ - PorousMediumFlowProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, const std::string& paramGroup = "") + PorousMediumFlowProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, + std::shared_ptr<SpatialParams> spatialParams, + const std::string& paramGroup = "") : ParentType(fvGridGeometry, paramGroup) , gravity_(0.0) - , spatialParams_(std::make_shared<SpatialParams>(this->asImp_())) + , spatialParams_(spatialParams) { - // TODO: spatial params init? const bool enableGravity = getParamFromGroup<bool>(paramGroup, "Problem.EnableGravity"); if (enableGravity) gravity_[dimWorld-1] = -9.81; } + /*! + * \brief (Delegating) constructor, constructing the spatial parameters + * + * \param fvGridGeometry The finite volume grid geometry + * \param paramGroup The parameter group in which to look for runtime parameters first (default is "") + */ + PorousMediumFlowProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, + const std::string& paramGroup = "") + : PorousMediumFlowProblem(fvGridGeometry, + std::make_shared<SpatialParams>(this->asImp_()), + paramGroup) + {} + /*! * \name Physical parameters for porous media problems */