3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_COMMON_FV_PROBLEM_WITH_SPATIAL_PARAMS_HH
25#define DUMUX_COMMON_FV_PROBLEM_WITH_SPATIAL_PARAMS_HH
26
27#include <memory>
28
31
32namespace Dumux {
33
38template<class TypeTag>
40: public FVProblem<TypeTag>
41{
44
45public:
47
54 FVProblemWithSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry,
55 const std::string& paramGroup = "")
57 , spatialParams_(std::make_shared<SpatialParams>(gridGeometry))
58 {}
59
66 FVProblemWithSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry,
67 std::shared_ptr<SpatialParams> spatialParams,
68 const std::string& paramGroup = "")
70 , spatialParams_(spatialParams)
71 {}
72
75 { return *spatialParams_; }
76
79 { return *spatialParams_; }
80
81private:
83 std::shared_ptr<SpatialParams> spatialParams_;
84};
85
86} // end namespace Dumux
87
88#endif
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:55
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:544
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:540
Base class for all finite-volume problems using spatial parameters.
Definition: fvproblemwithspatialparams.hh:41
GetPropType< TypeTag, Properties::SpatialParams > SpatialParams
Definition: fvproblemwithspatialparams.hh:46
FVProblemWithSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, const std::string &paramGroup="")
Constructor.
Definition: fvproblemwithspatialparams.hh:54
const SpatialParams & spatialParams() const
Return a reference to the underlying spatial parameters.
Definition: fvproblemwithspatialparams.hh:74
SpatialParams & spatialParams()
Return a reference to the underlying spatial parameters.
Definition: fvproblemwithspatialparams.hh:78
FVProblemWithSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< SpatialParams > spatialParams, const std::string &paramGroup="")
Constructor.
Definition: fvproblemwithspatialparams.hh:66
Base class for all finite volume problems.
Declares all properties used in Dumux.