diff --git a/dumux/discretization/staggered/elementfluxvariablescache.hh b/dumux/discretization/staggered/elementfluxvariablescache.hh index b8b33bc0923094b4d1d7f90d520f2aed086de09b..627d116835b0ef0a8c026de5f7f62ef2fe0c917a 100644 --- a/dumux/discretization/staggered/elementfluxvariablescache.hh +++ b/dumux/discretization/staggered/elementfluxvariablescache.hh @@ -140,8 +140,7 @@ public: globalScvfIndices_.resize(numScvf); // instantiate helper class to fill the caches - // FluxVariablesCacheFiller filler(gridFluxVarsCache().problem()); TODO: use proper ctor - FluxVariablesCacheFiller filler; + FluxVariablesCacheFiller filler(gridFluxVarsCache().problem()); std::size_t localScvfIdx = 0; // fill the containers @@ -164,8 +163,7 @@ public: const ElementVolumeVariables& elemVolVars) { // instantiate helper class to fill the caches - // FluxVariablesCacheFiller filler(problem); TODO: use proper ctor - FluxVariablesCacheFiller filler; + FluxVariablesCacheFiller filler(gridFluxVarsCache().problem()); // find the number of scv faces that need to be prepared const auto numScvf = fvGeometry.numScvf(); diff --git a/dumux/discretization/staggered/gridfluxvariablescache.hh b/dumux/discretization/staggered/gridfluxvariablescache.hh index ba3df8c2490b94999ed388a09d2093791f8a575e..980da348d57aab568ebca228e5a626d230617a1a 100644 --- a/dumux/discretization/staggered/gridfluxvariablescache.hh +++ b/dumux/discretization/staggered/gridfluxvariablescache.hh @@ -104,13 +104,11 @@ public: bool forceUpdate = false) { // only do the update if fluxes are solution dependent or if update is forced - // TODO: so far, the staggered models do not use any fluxVar caches, therefore an empty cache filler - // is used which does not implement isSolDependent - if (/*FluxVariablesCacheFiller::isSolDependent ||*/ forceUpdate) + if (FluxVariablesCacheFiller::isSolDependent || forceUpdate) { // instantiate helper class to fill the caches // FluxVariablesCacheFiller filler(problem()); TODO: use proper ctor - FluxVariablesCacheFiller filler; + FluxVariablesCacheFiller filler(problem()); fluxVarsCache_.resize(fvGridGeometry.numScvf()); for (const auto& element : elements(fvGridGeometry.gridView())) diff --git a/dumux/freeflow/compositional/navierstokesncmodel.hh b/dumux/freeflow/compositional/navierstokesncmodel.hh index 5f025a63685457af2e49db2cd442be59acd230f9..c9093182576d9f23161720cb71b2b6224959a4c1 100644 --- a/dumux/freeflow/compositional/navierstokesncmodel.hh +++ b/dumux/freeflow/compositional/navierstokesncmodel.hh @@ -184,10 +184,6 @@ public: template<class TypeTag> struct FluxVariables<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCFluxVariables<TypeTag>; }; -//! The flux variables cache class, by default the one for free flow -template<class TypeTag> -struct FluxVariablesCache<TypeTag, TTag::NavierStokesNC> { using type = FreeFlowFluxVariablesCache<TypeTag>; }; - //! The specific I/O fields template<class TypeTag> struct IOFields<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCIOFields<NavierStokesIOFields>; }; diff --git a/dumux/freeflow/navierstokes/fluxvariablescache.hh b/dumux/freeflow/navierstokes/fluxvariablescache.hh deleted file mode 100644 index a7651c0496c53499ea4843b6fe1b8b439956ee0f..0000000000000000000000000000000000000000 --- a/dumux/freeflow/navierstokes/fluxvariablescache.hh +++ /dev/null @@ -1,75 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * See the file COPYING for full copying permissions. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * \ingroup NavierStokesModel - * \copydoc Dumux::FreeFlowFluxVariablesCache - */ -#ifndef DUMUX_FREEFLOW_IMPLICIT_FLUXVARIABLESCACHE_HH -#define DUMUX_FREEFLOW_IMPLICIT_FLUXVARIABLESCACHE_HH - -#include <dumux/common/properties.hh> -#include <dumux/discretization/method.hh> - -namespace Dumux { - -// forward declaration -template<class TypeTag, DiscretizationMethod discMethod> -class FreeFlowFluxVariablesCacheImplementation -{}; - -/*! - * \ingroup NavierStokesModel - * \brief The flux variables cache classes for the Navier-Stokes model. - * Store flux stencils and data required for flux calculation - */ -template<class TypeTag> -using FreeFlowFluxVariablesCache = FreeFlowFluxVariablesCacheImplementation<TypeTag, GetPropType<TypeTag, Properties::FVGridGeometry>::discMethod>; - -/*! - * \ingroup NavierStokesModel - * \brief The flux variables cache classes for the Navier-Stokes model. - * Store flux stencils and data required for flux calculation. <BR> - * Specialization for the staggered grid discretization. - */ -template<class TypeTag> -class FreeFlowFluxVariablesCacheImplementation<TypeTag, DiscretizationMethod::staggered> -{ - using Problem = GetPropType<TypeTag, Properties::Problem>; - using GridView = GetPropType<TypeTag, Properties::GridView>; - using FVElementGeometry = typename GetPropType<TypeTag, Properties::FVGridGeometry>::LocalView; - using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView; - using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using Element = typename GridView::template Codim<0>::Entity; - -public: - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - - //! Do nothing for the staggered grid specialization. - void update(const Problem& problem, - const Element& element, - const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, - const SubControlVolumeFace &scvf) - {} -}; - -} // end namespace - -#endif