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
17c1a980
Commit
17c1a980
authored
Dec 15, 2017
by
Dennis Gläser
Browse files
rename GlobalFluxVariablesCache -> GridFluxVariablesCache
This commit affects all properties and member variables
parent
ed97cdf0
Changes
40
Hide whitespace changes
Inline
Side-by-side
dumux/assembly/cclocalassembler.hh
View file @
17c1a980
...
...
@@ -62,7 +62,7 @@ class CCLocalAssembler<TypeTag,
enum
{
numEq
=
GET_PROP_VALUE
(
TypeTag
,
NumEq
)
};
static
constexpr
bool
enableG
lobal
FluxVarsCache
=
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
);
static
constexpr
bool
enableG
rid
FluxVarsCache
=
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
);
public:
...
...
@@ -334,7 +334,7 @@ private:
// update the volume variables and the flux var cache
curVolVars
.
update
(
elemSol
,
problem
,
element
,
scv
);
if
(
enableG
lobal
FluxVarsCache
)
if
(
enableG
rid
FluxVarsCache
)
gridVariables
.
gridFluxVarsCache
().
updateElement
(
element
,
fvGeometry
,
curElemVolVars
);
else
elemFluxVarsCache
.
update
(
element
,
fvGeometry
,
curElemVolVars
);
...
...
@@ -396,7 +396,7 @@ private:
// update the volume variables and the flux var cache
curVolVars
.
update
(
elemSol
,
problem
,
element
,
scv
);
if
(
enableG
lobal
FluxVarsCache
)
if
(
enableG
rid
FluxVarsCache
)
gridVariables
.
gridFluxVarsCache
().
updateElement
(
element
,
fvGeometry
,
curElemVolVars
);
else
elemFluxVarsCache
.
update
(
element
,
fvGeometry
,
curElemVolVars
);
...
...
dumux/assembly/staggeredlocalassembler.hh
View file @
17c1a980
...
...
@@ -83,7 +83,7 @@ class StaggeredLocalAssembler<TypeTag,
using
ElementFaceVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementFaceVariables
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
static
constexpr
bool
enableG
lobal
FluxVarsCache
=
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
);
static
constexpr
bool
enableG
rid
FluxVarsCache
=
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
);
static
constexpr
auto
faceOffset
=
GET_PROP_VALUE
(
TypeTag
,
NumEqCellCenter
);
public:
...
...
dumux/common/properties.hh
View file @
17c1a980
...
...
@@ -96,8 +96,8 @@ NEW_PROP_TAG(EnableGridVolumeVariablesCache); //! If disabled, the volume v
NEW_PROP_TAG
(
FluxVariables
);
//! Container storing the different types of flux variables
NEW_PROP_TAG
(
FluxVariablesCache
);
//! Stores data associated with flux vars
NEW_PROP_TAG
(
ElementFluxVariablesCache
);
//! A local vector of flux variable caches per element
NEW_PROP_TAG
(
G
lobal
FluxVariablesCache
);
//! The global vector of flux variable containers
NEW_PROP_TAG
(
EnableG
lobal
FluxVariablesCache
);
//! specifies if data on flux vars should be saved (faster, but more memory consuming)
NEW_PROP_TAG
(
G
rid
FluxVariablesCache
);
//! The global vector of flux variable containers
NEW_PROP_TAG
(
EnableG
rid
FluxVariablesCache
);
//! specifies if data on flux vars should be saved (faster, but more memory consuming)
NEW_PROP_TAG
(
GridVariables
);
//! The grid variables object managing variable data on the grid (volvars/fluxvars cache)
/////////////////////////////////////////////////////////////////
...
...
dumux/discretization/box/elementfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -32,7 +32,7 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
,
bool
EnableG
lobal
FluxVariablesCache
>
template
<
class
TypeTag
,
bool
EnableG
rid
FluxVariablesCache
>
class
BoxElementFluxVariablesCache
{};
...
...
@@ -50,12 +50,12 @@ class BoxElementFluxVariablesCache<TypeTag, true>
using
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariablesCache
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
public:
BoxElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
BoxElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// Function is called by the BoxLocalJacobian prior to flux calculations on the element.
// We assume the FVGeometries to be bound at this point
...
...
@@ -83,14 +83,14 @@ public:
// access operator
const
FluxVariablesCache
&
operator
[](
const
SubControlVolumeFace
&
scvf
)
const
{
return
g
lobal
FluxVarsCache
().
cache
(
eIdx_
,
scvf
.
index
());
}
{
return
g
rid
FluxVarsCache
().
cache
(
eIdx_
,
scvf
.
index
());
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
// currently bound element
IndexType
eIdx_
;
};
...
...
@@ -110,11 +110,11 @@ class BoxElementFluxVariablesCache<TypeTag, false>
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
public:
BoxElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
BoxElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// Function is called by the BoxLocalJacobian prior to flux calculations on the element.
// We assume the FVGeometries to be bound at this point
...
...
@@ -132,7 +132,7 @@ public:
// temporary resizing of the cache
fluxVarsCache_
.
resize
(
fvGeometry
.
numScvf
());
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
(
*
this
)[
scvf
].
update
(
g
lobal
FluxVarsCache
().
problem
(),
element
,
fvGeometry
,
elemVolVars
,
scvf
);
(
*
this
)[
scvf
].
update
(
g
rid
FluxVarsCache
().
problem
(),
element
,
fvGeometry
,
elemVolVars
,
scvf
);
}
void
bindScvf
(
const
Element
&
element
,
...
...
@@ -141,7 +141,7 @@ public:
const
SubControlVolumeFace
&
scvf
)
{
fluxVarsCache_
.
resize
(
fvGeometry
.
numScvf
());
(
*
this
)[
scvf
].
update
(
g
lobal
FluxVarsCache
().
problem
(),
element
,
fvGeometry
,
elemVolVars
,
scvf
);
(
*
this
)[
scvf
].
update
(
g
rid
FluxVarsCache
().
problem
(),
element
,
fvGeometry
,
elemVolVars
,
scvf
);
}
// access operator
...
...
@@ -153,11 +153,11 @@ public:
{
return
fluxVarsCache_
[
scvf
.
index
()];
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
std
::
vector
<
FluxVariablesCache
>
fluxVarsCache_
;
};
...
...
dumux/discretization/box/globalfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -33,7 +33,7 @@ namespace Dumux
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
,
bool
EnableGridFluxVariablesCache
>
class
BoxG
lobal
FluxVariablesCache
class
BoxG
rid
FluxVariablesCache
{};
/*!
...
...
@@ -41,7 +41,7 @@ class BoxGlobalFluxVariablesCache
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
>
class
BoxG
lobal
FluxVariablesCache
<
TypeTag
,
true
>
class
BoxG
rid
FluxVariablesCache
<
TypeTag
,
true
>
{
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
...
...
@@ -57,7 +57,7 @@ class BoxGlobalFluxVariablesCache<TypeTag, true>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
public:
BoxG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
BoxG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
const
GridVolumeVariables
&
gridVolVars
,
...
...
@@ -90,7 +90,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
BoxG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
BoxG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
const
Problem
&
problem
()
const
...
...
@@ -115,7 +115,7 @@ private:
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
>
class
BoxG
lobal
FluxVariablesCache
<
TypeTag
,
false
>
class
BoxG
rid
FluxVariablesCache
<
TypeTag
,
false
>
{
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
...
...
@@ -131,7 +131,7 @@ class BoxGlobalFluxVariablesCache<TypeTag, false>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
public:
BoxG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
BoxG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
const
GridVolumeVariables
&
gridVolVars
,
...
...
@@ -143,7 +143,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
BoxG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
BoxG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
const
Problem
&
problem
()
const
...
...
dumux/discretization/box/properties.hh
View file @
17c1a980
...
...
@@ -168,12 +168,12 @@ SET_TYPE_PROP(BoxModel, ElementVolumeVariables, BoxElementVolumeVariables<TypeTa
GET_PROP_VALUE
(
TypeTag
,
EnableGridVolumeVariablesCache
)
>
);
//! The global flux variables cache vector class
SET_TYPE_PROP
(
BoxModel
,
G
lobal
FluxVariablesCache
,
BoxG
lobal
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
SET_TYPE_PROP
(
BoxModel
,
G
rid
FluxVariablesCache
,
BoxG
rid
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! The local flux variables cache vector class
SET_TYPE_PROP
(
BoxModel
,
ElementFluxVariablesCache
,
BoxElementFluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! Set the BaseLocalResidual to BoxLocalResidual
SET_TYPE_PROP
(
BoxModel
,
BaseLocalResidual
,
BoxLocalResidual
<
TypeTag
>
);
...
...
dumux/discretization/cellcentered/mpfa/elementfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -36,7 +36,7 @@ namespace Dumux
* \brief Base class for the local flux variables cache.
* Prepares the cache on all the faces in the stencil.
*/
template
<
class
TypeTag
,
bool
EnableG
lobal
FluxVariablesCache
>
template
<
class
TypeTag
,
bool
EnableG
rid
FluxVariablesCache
>
class
CCMpfaElementFluxVariablesCache
;
/*!
...
...
@@ -53,12 +53,12 @@ class CCMpfaElementFluxVariablesCache<TypeTag, true>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariablesCache
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
public:
CCMpfaElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
CCMpfaElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// Specialization for the global caching being enabled - do nothing here
void
bindElement
(
const
Element
&
element
,
...
...
@@ -83,14 +83,14 @@ public:
// access operators in the case of caching
const
FluxVariablesCache
&
operator
[](
const
SubControlVolumeFace
&
scvf
)
const
{
return
(
*
g
lobal
FluxVarsCachePtr_
)[
scvf
];
}
{
return
(
*
g
rid
FluxVarsCachePtr_
)[
scvf
];
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
};
/*!
...
...
@@ -111,7 +111,7 @@ class CCMpfaElementFluxVariablesCache<TypeTag, false>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariablesCache
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
FluxVariablesCacheFiller
=
CCMpfaFluxVariablesCacheFiller
<
TypeTag
>
;
using
MpfaHelper
=
typename
GET_PROP_TYPE
(
TypeTag
,
MpfaHelper
);
...
...
@@ -122,8 +122,8 @@ class CCMpfaElementFluxVariablesCache<TypeTag, false>
static
constexpr
int
dim
=
GridView
::
dimension
;
public:
CCMpfaElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
CCMpfaElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// This function has to be called prior to flux calculations on the element.
// Prepares the transmissibilities of the scv faces in an element. The FvGeometry is assumed to be bound.
...
...
@@ -145,7 +145,7 @@ public:
clear_
();
// some references for convenience
const
auto
&
problem
=
g
lobal
FluxVarsCache
().
problem
();
const
auto
&
problem
=
g
rid
FluxVarsCache
().
problem
();
const
auto
&
fvGridGeometry
=
fvGeometry
.
fvGridGeometry
();
// the assembly map of the given element
...
...
@@ -219,7 +219,7 @@ public:
// update only if transmissibilities are solution-dependent
if
(
FluxVariablesCacheFiller
::
isSolDependent
)
{
const
auto
&
problem
=
g
lobal
FluxVarsCache
().
problem
();
const
auto
&
problem
=
g
rid
FluxVarsCache
().
problem
();
const
auto
&
fvGridGeometry
=
fvGeometry
.
fvGridGeometry
();
const
auto
&
assemblyMapI
=
fvGridGeometry
.
connectivityMap
()[
fvGridGeometry
.
elementMapper
().
index
(
element
)];
...
...
@@ -266,11 +266,11 @@ public:
{
return
fluxVarsCache_
[
getLocalScvfIdx_
(
scvfIdx
)];
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
void
clear_
()
{
...
...
dumux/discretization/cellcentered/mpfa/globalfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -32,8 +32,8 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
,
bool
EnableG
lobal
FluxVariablesCache
>
class
CCMpfaG
lobal
FluxVariablesCache
;
template
<
class
TypeTag
,
bool
EnableG
rid
FluxVariablesCache
>
class
CCMpfaG
rid
FluxVariablesCache
;
/*!
...
...
@@ -41,7 +41,7 @@ class CCMpfaGlobalFluxVariablesCache;
* \brief Spezialization when caching globally
*/
template
<
class
TypeTag
>
class
CCMpfaG
lobal
FluxVariablesCache
<
TypeTag
,
true
>
class
CCMpfaG
rid
FluxVariablesCache
<
TypeTag
,
true
>
{
// the flux variables cache filler needs to be friend to fill
// the interaction volumes and data handles
...
...
@@ -65,7 +65,7 @@ class CCMpfaGlobalFluxVariablesCache<TypeTag, true>
using
FluxVariablesCacheFiller
=
CCMpfaFluxVariablesCacheFiller
<
TypeTag
>
;
public:
CCMpfaG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
CCMpfaG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
// When global caching is enabled, precompute transmissibilities for all scv faces
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
...
...
@@ -163,7 +163,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
CCMpfaG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
CCMpfaG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
// access operators in the case of caching
...
...
@@ -202,7 +202,7 @@ private:
* \brief Spezialization when not using global caching
*/
template
<
class
TypeTag
>
class
CCMpfaG
lobal
FluxVariablesCache
<
TypeTag
,
false
>
class
CCMpfaG
rid
FluxVariablesCache
<
TypeTag
,
false
>
{
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
...
...
@@ -215,7 +215,7 @@ class CCMpfaGlobalFluxVariablesCache<TypeTag, false>
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
public:
CCMpfaG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
CCMpfaG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
// When global flux variables caching is disabled, we don't need to update the cache
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
...
...
@@ -232,7 +232,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
CCMpfaG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
CCMpfaG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
const
Problem
&
problem
()
const
...
...
dumux/discretization/cellcentered/mpfa/properties.hh
View file @
17c1a980
...
...
@@ -95,13 +95,13 @@ SET_TYPE_PROP(CCMpfaModel,
//! The global flux variables cache vector class
SET_TYPE_PROP
(
CCMpfaModel
,
G
lobal
FluxVariablesCache
,
CCMpfaG
lobal
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
G
rid
FluxVariablesCache
,
CCMpfaG
rid
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! The local flux variables cache vector class
SET_TYPE_PROP
(
CCMpfaModel
,
ElementFluxVariablesCache
,
CCMpfaElementFluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
CCMpfaElementFluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! The global previous volume variables vector class
...
...
dumux/discretization/cellcentered/tpfa/elementfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -34,7 +34,7 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the stencil local flux variables cache
*/
template
<
class
TypeTag
,
bool
EnableG
lobal
FluxVariablesCache
>
template
<
class
TypeTag
,
bool
EnableG
rid
FluxVariablesCache
>
class
CCTpfaElementFluxVariablesCache
;
/*!
...
...
@@ -51,12 +51,12 @@ class CCTpfaElementFluxVariablesCache<TypeTag, true>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariablesCache
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
public:
CCTpfaElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
CCTpfaElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// Specialization for the global caching being enabled - do nothing here
void
bindElement
(
const
Element
&
element
,
...
...
@@ -84,14 +84,14 @@ public:
// access operators in the case of caching
const
FluxVariablesCache
&
operator
[](
const
SubControlVolumeFace
&
scvf
)
const
{
return
g
lobal
FluxVarsCache
()[
scvf
];
}
{
return
g
rid
FluxVarsCache
()[
scvf
];
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
};
/*!
...
...
@@ -108,13 +108,13 @@ class CCTpfaElementFluxVariablesCache<TypeTag, false>
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
ElementVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementVolumeVariables
);
using
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluxVariablesCache
);
using
G
lobal
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FluxVariablesCache
);
using
G
rid
FluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FluxVariablesCache
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
FluxVariablesCacheFiller
=
CCTpfaFluxVariablesCacheFiller
<
TypeTag
>
;
public:
CCTpfaElementFluxVariablesCache
(
const
G
lobal
FluxVariablesCache
&
global
)
:
g
lobal
FluxVarsCachePtr_
(
&
global
)
{}
CCTpfaElementFluxVariablesCache
(
const
G
rid
FluxVariablesCache
&
global
)
:
g
rid
FluxVarsCachePtr_
(
&
global
)
{}
// This function has to be called prior to flux calculations on the element.
// Prepares the transmissibilities of the scv faces in an element. The FvGeometry is assumed to be bound.
...
...
@@ -128,7 +128,7 @@ public:
globalScvfIndices_
.
resize
(
numScvf
);
// instantiate helper class to fill the caches
FluxVariablesCacheFiller
filler
(
g
lobal
FluxVarsCache
().
problem
());
FluxVariablesCacheFiller
filler
(
g
rid
FluxVarsCache
().
problem
());
IndexType
localScvfIdx
=
0
;
// fill the containers
...
...
@@ -146,7 +146,7 @@ public:
const
FVElementGeometry
&
fvGeometry
,
const
ElementVolumeVariables
&
elemVolVars
)
{
const
auto
&
problem
=
g
lobal
FluxVarsCache
().
problem
();
const
auto
&
problem
=
g
rid
FluxVarsCache
().
problem
();
const
auto
&
fvGridGeometry
=
fvGeometry
.
fvGridGeometry
();
const
auto
globalI
=
fvGridGeometry
.
elementMapper
().
index
(
element
);
const
auto
&
connectivityMapI
=
fvGridGeometry
.
connectivityMap
()[
globalI
];
...
...
@@ -194,7 +194,7 @@ public:
globalScvfIndices_
.
resize
(
1
);
// instantiate helper class to fill the caches
FluxVariablesCacheFiller
filler
(
g
lobal
FluxVarsCache
().
problem
());
FluxVariablesCacheFiller
filler
(
g
rid
FluxVarsCache
().
problem
());
filler
.
fill
(
*
this
,
fluxVarsCache_
[
0
],
element
,
fvGeometry
,
elemVolVars
,
scvf
,
true
);
globalScvfIndices_
[
0
]
=
scvf
.
index
();
...
...
@@ -208,7 +208,7 @@ public:
{
if
(
FluxVariablesCacheFiller
::
isSolDependent
)
{
const
auto
&
problem
=
g
lobal
FluxVarsCache
().
problem
();
const
auto
&
problem
=
g
rid
FluxVarsCache
().
problem
();
const
auto
globalI
=
fvGeometry
.
fvGridGeometry
().
elementMapper
().
index
(
element
);
// instantiate filler class
...
...
@@ -237,11 +237,11 @@ public:
{
return
fluxVarsCache_
[
getLocalScvfIdx_
(
scvf
.
index
())];
}
//! The global object we are a restriction of
const
G
lobal
FluxVariablesCache
&
g
lobal
FluxVarsCache
()
const
{
return
*
g
lobal
FluxVarsCachePtr_
;
}
const
G
rid
FluxVariablesCache
&
g
rid
FluxVarsCache
()
const
{
return
*
g
rid
FluxVarsCachePtr_
;
}
private:
const
G
lobal
FluxVariablesCache
*
g
lobal
FluxVarsCachePtr_
;
const
G
rid
FluxVariablesCache
*
g
rid
FluxVarsCachePtr_
;
// get index of scvf in the local container
int
getLocalScvfIdx_
(
const
int
scvfIdx
)
const
...
...
dumux/discretization/cellcentered/tpfa/globalfluxvariablescache.hh
View file @
17c1a980
...
...
@@ -32,15 +32,15 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the flux variables cache vector, we store one cache per face
*/
template
<
class
TypeTag
,
bool
EnableG
lobal
FluxVariablesCache
>
class
CCTpfaG
lobal
FluxVariablesCache
;
template
<
class
TypeTag
,
bool
EnableG
rid
FluxVariablesCache
>
class
CCTpfaG
rid
FluxVariablesCache
;
/*!
* \ingroup ImplicitModel
* \brief Spezialization when caching globally
*/
template
<
class
TypeTag
>
class
CCTpfaG
lobal
FluxVariablesCache
<
TypeTag
,
true
>
class
CCTpfaG
rid
FluxVariablesCache
<
TypeTag
,
true
>
{
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
...
...
@@ -58,7 +58,7 @@ class CCTpfaGlobalFluxVariablesCache<TypeTag, true>
public:
// The constructor
CCTpfaG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
CCTpfaG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
// When global caching is enabled, precompute transmissibilities and stencils for all the scv faces
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
...
...
@@ -133,7 +133,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
CCTpfaG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
CCTpfaG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
private:
...
...
@@ -148,7 +148,7 @@ private:
* \brief Spezialization when not using global caching
*/
template
<
class
TypeTag
>
class
CCTpfaG
lobal
FluxVariablesCache
<
TypeTag
,
false
>
class
CCTpfaG
rid
FluxVariablesCache
<
TypeTag
,
false
>
{
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
...
...
@@ -162,7 +162,7 @@ class CCTpfaGlobalFluxVariablesCache<TypeTag, false>
public:
// The constructor
CCTpfaG
lobal
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
CCTpfaG
rid
FluxVariablesCache
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
// When global flux variables caching is disabled, we don't need to update the cache
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
...
...
@@ -182,7 +182,7 @@ public:
* The local object is only functional after calling its bind/bindElement method
* This is a free function that will be found by means of ADL
*/
friend
inline
ElementFluxVariablesCache
localView
(
const
CCTpfaG
lobal
FluxVariablesCache
&
global
)
friend
inline
ElementFluxVariablesCache
localView
(
const
CCTpfaG
rid
FluxVariablesCache
&
global
)
{
return
ElementFluxVariablesCache
(
global
);
}
private:
...
...
dumux/discretization/cellcentered/tpfa/properties.hh
View file @
17c1a980
...
...
@@ -69,7 +69,7 @@ SET_PROP(CCTpfaModel, DiscretizationMethod)
SET_TYPE_PROP
(
CCTpfaModel
,
FVGridGeometry
,
CCTpfaFVGridGeometry
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableFVGridGeometryCache
)
>
);
//! The global flux variables cache vector class
SET_TYPE_PROP
(
CCTpfaModel
,
G
lobal
FluxVariablesCache
,
CCTpfaG
lobal
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
SET_TYPE_PROP
(
CCTpfaModel
,
G
rid
FluxVariablesCache
,
CCTpfaG
rid
FluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! Set the default for the local finite volume geometry
SET_TYPE_PROP
(
CCTpfaModel
,
FVElementGeometry
,
CCTpfaFVElementGeometry
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableFVGridGeometryCache
)
>
);
...
...
@@ -78,7 +78,7 @@ SET_TYPE_PROP(CCTpfaModel, FVElementGeometry, CCTpfaFVElementGeometry<TypeTag, G
SET_TYPE_PROP
(
CCTpfaModel
,
ElementVolumeVariables
,
CCTpfaElementVolumeVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableGridVolumeVariablesCache
)
>
);
//! The local flux variables cache vector class
SET_TYPE_PROP
(
CCTpfaModel
,
ElementFluxVariablesCache
,
CCTpfaElementFluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FluxVariablesCache
)
>
);
SET_TYPE_PROP
(
CCTpfaModel
,
ElementFluxVariablesCache
,
CCTpfaElementFluxVariablesCache
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FluxVariablesCache
)
>
);
//! The global current volume variables vector class
SET_TYPE_PROP
(
CCTpfaModel
,
GridVolumeVariables
,
CCGridVolumeVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableGridVolumeVariablesCache
)
>
);
...
...
dumux/discretization/fvgridvariables.hh
View file @
17c1a980
...
...
@@ -38,7 +38,7 @@ class FVGridVariables
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
);