Skip to content
Snippets Groups Projects
Commit eb35023a authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[cc][connectivitymap] use scvf stencil type defined in the flux stencil

This reduces the massive memory overhead for mpfa schemes.
parent 0b7b974c
No related branches found
No related tags found
1 merge request!742Make FVGridGeometry independent of TypeTag
......@@ -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>>;
......
......@@ -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>>;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment