version 3.10-dev
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FV_GRID_GEOMETRY_TRAITS
13#define DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FV_GRID_GEOMETRY_TRAITS
14
19
21#include "connectivitymap.hh"
23
24namespace Dumux {
25
26template<class GridView>
28{
29 using ctype = typename GridView::ctype;
30 using GlobalPosition = Dune::FieldVector<ctype, GridView::dimensionworld>;
31public:
32 struct Traits
33 {
34 using Scalar = ctype;
35 using Geometry = typename GridView::template Codim<0>::Geometry;
36 };
37
38 FreeflowStaggeredSCV(const GlobalPosition& center, const ctype volume)
39 : center_(center), volume_(volume) {}
40
41 const GlobalPosition& center() const
42 { return center_; }
43
44 ctype volume() const
45 { return volume_; }
46private:
47 GlobalPosition center_;
48 ctype volume_;
49};
50
51template<class GridView>
53{
54 using ctype = typename GridView::ctype;
55 using GlobalPosition = Dune::FieldVector<ctype, GridView::dimensionworld>;
56public:
57 struct Traits
58 {
59 using Scalar = ctype;
60 using Geometry = typename GridView::template Codim<1>::Geometry;
61 };
62
63 FreeflowStaggeredSCVF(const GlobalPosition& center, const ctype area)
64 : center_(center), area_(area) {}
65
66 const GlobalPosition& center() const
67 { return center_; }
68
69 ctype area() const
70 { return area_; }
71private:
72 GlobalPosition center_;
73 ctype area_;
74};
75
76
81template<class GridView, int upwOrder, class MapperTraits = DefaultMapperTraits<GridView>>
83: public MapperTraits
84{
89 static constexpr int upwindSchemeOrder = upwOrder;
90
92 {
93 using FaceIdx = Dune::index_constant<0>;
94 using CellCenterIdx = Dune::index_constant<1>;
95 };
96
97 template<class GridGeometry>
99
100 template<class GridGeometry, bool cachingEnabled>
102
104 {
110 };
111};
112
113} //end namespace Dumux
114
115#endif
Sub control volumes for cell-centered discretization schemes.
Definition: discretization/cellcentered/subcontrolvolume.hh:47
defines a standard intersection mapper for mapping of global DOFs assigned to faces....
Definition: intersectionmapper.hh:29
Helper class constructing the dual grid finite volume geometries for the free flow staggered discreti...
Definition: staggeredgeometryhelper.hh:134
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:82
Definition: staggered/freeflow/fvgridgeometrytraits.hh:53
const GlobalPosition & center() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:66
FreeflowStaggeredSCVF(const GlobalPosition &center, const ctype area)
Definition: staggered/freeflow/fvgridgeometrytraits.hh:63
ctype area() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:69
Definition: staggered/freeflow/fvgridgeometrytraits.hh:28
const GlobalPosition & center() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:41
ctype volume() const
Definition: staggered/freeflow/fvgridgeometrytraits.hh:44
FreeflowStaggeredSCV(const GlobalPosition &center, const ctype volume)
Definition: staggered/freeflow/fvgridgeometrytraits.hh:38
Stencil-local finite volume geometry (scvs and scvfs) for staggered models This builds up the sub con...
Definition: discretization/staggered/fvelementgeometry.hh:34
Stores the dof indices corresponding to the neighboring cell centers and faces that contribute to the...
Definition: staggered/freeflow/connectivitymap.hh:27
Defines the default element and vertex mapper types.
Sub control volumes for cell-centered discretization schemes.
defines intersection mappers.
Definition: adapt.hh:17
The sub control volume face class for the box discrete fracture model.
Definition: staggered/freeflow/fvgridgeometrytraits.hh:33
typename GridView::template Codim< 0 >::Geometry Geometry
Definition: staggered/freeflow/fvgridgeometrytraits.hh:35
ctype Scalar
Definition: staggered/freeflow/fvgridgeometrytraits.hh:34
Definition: staggered/freeflow/fvgridgeometrytraits.hh:58
ctype Scalar
Definition: staggered/freeflow/fvgridgeometrytraits.hh:59
typename GridView::template Codim< 1 >::Geometry Geometry
Definition: staggered/freeflow/fvgridgeometrytraits.hh:60
Definition: staggered/freeflow/fvgridgeometrytraits.hh:92
Dune::index_constant< 1 > CellCenterIdx
Definition: staggered/freeflow/fvgridgeometrytraits.hh:94
Dune::index_constant< 0 > FaceIdx
Definition: staggered/freeflow/fvgridgeometrytraits.hh:93
Definition: staggered/freeflow/fvgridgeometrytraits.hh:104
Default traits for the finite volume grid geometry.
Definition: staggered/freeflow/fvgridgeometrytraits.hh:84
static constexpr int upwindSchemeOrder
Definition: staggered/freeflow/fvgridgeometrytraits.hh:89
CCSubControlVolume< GridView > SubControlVolume
Definition: staggered/freeflow/fvgridgeometrytraits.hh:85
FreeFlowStaggeredSubControlVolumeFace< GridView, upwOrder > SubControlVolumeFace
Definition: staggered/freeflow/fvgridgeometrytraits.hh:86