3.4
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 {
32
38template<class TypeTag>
40{
45
46 enum
47 {
48 dimWorld = GridView::dimensionworld
49 };
50
51 using Element = typename GridView::template Codim<0>::Entity;
52 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
53
54public:
55 SequentialFVSpatialParams(const Problem& problem)
56 : SequentialFVSpatialParamsOneP<TypeTag>(problem)
57 {}
58
65 auto fluidMatrixInteraction(const Element &element) const
66 {
67 return asImp_().fluidMatrixInteractionAtPos(element.geometry().center());
68 }
69
76 auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const
77 {
78 DUNE_THROW(Dune::InvalidStateException,
79 "The spatial parameters do not provide "
80 "a fluidMatrixInteractionAtPos() method.");
81 }
82
83private:
84 Implementation &asImp_()
85 {
86 return *static_cast<Implementation*> (this);
87 }
88
89 const Implementation &asImp_() const
90 {
91 return *static_cast<const Implementation*> (this);
92 }
93};
94
95} // namespace Dumux
96
97#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
Definition: propertysystem.hh:150
The base class for spatial parameters of a multi-phase problem using the fv method.
Definition: sequentialfv.hh:40
auto fluidMatrixInteractionAtPos(const GlobalPosition &globalPos) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:76
auto fluidMatrixInteraction(const Element &element) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:65
SequentialFVSpatialParams(const Problem &problem)
Definition: sequentialfv.hh:55
The base class for spatial parameters of problems using the fv method.
Definition: sequentialfv1p.hh:42
Declares all properties used in Dumux.