3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
mpfa/computetransmissibility.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 *****************************************************************************/
26#ifndef DUMUX_DISCRETIZATION_CC_MPFA_COMPUTE_TRANSMISSIBILITY_HH
27#define DUMUX_DISCRETIZATION_CC_MPFA_COMPUTE_TRANSMISSIBILITY_HH
28
29#include <dune/common/typetraits.hh>
30#include <dune/common/fvector.hh>
31
32#include <dumux/common/math.hh>
33
34namespace Dumux
35{
36
49template<class Scv, class Scvf, class Tensor>
50Dune::FieldVector< typename Tensor::field_type, Scv::myDimension >
52 const Scvf& scvf,
53 const Tensor& T,
54 typename Scv::ctype extrusionFactor)
55{
56 Dune::FieldVector< typename Tensor::field_type, Scv::myDimension > wijk;
57 for (unsigned int dir = 0; dir < Scv::myDimension; ++dir)
58 wijk[dir] = vtmv(scvf.unitOuterNormal(), T, scv.nu(dir));
59
60 wijk *= scvf.area()*extrusionFactor;
61 wijk /= scv.detX();
62
63 return wijk;
64}
65
78template< class Scv,
79 class Scvf,
80 class Tensor,
81 std::enable_if_t< Dune::IsNumber<Tensor>::value, int > = 1 >
82Dune::FieldVector<Tensor, Scv::myDimension>
84 const Scvf& scvf,
85 Tensor t,
86 typename Scv::ctype extrusionFactor)
87{
88 Dune::FieldVector<Tensor, Scv::myDimension> wijk;
89 for (unsigned int dir = 0; dir < Scv::myDimension; ++dir)
90 wijk[dir] = vtmv(scvf.unitOuterNormal(), t, scv.nu(dir));
91
92 wijk *= scvf.area()*extrusionFactor;
93 wijk /= scv.detX();
94
95 return wijk;
96}
97
98} // end namespace Dumux
99
100#endif
Define some often used mathematical functions.
Dune::FieldVector< typename Tensor::field_type, Scv::myDimension > computeMpfaTransmissibility(const Scv &scv, const Scvf &scvf, const Tensor &T, typename Scv::ctype extrusionFactor)
Free function to evaluate the Mpfa transmissibility associated with the flux (in the form of flux = T...
Definition: mpfa/computetransmissibility.hh:51
Dune::DenseMatrix< MAT >::value_type vtmv(const Dune::DenseVector< V1 > &v1, const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V2 > &v2)
Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1.
Definition: math.hh:840
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29