3.5-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
33
34namespace Dumux {
35
43template<class TypeTag>
45{
47
49 using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
50 using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
51
52 using GridGeometry = typename GridVariables::GridGeometry;
53 using FVElementGeometry = typename GridGeometry::LocalView;
54 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
55 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
56
58
59public:
61 using ParentType::ParentType;
64
67 template< class Problem >
68 NumEqVector evalFlux(const Problem& problem,
69 const Element& element,
70 const FVElementGeometry& fvGeometry,
71 const ElementVolumeVariables& elemVolVars,
72 const ElementFluxVariablesCache& elemFluxVarsCache,
73 const SubControlVolumeFace& scvf) const
74 {
75 // Even if scvf.boundary=true, compute flux on interior boundaries
76 if (problem.couplingManager().isOnInteriorBoundary(element, scvf))
77 return this->asImp().computeFlux(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
78 else
79 return ParentType::evalFlux(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf);
80 }
81};
82
83} // end namespace Dumux
84
85#endif
Calculates the element-wise residual for cell-centered discretization schemes.
A helper to deduce a vector with the same size as numbers of equations.
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:46
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Calculates the element-wise residual for the cell-centered discretization schemes.
Definition: cclocalresidual.hh:43
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:61
typename ParentType::ElementResidualVector ElementResidualVector
Definition: cclocalresidual.hh:57
The element-wise residual for finite volume schemes.
Definition: fvlocalresidual.hh:47
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:45
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:68
Declares all properties used in Dumux.