diff --git a/dumux/implicit/fluxvariables.hh b/dumux/implicit/fluxvariables.hh index 33456f8c0887801eb273d892b9ad7c8d233c32b0..7dafda56f53d7aa7af779ca37e892280efa5701a 100644 --- a/dumux/implicit/fluxvariables.hh +++ b/dumux/implicit/fluxvariables.hh @@ -49,6 +49,7 @@ class FluxVariables<TypeTag, true, false, false> { using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Element = typename GridView::template Codim<0>::Entity; using IndexType = typename GridView::IndexSet::IndexType; using Stencil = std::set<IndexType>; using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); @@ -56,17 +57,19 @@ class FluxVariables<TypeTag, true, false, false> using AdvectionType = typename GET_PROP_TYPE(TypeTag, AdvectionType); public: - void update(const Problem& problem, const SubControlVolumeFace &scvf) + void update(const Problem& problem, + const Element& element, + const SubControlVolumeFace &scvf) { if (scvf.boundary()) { if(!boundaryVolVars_) boundaryVolVars_ = Dune::Std::make_unique<VolumeVariables>(); - advection_.update(problem, scvf, boundaryVolVars_.get()); + advection_.update(problem, element, scvf, boundaryVolVars_.get()); } else { - advection_.update(problem, scvf); + advection_.update(problem, element, scvf); } } @@ -98,6 +101,7 @@ class FluxVariables<TypeTag, true, true, false> { using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + using Element = typename GridView::template Codim<0>::Entity; using IndexType = typename GridView::IndexSet::IndexType; using Stencil = std::set<IndexType>; using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); @@ -112,19 +116,21 @@ class FluxVariables<TypeTag, true, true, false> }; public: - void update(const Problem& problem, const SubControlVolumeFace &scvf) + void update(const Problem& problem, + const Element& element, + const SubControlVolumeFace &scvf) { if (scvf.boundary()) { if(!boundaryVolVars_) boundaryVolVars_ = Dune::Std::make_unique<VolumeVariables>(); - advection_.update(problem, scvf, boundaryVolVars_.get()); + advection_.update(problem, element, scvf, boundaryVolVars_.get()); for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) for (int compIdx = 0; compIdx < numComponents; ++compIdx) { if (phaseIdx != compIdx) - molecularDiffusion(phaseIdx, compIdx).update(problem, scvf, phaseIdx, compIdx, boundaryVolVars_.get()); + molecularDiffusion(phaseIdx, compIdx).update(problem, element, scvf, phaseIdx, compIdx, boundaryVolVars_.get()); } } else @@ -134,7 +140,7 @@ public: for (int compIdx = 0; compIdx < numComponents; ++compIdx) { if (phaseIdx != compIdx) - molecularDiffusion(phaseIdx, compIdx).update(problem, scvf, phaseIdx, compIdx); + molecularDiffusion(phaseIdx, compIdx).update(problem, element, scvf, phaseIdx, compIdx); } } } diff --git a/dumux/implicit/fluxvariablesvector.hh b/dumux/implicit/fluxvariablesvector.hh index d939ff9d142d25eda810696fd6b61ccf9413f3d0..25547c8a5d3125a7b780cccbf38fd7660a212cbd 100644 --- a/dumux/implicit/fluxvariablesvector.hh +++ b/dumux/implicit/fluxvariablesvector.hh @@ -49,23 +49,12 @@ public: { for (auto&& scvf : problem.model().fvGeometries(element).scvfs()) { - (*this)[scvf.index()].update(problem, scvf); + (*this)[scvf.index()].update(problem, element, scvf); } } } - void update(const Problem& problem, const SubControlVolumeFace& scvf) - { - (*this)[scvf.index()].update(problem, scvf); - } - - void update(const Problem& problem, const IndexType scvfIdx) - { - auto&& scvf = problem.model().fvGeometries().subControlVolumeFace(scvfIdx); - (*this)[scvf.index()].update(problem, scvf); - } - const FluxVariables& operator [](IndexType scvfIdx) const { return fluxVars_[scvfIdx]; diff --git a/dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh b/dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh index 75f7a891a9ecf9c904dc4152683750f5a0c0ee0a..41f8016f2c92c7a0631b2ec34c59a5a3e284a5ff 100644 --- a/dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh +++ b/dumux/porousmediumflow/implicit/cellcentered/tpfa/darcyslaw.hh @@ -61,6 +61,7 @@ class CCTpfaDarcysLaw typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GridView::IndexSet::IndexType IndexType; + using Element = typename GridView::template Codim<0>::Entity; enum { dim = GridView::dimension} ; enum { dimWorld = GridView::dimensionworld} ; @@ -71,7 +72,9 @@ class CCTpfaDarcysLaw public: - void update(const Problem &problem, const SubControlVolumeFace &scvFace) + void update(const Problem &problem, + const Element& element, + const SubControlVolumeFace &scvFace) { problemPtr_ = &problem; scvFacePtr_ = &scvFace; @@ -81,11 +84,13 @@ public: updateStencil_(); } - void update(const Problem& problem, const SubControlVolumeFace &scvFace, + void update(const Problem& problem, + const Element& element, + const SubControlVolumeFace &scvFace, VolumeVariables* boundaryVolVars) { boundaryVolVars_ = boundaryVolVars; - update(problem, scvFace); + update(problem, element, scvFace); } void updateTransmissibilities(const Problem &problem, const SubControlVolumeFace &scvFace) diff --git a/dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh b/dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh index be8a44f8a105a560f66540b1bb982c63a854a4f4..0122c6baf16117e2ffd4affa4c608cc200ef23e3 100644 --- a/dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh +++ b/dumux/porousmediumflow/implicit/cellcentered/tpfa/fickslaw.hh @@ -60,6 +60,7 @@ class CCTpfaFicksLaw typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GridView::IndexSet::IndexType IndexType; + using Element = typename GridView::template Codim<0>::Entity; enum { dim = GridView::dimension} ; enum { dimWorld = GridView::dimensionworld} ; @@ -70,7 +71,9 @@ class CCTpfaFicksLaw public: - void update(const Problem &problem, const SubControlVolumeFace &scvFace, + void update(const Problem& problem, + const Element& element, + const SubControlVolumeFace &scvFace, int phaseIdx, int compIdx) { problemPtr_ = &problem; @@ -84,7 +87,9 @@ public: // TODO for non solution dependent diffusion tensors... } - void update(const Problem &problem, const SubControlVolumeFace &scvFace, + void update(const Problem &problem, + const Element &element, + const SubControlVolumeFace &scvFace, int phaseIdx, int compIdx, VolumeVariables* boundaryVolVars) {