diff --git a/dumux/discretization/cellcentered/connectivitymap.hh b/dumux/discretization/cellcentered/connectivitymap.hh index 0f935b288ec93fa1040d5f4121963ba02a01cec2..2baa329277032334c39c50d16d677ca3a060c8cd 100644 --- a/dumux/discretization/cellcentered/connectivitymap.hh +++ b/dumux/discretization/cellcentered/connectivitymap.hh @@ -58,10 +58,10 @@ class CCSimpleConnectivityMap struct DataJ { IndexType globalJ; - Dune::ReservedVector<IndexType, FluxStencil::maxNumScvfJForI> scvfsJ; + typename FluxStencil::ScvfStencilIForJ scvfsJ; // A list of additional scvfs is needed for compatibility // reasons with more complex connectivity maps (see mpfa) - Dune::ReservedVector<IndexType, FluxStencil::maxNumScvfJForI> additionalScvfs; + typename FluxStencil::ScvfStencilIForJ additionalScvfs; }; using Map = std::vector<std::vector<DataJ>>; diff --git a/dumux/discretization/cellcentered/mpfa/generalconnectivitymap.hh b/dumux/discretization/cellcentered/mpfa/generalconnectivitymap.hh index 24166a0539f63d0e3d2b472858c29df8a5cd50f2..35d2ab029ac955ee3430f0c7abf15085699dd91f 100644 --- a/dumux/discretization/cellcentered/mpfa/generalconnectivitymap.hh +++ b/dumux/discretization/cellcentered/mpfa/generalconnectivitymap.hh @@ -57,8 +57,8 @@ class CCMpfaGeneralConnectivityMap struct DataJ { GridIndexType globalJ; - std::vector<GridIndexType> scvfsJ; - std::vector<GridIndexType> additionalScvfs; + typename FluxStencil::ScvfStencilIForJ scvfsJ; + typename FluxStencil::ScvfStencilIForJ additionalScvfs; }; using Map = std::vector<std::vector<DataJ>>; diff --git a/dumux/discretization/fluxstencil.hh b/dumux/discretization/fluxstencil.hh index a138efb0a86c1d47f8812807a75e088fcde77d3e..35afc2d38236314b1eca1dccda744c5ad8c4f4dd 100644 --- a/dumux/discretization/fluxstencil.hh +++ b/dumux/discretization/fluxstencil.hh @@ -64,8 +64,8 @@ public: //! The maximum number of elements in a flux stencil static constexpr int maxFluxStencilSize = GET_PROP_VALUE(TypeTag, MaxNumNeighborsPerScvf); - //! States how many scvfs of an element J might have an element I in the flux stencil - static constexpr int maxNumScvfJForI = 1; + //! Each cell I couples to a cell J always only via one face + using ScvfStencilIForJ = Dune::ReservedVector<IndexType, 1>; //! The flux stencil type using Stencil = Dune::ReservedVector<IndexType, maxFluxStencilSize>; @@ -109,9 +109,8 @@ public: //! The maximum number of elements in a flux stencil (equal to number of elements at node) static constexpr int maxFluxStencilSize = NodalIndexSet::maxNumElementsAtNode; - //! States how many scvfs of an element J might have an element I in the flux stencil - //! We use cubes here for determining the maximum. Only basic geometries are not supported. - static constexpr int maxNumScvfJForI = dim == 3 ? 12 : 4; + //! We don't know yet how many faces couple to a neighboring element + using ScvfStencilIForJ = std::vector<IndexType>; //! The flux stencil type using Stencil = typename NodalIndexSet::GridStencilType;