Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
e2090f79
Commit
e2090f79
authored
Dec 15, 2017
by
Dennis Gläser
Browse files
[tpfa] make computeTransmissibility function general for all kinds of tensors
parent
ab5e55bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/cellcentered/tpfa/computetransmissibility.hh
View file @
e2090f79
...
...
@@ -25,6 +25,7 @@
#ifndef DUMUX_DISCRETIZATION_CC_TPFA_COMPUTE_TRANSMISSIBILITY_HH
#define DUMUX_DISCRETIZATION_CC_TPFA_COMPUTE_TRANSMISSIBILITY_HH
#include
<dune/common/typetraits.hh>
#include
<dune/common/fmatrix.hh>
namespace
Dumux
...
...
@@ -43,11 +44,11 @@ namespace Dumux
* \param K The tensor living in the neighboring scv
* \param extrusionFactor The extrusion factor of the scv
*/
template
<
class
SubControlVolumeFace
,
class
SubControlVolume
,
class
FieldScalar
,
int
dimWorld
>
FieldScalar
computeTpfaTransmissibility
(
const
SubControlVolumeFace
&
scvf
,
const
SubControlVolume
&
scv
,
const
Dune
::
FieldMatrix
<
FieldScalar
,
dimWorld
,
dimWorld
>
&
T
,
typename
SubControlVolume
::
Traits
::
Scalar
extrusionFactor
)
template
<
class
SubControlVolumeFace
,
class
SubControlVolume
,
class
Tensor
>
typename
Tensor
::
field_type
computeTpfaTransmissibility
(
const
SubControlVolumeFace
&
scvf
,
const
SubControlVolume
&
scv
,
const
Tensor
&
T
,
typename
SubControlVolume
::
Traits
::
Scalar
extrusionFactor
)
{
using
GlobalPosition
=
typename
SubControlVolumeFace
::
Traits
::
GlobalPosition
;
GlobalPosition
Knormal
;
...
...
@@ -70,11 +71,14 @@ FieldScalar computeTpfaTransmissibility(const SubControlVolumeFace& scvf,
* \param t The scalar quantity living in the neighboring scv
* \param extrusionFactor The extrusion factor of the scv
*/
template
<
class
SubControlVolumeFace
,
class
SubControlVolume
,
class
FieldScalar
>
FieldScalar
computeTpfaTransmissibility
(
const
SubControlVolumeFace
&
scvf
,
const
SubControlVolume
&
scv
,
FieldScalar
t
,
typename
SubControlVolumeFace
::
Traits
::
Scalar
extrusionFactor
)
template
<
class
SubControlVolumeFace
,
class
SubControlVolume
,
class
Tensor
,
typename
std
::
enable_if_t
<
Dune
::
IsNumber
<
Tensor
>
::
value
,
int
>
=
0
>
Tensor
computeTpfaTransmissibility
(
const
SubControlVolumeFace
&
scvf
,
const
SubControlVolume
&
scv
,
Tensor
t
,
typename
SubControlVolumeFace
::
Traits
::
Scalar
extrusionFactor
)
{
auto
distanceVector
=
scvf
.
ipGlobal
();
distanceVector
-=
scv
.
center
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment