diff --git a/dumux/discretization/cellcentered/mpfa/scvgradients.hh b/dumux/discretization/cellcentered/mpfa/scvgradients.hh index 90e1a5b46ccaceda008ddd717a703053c04ffddc..dcb1df6b76ac306f1219de4dd4e019ec6906ea91 100644 --- a/dumux/discretization/cellcentered/mpfa/scvgradients.hh +++ b/dumux/discretization/cellcentered/mpfa/scvgradients.hh @@ -25,12 +25,14 @@ #ifndef DUMUX_CC_MPFA_SCV_GRADIENTS_HH #define DUMUX_CC_MPFA_SCV_GRADIENTS_HH -#include <pair> #include <vector> +#include <utility> #include <type_traits> #include <dune/common/fvector.hh> + #include <dumux/common/math.hh> +#include <dumux/discretization/cellcentered/mpfa/localassemblerhelper.hh> namespace Dumux { @@ -116,7 +118,6 @@ public: unsigned int phaseIdx, F& f) { - using Problem = std::decay_t<decltype(gridVariables.curGridVolVars().problem())>; using ElemVolVars = typename GridVariables::GridVolumeVariables::LocalView; using FVElementGeometry = typename FVGridGeometry::LocalView; @@ -126,11 +127,8 @@ public: const FVElementGeometry& fvGeometry, const ElemVolVars& elemVolVars) { - using IV = std::decay_t<decltype(iv)>; - using LocalAssembler = typename IV::Traits::template LocalAssembler<Problem, FVElementGeometry, ElemVolVars>; - handle.advectionHandle().setPhaseIndex(phaseIdx); - const auto grads = LocalAssembler::assembleScvGradients(handle.advectionHandle(), iv); + const auto grads = InteractionVolumeAssemblerHelper::assembleScvGradients(handle.advectionHandle(), iv); for (unsigned int i = 0; i < iv.numScvs(); ++i) { const auto& volVars = elemVolVars[iv.localScv(i).gridScvIndex()];