3.3.0
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;
56
57public:
58 SequentialFVSpatialParams(const Problem& problem)
59 :SequentialFVSpatialParamsOneP<TypeTag>(problem)
60 {
61 }
62
63
64 // make sure we get a deprecation warning (remove this after release 3.3)
65 template<class ElementSolution, class SubControlVolume>
66 [[deprecated("Use the new style material laws. Old material laws and this interface will no longer be supported after release 3.3")]]
67 decltype(auto) materialLawParamsDeprecated(const Element& element,
68 const SubControlVolume& scv,
69 const ElementSolution& elemSol) const
70 {
71 return this->asImp_().materialLawParams(element);
72 }
73
80 const auto& materialLawParams(const Element &element) const
81 {
82 return asImp_().materialLawParamsAtPos(element.geometry().center());
83 }
84
91 const auto& materialLawParamsAtPos(const GlobalPosition& globalPos) const
92 {
93 DUNE_THROW(Dune::InvalidStateException,
94 "The spatial parameters do not provide "
95 "a materialLawParamsAtPos() method.");
96 }
97
98private:
99 Implementation &asImp_()
100 {
101 return *static_cast<Implementation*> (this);
102 }
103
104 const Implementation &asImp_() const
105 {
106 return *static_cast<const Implementation*> (this);
107 }
108};
109
110} // namespace Dumux
111
112#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
const auto & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:91
const auto & materialLawParams(const Element &element) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: sequentialfv.hh:80
SequentialFVSpatialParams(const Problem &problem)
Definition: sequentialfv.hh:58
decltype(auto) materialLawParamsDeprecated(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: sequentialfv.hh:67
The base class for spatial parameters of problems using the fv method.
Definition: sequentialfv1p.hh:42
Declares all properties used in Dumux.