3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
27#ifndef DUMUX_FACETCOUPLING_CC_LOCAL_RESIDUAL_HH
28#define DUMUX_FACETCOUPLING_CC_LOCAL_RESIDUAL_HH
29
32
33namespace Dumux {
34
42template<class TypeTag>
44{
46
48 using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
49 using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
50
51 using GridGeometry = typename GridVariables::GridGeometry;
52 using FVElementGeometry = typename GridGeometry::LocalView;
53 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
54 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
55
57
58public:
60 using ParentType::ParentType;
63
66 template< class Problem >
67 NumEqVector evalFlux(const Problem& problem,
68 const Element& element,
69 const FVElementGeometry& fvGeometry,
70 const ElementVolumeVariables& elemVolVars,
71 const ElementFluxVariablesCache& elemFluxVarsCache,
72 const SubControlVolumeFace& scvf) const
73 {
74 // Even if scvf.boundary=true, compute flux on interior boundaries
75 if (problem.couplingManager().isOnInteriorBoundary(element, scvf))
76 return this->asImp().computeFlux(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
77 else
78 return ParentType::evalFlux(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf);
79 }
80};
81
82} // end namespace Dumux
83
84#endif
Calculates the element-wise residual for cell-centered discretization schemes.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Calculates the element-wise residual for the cell-centered discretization schemes.
Definition: cclocalresidual.hh:42
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:58
typename ParentType::ElementResidualVector ElementResidualVector
Definition: cclocalresidual.hh:54
The element-wise residual for finite volume schemes.
Definition: fvlocalresidual.hh:45
Implementation & asImp()
Definition: fvlocalresidual.hh:501
const Problem & problem() const
the problem
Definition: fvlocalresidual.hh:486
Calculates the element-wise residual for cell-centered discretization schemes in models where couplin...
Definition: multidomain/facet/cellcentered/localresidual.hh:44
NumEqVector evalFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Definition: multidomain/facet/cellcentered/localresidual.hh:67
Declares all properties used in Dumux.