24#ifndef DUMUX_DISCRETIZATION_FLUXSTENCIL_HH
25#define DUMUX_DISCRETIZATION_FLUXSTENCIL_HH
29#include <dune/common/reservedvector.hh>
44template<
class FVElementGeometry,
class DiscretizationMethod =
typename FVElementGeometry::Gr
idGeometry::DiscretizationMethod>
52template<
class FVElementGeometry>
53class FluxStencil<FVElementGeometry, DiscretizationMethods::CCTpfa>
55 using GridGeometry =
typename FVElementGeometry::GridGeometry;
56 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
57 using GridView =
typename GridGeometry::GridView;
58 using Element =
typename GridView::template Codim<0>::Entity;
66 using Stencil =
typename SubControlVolumeFace::Traits::GridIndexStorage;
70 const FVElementGeometry& fvGeometry,
71 const SubControlVolumeFace& scvf)
74 return Stencil({scvf.insideScvIdx()});
75 else if (scvf.numOutsideScvs() > 1)
77 Stencil stencil({scvf.insideScvIdx()});
78 for (
unsigned int i = 0; i < scvf.numOutsideScvs(); ++i)
79 stencil.push_back(scvf.outsideScvIdx(i));
83 return Stencil({scvf.insideScvIdx(), scvf.outsideScvIdx()});
92template<
class FVElementGeometry>
93class FluxStencil<FVElementGeometry, DiscretizationMethods::CCMpfa>
95 using GridGeometry =
typename FVElementGeometry::GridGeometry;
96 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
97 using GridView =
typename GridGeometry::GridView;
98 using Element =
typename GridView::template Codim<0>::Entity;
102 using NodalIndexSet =
typename GridGeometry::GridIVIndexSets::DualGridIndexSet::NodalIndexSet;
109 using Stencil =
typename NodalIndexSet::NodalGridStencilType;
113 const FVElementGeometry& fvGeometry,
114 const SubControlVolumeFace& scvf)
116 const auto& gridGeometry = fvGeometry.gridGeometry();
119 if (gridGeometry.vertexUsesSecondaryInteractionVolume(scvf.vertexIndex()))
120 return gridGeometry.gridInteractionVolumeIndexSets().secondaryIndexSet(scvf).gridScvIndices();
122 return gridGeometry.gridInteractionVolumeIndexSets().primaryIndexSet(scvf).gridScvIndices();
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GridView::IndexSet::IndexType GridIndex
Definition: indextraits.hh:39
The flux stencil specialized for different discretization schemes.
Definition: fluxstencil.hh:45
Dune::ReservedVector< GridIndexType, 1 > ScvfStencilIForJ
Each cell I couples to a cell J always only via one face.
Definition: fluxstencil.hh:63
typename SubControlVolumeFace::Traits::GridIndexStorage Stencil
The flux stencil type.
Definition: fluxstencil.hh:66
static Stencil stencil(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf)
Returns the flux stencil.
Definition: fluxstencil.hh:69
std::vector< GridIndexType > ScvfStencilIForJ
We don't know yet how many faces couple to a neighboring element.
Definition: fluxstencil.hh:106
static const Stencil & stencil(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf)
Returns the indices of the elements required for flux calculation on an scvf.
Definition: fluxstencil.hh:112
typename NodalIndexSet::NodalGridStencilType Stencil
The flux stencil type.
Definition: fluxstencil.hh:109