Skip to content
Snippets Groups Projects
Commit 1b3b66bf authored by Timo Koch's avatar Timo Koch
Browse files

[pmflow] Add problem constructor getting the spatial params

parent 62528103
No related branches found
No related tags found
1 merge request!938[pmflow] Add problem constructor getting the spatial params
......@@ -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
*/
......
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