3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fvproperties.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_FV_PROPERTIES_HH
26#define DUMUX_FV_PROPERTIES_HH
27
28#include <dune/istl/bvector.hh>
29#include <dune/istl/bcrsmatrix.hh>
30
34
36
37namespace Dumux {
38namespace Properties {
39
41// Create new type tags
42namespace TTag {
43struct FiniteVolumeModel { using InheritsFrom = std::tuple<GridProperties>; };
44} // end namespace TTag
45
47template<class TypeTag>
48struct GridVariables<TypeTag, TTag::FiniteVolumeModel>
49{
50private:
54public:
56};
57
58// Dumux 3.1 changes the property `EnableFVGridGeometryCache` to `EnableGridGeometryCache`.
59// For ensuring backward compatibility on the user side, it is necessary to
60// stick to the old name for the specializations, see the discussion in MR 1647.
61// Use diagnostic pragmas to prevent the emission of a warning message.
62// TODO after 3.1: Rename to EnableGridGeometryCache, remove the pragmas and this comment.
63#pragma GCC diagnostic push
64#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
66template<class TypeTag>
67struct EnableFVGridGeometryCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
68#pragma GCC diagnostic pop
69
71template<class TypeTag>
72struct EnableGridVolumeVariablesCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
73
75template<class TypeTag>
76struct EnableGridFluxVariablesCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
77
79template<class TypeTag>
81
82// TODO: bundle SolutionVector, JacobianMatrix
83// in LinearAlgebra traits
84
86template<class TypeTag>
87struct SolutionVector<TypeTag, TTag::FiniteVolumeModel> { using type = Dune::BlockVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; };
88
90template<class TypeTag>
91struct JacobianMatrix<TypeTag, TTag::FiniteVolumeModel>
92{
93private:
96 using MatrixBlock = typename Dune::FieldMatrix<Scalar, numEq, numEq>;
97public:
98 using type = typename Dune::BCRSMatrix<MatrixBlock>;
99};
100
101} // namespace Properties
102} // namespace Dumux
103
104 #endif
Defines a type tags and some fundamental grid-related properties.
make the local view function available whenever we use the grid geometry
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
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
Type of the global jacobian matrix.
Definition: common/properties.hh:82
Vector containing all primary variable vector of the grid.
Definition: common/properties.hh:84
Stores the boundary types of a single degree of freedom.
Definition: common/properties.hh:86
specifies if geometric data is saved (faster, but more memory consuming)
Definition: common/properties.hh:129
If disabled, the volume variables are not stored (reduces memory, but is slower)
Definition: common/properties.hh:178
specifies if data on flux vars should be saved (faster, but more memory consuming)
Definition: common/properties.hh:188
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:190
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...
Definition: discretization/fvgridvariables.hh:42
Definition: fvproperties.hh:43
std::tuple< GridProperties > InheritsFrom
Definition: fvproperties.hh:43
Dune::BlockVector< GetPropType< TypeTag, Properties::PrimaryVariables > > type
Definition: fvproperties.hh:87
typename Dune::BCRSMatrix< MatrixBlock > type
Definition: fvproperties.hh:98
Class to specify the type of a boundary.
Declares all properties used in Dumux.
The grid variable class for finite volume schemes storing variables on scv and scvf (volume and flux ...