version 3.10-dev
fvproblemwithspatialparams.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_COMMON_FV_PROBLEM_WITH_SPATIAL_PARAMS_HH
13#define DUMUX_COMMON_FV_PROBLEM_WITH_SPATIAL_PARAMS_HH
14
15#include <memory>
16
19
20namespace Dumux {
21
26template<class TypeTag>
28: public FVProblem<TypeTag>
29{
32
33public:
35
42 FVProblemWithSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry,
43 const std::string& paramGroup = "")
45 , spatialParams_(std::make_shared<SpatialParams>(gridGeometry))
46 {}
47
54 FVProblemWithSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry,
55 std::shared_ptr<SpatialParams> spatialParams,
56 const std::string& paramGroup = "")
58 , spatialParams_(spatialParams)
59 {}
60
63 { return *spatialParams_; }
64
67 { return *spatialParams_; }
68
69private:
71 std::shared_ptr<SpatialParams> spatialParams_;
72};
73
74} // end namespace Dumux
75
76#endif
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:43
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:524
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:520
Base class for all finite-volume problems using spatial parameters.
Definition: fvproblemwithspatialparams.hh:29
GetPropType< TypeTag, Properties::SpatialParams > SpatialParams
Definition: fvproblemwithspatialparams.hh:34
FVProblemWithSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, const std::string &paramGroup="")
Constructor.
Definition: fvproblemwithspatialparams.hh:42
const SpatialParams & spatialParams() const
Return a reference to the underlying spatial parameters.
Definition: fvproblemwithspatialparams.hh:62
SpatialParams & spatialParams()
Return a reference to the underlying spatial parameters.
Definition: fvproblemwithspatialparams.hh:66
FVProblemWithSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< SpatialParams > spatialParams, const std::string &paramGroup="")
Constructor.
Definition: fvproblemwithspatialparams.hh:54
Base class for all finite volume problems.
Defines all properties used in Dumux.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17