3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
staggered/freeflow/fvgridgeometrytraits.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_DISCRETIZATION_STAGGERED_FREEFLOW_FV_GRID_GEOMETRY_TRAITS
25#define DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FV_GRID_GEOMETRY_TRAITS
26
31
33#include "connectivitymap.hh"
35
36namespace Dumux {
37
38template<class GridView>
40{
41 using ctype = typename GridView::ctype;
42 using GlobalPosition = Dune::FieldVector<ctype, GridView::dimensionworld>;
43public:
44 struct Traits
45 {
46 using Scalar = ctype;
47 using Geometry = typename GridView::template Codim<0>::Geometry;
48 };
49
50 FreeflowStaggeredSCV(const GlobalPosition& center, const ctype volume)
51 : center_(center), volume_(volume) {}
52
53 const GlobalPosition& center() const
54 { return center_; }
55
56 ctype volume() const
57 { return volume_; }
58private:
59 GlobalPosition center_;
60 ctype volume_;
61};
62
63template<class GridView>
65{
66 using ctype = typename GridView::ctype;
67 using GlobalPosition = Dune::FieldVector<ctype, GridView::dimensionworld>;
68public:
69 struct Traits
70 {
71 using Scalar = ctype;
72 using Geometry = typename GridView::template Codim<1>::Geometry;
73 };
74
75 FreeflowStaggeredSCVF(const GlobalPosition& center, const ctype area)
76 : center_(center), area_(area) {}
77
78 const GlobalPosition& center() const
79 { return center_; }
80
81 ctype area() const
82 { return area_; }
83private:
84 GlobalPosition center_;
85 ctype area_;
86};
87
88
93template<class GridView, int upwOrder, class MapperTraits = DefaultMapperTraits<GridView>>
95: public MapperTraits
96{
101 static constexpr int upwindSchemeOrder = upwOrder;
102
104 {
105 using FaceIdx = Dune::index_constant<0>;
106 using CellCenterIdx = Dune::index_constant<1>;
107 };
108
109 template<class GridGeometry>
111
112 template<class GridGeometry, bool cachingEnabled>
114
116 {
122 };
123};
124
125} //end namespace Dumux
126
127#endif
Defines the default element and vertex mapper types.
defines intersection mappers.
Definition: adapt.hh:29
defines a standard intersection mapper for mapping of global DOFs assigned to faces....
Definition: intersectionmapper.hh:42
Sub control volumes for cell-centered discretization schemes.
Definition: discretization/cellcentered/subcontrolvolume.hh:63
Stores the dof indices corresponding to the neighboring cell centers and faces that contribute to the...
Definition: staggered/freeflow/connectivitymap.hh:39
Definition: staggered/freeflow/fvgridgeometrytraits.hh:40
const GlobalPosition & center() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:53
ctype volume() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:56
FreeflowStaggeredSCV(const GlobalPosition &center, const ctype volume)
Definition: staggered/freeflow/fvgridgeometrytraits.hh:50
Definition: staggered/freeflow/fvgridgeometrytraits.hh:45
typename GridView::template Codim< 0 >::Geometry Geometry
Definition: staggered/freeflow/fvgridgeometrytraits.hh:47
ctype Scalar
Definition: staggered/freeflow/fvgridgeometrytraits.hh:46
Definition: staggered/freeflow/fvgridgeometrytraits.hh:65
const GlobalPosition & center() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:78
FreeflowStaggeredSCVF(const GlobalPosition &center, const ctype area)
Definition: staggered/freeflow/fvgridgeometrytraits.hh:75
ctype area() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:81
Definition: staggered/freeflow/fvgridgeometrytraits.hh:70
ctype Scalar
Definition: staggered/freeflow/fvgridgeometrytraits.hh:71
typename GridView::template Codim< 1 >::Geometry Geometry
Definition: staggered/freeflow/fvgridgeometrytraits.hh:72
Default traits for the finite volume grid geometry.
Definition: staggered/freeflow/fvgridgeometrytraits.hh:96
static constexpr int upwindSchemeOrder
Definition: staggered/freeflow/fvgridgeometrytraits.hh:101
CCSubControlVolume< GridView > SubControlVolume
Definition: staggered/freeflow/fvgridgeometrytraits.hh:97
FreeFlowStaggeredSubControlVolumeFace< GridView, upwOrder > SubControlVolumeFace
Definition: staggered/freeflow/fvgridgeometrytraits.hh:98
Definition: staggered/freeflow/fvgridgeometrytraits.hh:104
Dune::index_constant< 1 > CellCenterIdx
Definition: staggered/freeflow/fvgridgeometrytraits.hh:106
Dune::index_constant< 0 > FaceIdx
Definition: staggered/freeflow/fvgridgeometrytraits.hh:105
Definition: staggered/freeflow/fvgridgeometrytraits.hh:116
Helper class constructing the dual grid finite volume geometries for the free flow staggered discreti...
Definition: staggeredgeometryhelper.hh:146
Class for a sub control volume face in the staggered method, i.e a part of the boundary of a sub cont...
Definition: discretization/staggered/freeflow/subcontrolvolumeface.hh:124
Stencil-local finite volume geometry (scvs and scvfs) for staggered models This builds up the sub con...
Definition: discretization/staggered/fvelementgeometry.hh:42
Sub control volumes for cell-centered discretization schemes.
The sub control volume face class for the box discrete fracture model.