From fa7867040b4c36b2b932e4b75574cc02225d96fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Tue, 13 Nov 2018 10:45:42 +0100 Subject: [PATCH] [md][cclocalassembler] use max stencil size from fv grid geometry --- dumux/multidomain/subdomaincclocalassembler.hh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dumux/multidomain/subdomaincclocalassembler.hh b/dumux/multidomain/subdomaincclocalassembler.hh index 8745e978eb..626b23b8d4 100644 --- a/dumux/multidomain/subdomaincclocalassembler.hh +++ b/dumux/multidomain/subdomaincclocalassembler.hh @@ -269,7 +269,7 @@ class SubDomainCCLocalAssembler<id, TypeTag, Assembler, DiffMethod::numeric, /*i static constexpr bool enableGridFluxVarsCache = GET_PROP_VALUE(TypeTag, EnableGridFluxVariablesCache); static constexpr bool enableGridVolVarsCache = GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache); - static constexpr int maxNeighbors = 4*(2*dim); + static constexpr int maxElementStencilSize = FVGridGeometry::maxElementStencilSize;; static constexpr auto domainI = Dune::index_constant<id>(); public: @@ -303,11 +303,11 @@ public: const auto numNeighbors = connectivityMap[globalI].size(); // container to store the neighboring elements - Dune::ReservedVector<Element, maxNeighbors*2+1> neighborElements; + Dune::ReservedVector<Element, maxElementStencilSize> neighborElements; neighborElements.resize(numNeighbors); // assemble the undeflected residual - using Residuals = ReservedBlockVector<LocalResidualValues, maxNeighbors*2+1>; + using Residuals = ReservedBlockVector<LocalResidualValues, maxElementStencilSize>; Residuals origResiduals(numNeighbors + 1); origResiduals = 0.0; origResiduals[0] = this->evalLocalResidual()[0]; @@ -541,9 +541,6 @@ class SubDomainCCLocalAssembler<id, TypeTag, Assembler, DiffMethod::analytic, /* enum { numEq = GET_PROP_TYPE(TypeTag, ModelTraits)::numEq() }; enum { dim = GridView::dimension }; - static constexpr bool enableGridFluxVarsCache = GET_PROP_VALUE(TypeTag, EnableGridFluxVariablesCache); - static constexpr bool enableGridVolVarsCache = GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache); - static constexpr int maxNeighbors = 4*(2*dim); static constexpr auto domainI = Dune::index_constant<id>(); public: -- GitLab