3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
sequentialfv.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 *****************************************************************************/
25#ifndef DUMUX_SEQUENTIAL_FV_SPATIAL_PARAMS_HH
26#define DUMUX_SEQUENTIAL_FV_SPATIAL_PARAMS_HH
27
29#include "sequentialfv1p.hh"
30
31namespace Dumux {
32namespace Properties
33{ template<class TypeTag, class MyTypeTag>
34struct MaterialLaw { using type = UndefinedProperty; }; }
35
41template<class TypeTag>
43{
48
49 enum
50 {
51 dimWorld = GridView::dimensionworld
52 };
53
54 using Element = typename GridView::template Codim<0>::Entity;
55 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
57 using MaterialLawParams = typename GetPropType<TypeTag, Properties::MaterialLaw>::Params;
59
60public:
61 SequentialFVSpatialParams(const Problem& problem)
62 :SequentialFVSpatialParamsOneP<TypeTag>(problem)
63 {
64 }
65
72 const MaterialLawParams& materialLawParams(const Element &element) const
73 {
74 return asImp_().materialLawParamsAtPos(element.geometry().center());
75 }
76
83 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
84 {
85 DUNE_THROW(Dune::InvalidStateException,
86 "The spatial parameters do not provide "
87 "a materialLawParamsAtPos() method.");
88 }
89
90private:
91 Implementation &asImp_()
92 {
93 return *static_cast<Implementation*> (this);
94 }
95
96 const Implementation &asImp_() const
97 {
98 return *static_cast<const Implementation*> (this);
99 }
100};
101
102} // namespace Dumux
103
104#endif
The base class for spatial parameters of problems using the fv method.
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
a tag to mark properties as undefined
Definition: propertysystem.hh:36
Definition: sequentialfv.hh:34
The base class for spatial parameters of a multi-phase problem using the fv method.
Definition: sequentialfv.hh:43
SequentialFVSpatialParams(const Problem &problem)
Definition: sequentialfv.hh:61
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:83
const MaterialLawParams & materialLawParams(const Element &element) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:72
The base class for spatial parameters of problems using the fv method.
Definition: sequentialfv1p.hh:42
Declares all properties used in Dumux.