version 3.9
multidomain/facet/cellcentered/localresidual.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
15#ifndef DUMUX_FACETCOUPLING_CC_LOCAL_RESIDUAL_HH
16#define DUMUX_FACETCOUPLING_CC_LOCAL_RESIDUAL_HH
17
18#include <utility>
19
23
24namespace Dumux {
25
33template<class TypeTag>
35{
37
39 using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
40 using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
41
42 using GridGeometry = typename GridVariables::GridGeometry;
43 using FVElementGeometry = typename GridGeometry::LocalView;
44 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
45 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
46
48
49public:
51 using ParentType::ParentType;
54
56 template<class... Args>
57 void evalFlux(ElementResidualVector& residual, Args&&... args) const
58 { ParentType::evalFlux(residual, std::forward<Args>(args)...); }
59
61 template< class Problem >
62 NumEqVector evalFlux(const Problem& problem,
63 const Element& element,
64 const FVElementGeometry& fvGeometry,
65 const ElementVolumeVariables& elemVolVars,
66 const ElementFluxVariablesCache& elemFluxVarsCache,
67 const SubControlVolumeFace& scvf) const
68 {
69 // Even if scvf.boundary=true, compute flux on interior boundaries
70 if (problem.couplingManager().isOnInteriorBoundary(element, scvf))
71 return this->asImp().computeFlux(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
72 else
73 return ParentType::evalFlux(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf);
74 }
75};
76
77} // end namespace Dumux
78
79#endif
Calculates the element-wise residual for cell-centered discretization schemes.
Calculates the element-wise residual for cell-centered discretization schemes in models where couplin...
Definition: multidomain/facet/cellcentered/localresidual.hh:35
void evalFlux(ElementResidualVector &residual, Args &&... args) const
evaluate the flux residual for a sub control volume face and add to residual
Definition: multidomain/facet/cellcentered/localresidual.hh:57
NumEqVector evalFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
evaluate the flux residual for a sub control volume face
Definition: multidomain/facet/cellcentered/localresidual.hh:62
Calculates the element-wise residual for the cell-centered discretization schemes.
Definition: cclocalresidual.hh:31
void evalFlux(ElementResidualVector &residual, const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementBoundaryTypes &elemBcTypes, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
evaluate the flux residual for a sub control volume face and add to residual
Definition: cclocalresidual.hh:49
typename ParentType::ElementResidualVector ElementResidualVector
Definition: cclocalresidual.hh:45
The element-wise residual for finite volume schemes.
Definition: fvlocalresidual.hh:35
Implementation & asImp()
Definition: fvlocalresidual.hh:487
const Problem & problem() const
the problem
Definition: fvlocalresidual.hh:472
Defines all properties used in Dumux.
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:34
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
A helper to deduce a vector with the same size as numbers of equations.