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
a45b6171
Commit
a45b6171
authored
Dec 21, 2017
by
Kilian Weishaupt
Browse files
[staggered] Rename globalFaceVars -> gridFaceVars
parent
c0779a22
Changes
6
Hide whitespace changes
Inline
Side-by-side
dumux/assembly/staggeredlocalassembler.hh
View file @
a45b6171
...
...
@@ -70,7 +70,7 @@ class StaggeredLocalAssembler<TypeTag,
using
NumEqVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
);
using
ElementBoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementBoundaryTypes
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
G
lobal
FaceVars
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FaceVars
);
using
G
rid
FaceVar
iable
s
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FaceVar
iable
s
);
using
ElementFluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementFluxVariablesCache
);
using
Element
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
::
template
Codim
<
0
>
::
Entity
;
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
...
...
@@ -649,14 +649,14 @@ private:
{
return
gridVolVars
.
volVars
(
scv
);
}
template
<
class
T
=
TypeTag
>
static
typename
std
::
enable_if
<!
GET_PROP_VALUE
(
T
,
EnableG
lobal
FaceVariablesCache
),
FaceVariables
&>::
type
getFaceVarAccess
(
G
lobal
FaceVars
&
g
ridFaceVars
,
ElementFaceVariables
&
elemFaceVars
,
const
SubControlVolumeFace
&
scvf
)
static
typename
std
::
enable_if
<!
GET_PROP_VALUE
(
T
,
EnableG
rid
FaceVariablesCache
),
FaceVariables
&>::
type
getFaceVarAccess
(
G
rid
FaceVar
iable
s
&
G
ridFaceVar
iable
s
,
ElementFaceVariables
&
elemFaceVars
,
const
SubControlVolumeFace
&
scvf
)
{
return
elemFaceVars
[
scvf
];
}
template
<
class
T
=
TypeTag
>
static
typename
std
::
enable_if
<
GET_PROP_VALUE
(
T
,
EnableG
lobal
FaceVariablesCache
),
FaceVariables
&>::
type
getFaceVarAccess
(
G
lobal
FaceVars
&
g
ridFaceVars
,
ElementFaceVariables
&
elemFaceVars
,
const
SubControlVolumeFace
&
scvf
)
{
return
g
ridFaceVars
.
faceVars
(
scvf
.
index
());
}
static
typename
std
::
enable_if
<
GET_PROP_VALUE
(
T
,
EnableG
rid
FaceVariablesCache
),
FaceVariables
&>::
type
getFaceVarAccess
(
G
rid
FaceVar
iable
s
&
G
ridFaceVar
iable
s
,
ElementFaceVariables
&
elemFaceVars
,
const
SubControlVolumeFace
&
scvf
)
{
return
G
ridFaceVar
iable
s
.
faceVars
(
scvf
.
index
());
}
};
}
// end namespace Dumux
...
...
dumux/common/properties.hh
View file @
a45b6171
...
...
@@ -186,9 +186,7 @@ NEW_PROP_TAG(NumEqCellCenter); //!< The number of equations
NEW_PROP_TAG
(
NumEqFace
);
//!< The number of equations for face dofs
NEW_PROP_TAG
(
CellCenterSolutionVector
);
//!< The solution vector type for cell-centered dofs
NEW_PROP_TAG
(
FaceSolutionVector
);
//!< The solution vector type for face dofs
NEW_PROP_TAG
(
StaggeredFaceSolution
);
//!< The solution on the face
NEW_PROP_TAG
(
GlobalFaceVars
);
//!< Class containing face-related data
NEW_PROP_TAG
(
ElementFaceVariables
);
//!< Face data per element
NEW_PROP_TAG
(
GridFaceVariables
);
//!< Global vector containing face-related data
NEW_PROP_TAG
(
CellCenterPrimaryVariables
);
//!< The primary variables container type for cell-centered dofs
NEW_PROP_TAG
(
FacePrimaryVariables
);
//!< The primary variables container type for face dofs
NEW_PROP_TAG
(
IntersectionMapper
);
//!< Specifies the intersection mapper
...
...
@@ -198,7 +196,7 @@ NEW_PROP_TAG(StaggeredPrimaryVariables); //!< The hybrid primary varia
NEW_PROP_TAG
(
BaseEpsilon
);
//!< A base epsilon for numerical differentiation, can contain multiple values
NEW_PROP_TAG
(
FaceVariables
);
//!< Class containing local face-related data
NEW_PROP_TAG
(
BoundaryValues
);
//!< Class containing local boundary data
NEW_PROP_TAG
(
EnableG
lobal
FaceVariablesCache
);
//!<
If the face variables are cached on the gridview
NEW_PROP_TAG
(
EnableG
rid
FaceVariablesCache
);
//!<
Switch on/off caching of face variables
/////////////////////////////////////////////////////////////
// Properties used by the mpnc model
...
...
dumux/discretization/staggered/elementfacevariables.hh
View file @
a45b6171
...
...
@@ -32,34 +32,34 @@ namespace Dumux
* \ingroup ImplicitModel
* \brief Base class for the face variables vector
*/
template
<
class
TypeTag
,
bool
enableG
lobal
FaceVarsCache
>
template
<
class
TypeTag
,
bool
enableG
rid
FaceVar
iable
sCache
>
class
StaggeredElementFaceVariables
{};
template
<
class
TypeTag
>
class
StaggeredElementFaceVariables
<
TypeTag
,
/*enableG
lobal
FaceVarsCache*/
true
>
class
StaggeredElementFaceVariables
<
TypeTag
,
/*enableG
rid
FaceVar
iable
sCache*/
true
>
{
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
G
lobal
FaceVars
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FaceVars
);
using
G
rid
FaceVar
iable
s
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FaceVar
iable
s
);
using
FaceVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
FaceVariables
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
IndexType
=
typename
GridView
::
IndexSet
::
IndexType
;
public:
StaggeredElementFaceVariables
(
const
G
lobal
FaceVar
s
&
global
Face
s
Vars
)
:
g
lobal
FaceVarsPtr_
(
&
g
lobal
Face
s
Vars
)
{}
StaggeredElementFaceVariables
(
const
G
rid
FaceVar
iables
&
grid
FaceVar
iable
s
)
:
g
rid
FaceVar
iable
sPtr_
(
&
g
rid
FaceVar
iable
s
)
{}
const
FaceVariables
&
operator
[](
const
SubControlVolumeFace
&
scvf
)
const
{
return
g
lobal
FaceVars
().
faceVars
(
scvf
.
index
());
}
{
return
g
rid
FaceVar
iable
s
().
faceVars
(
scvf
.
index
());
}
// operator for the access with an index
// needed for cc methods for the access to the boundary volume variables
const
FaceVariables
&
operator
[](
const
IndexType
scvfIdx
)
const
{
return
g
lobal
FaceVars
().
faceVars
(
scvfIdx
);
}
{
return
g
rid
FaceVar
iable
s
().
faceVars
(
scvfIdx
);
}
//! For compatibility reasons with the case of not storing the face vars.
...
...
@@ -78,22 +78,22 @@ public:
//! The global volume variables object we are a restriction of
const
G
lobal
FaceVar
s
&
global
FaceVars
()
const
{
return
*
g
lobal
FaceVarsPtr_
;
}
const
G
rid
FaceVar
iables
&
grid
FaceVar
iable
s
()
const
{
return
*
g
rid
FaceVar
iable
sPtr_
;
}
private:
const
G
lobal
FaceVar
s
*
global
FaceVarsPtr_
;
const
G
rid
FaceVar
iables
*
grid
FaceVar
iable
sPtr_
;
};
template
<
class
TypeTag
>
class
StaggeredElementFaceVariables
<
TypeTag
,
/*enableG
lobal
FaceVarsCache*/
false
>
class
StaggeredElementFaceVariables
<
TypeTag
,
/*enableG
rid
FaceVar
iable
sCache*/
false
>
{
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
G
lobal
FaceVars
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FaceVars
);
using
G
rid
FaceVar
iable
s
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FaceVar
iable
s
);
using
FaceVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
FaceVariables
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
IndexType
=
typename
GridView
::
IndexSet
::
IndexType
;
...
...
@@ -104,7 +104,7 @@ class StaggeredElementFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/false>
public:
StaggeredElementFaceVariables
(
const
G
lobal
FaceVars
&
globalFacesVars
)
:
g
lobal
FaceVarsPtr_
(
&
globalFacesVars
)
{}
StaggeredElementFaceVariables
(
const
G
rid
FaceVar
iable
s
&
globalFacesVars
)
:
g
rid
FaceVar
iable
sPtr_
(
&
globalFacesVars
)
{}
const
FaceVariables
&
operator
[](
const
SubControlVolumeFace
&
scvf
)
const
{
return
faceVariables_
[
scvf
.
localFaceIdx
()];
}
...
...
@@ -131,7 +131,7 @@ public:
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
faceVariables_
[
scvf
.
localFaceIdx
()].
update
(
sol
[
faceIdx
],
global
FaceVars
().
problem
(),
element
,
fvGeometry
,
scvf
);
faceVariables_
[
scvf
.
localFaceIdx
()].
update
(
sol
[
faceIdx
],
Grid
FaceVar
iable
s
().
problem
(),
element
,
fvGeometry
,
scvf
);
faceVarIndices_
[
scvf
.
localFaceIdx
()]
=
scvf
.
index
();
}
}
...
...
@@ -153,8 +153,8 @@ public:
}
//! The global volume variables object we are a restriction of
const
G
lobal
FaceVar
s
&
global
FaceVars
()
const
{
return
*
g
lobal
FaceVarsPtr_
;
}
const
G
rid
FaceVar
iables
&
grid
FaceVar
iable
s
()
const
{
return
*
g
rid
FaceVar
iable
sPtr_
;
}
private:
...
...
@@ -165,7 +165,7 @@ private:
return
std
::
distance
(
faceVarIndices_
.
begin
(),
it
);
}
const
G
lobal
FaceVar
s
*
global
FaceVarsPtr_
;
const
G
rid
FaceVar
iables
*
grid
FaceVar
iable
sPtr_
;
std
::
vector
<
IndexType
>
faceVarIndices_
;
std
::
vector
<
FaceVariables
>
faceVariables_
;
};
...
...
dumux/discretization/staggered/g
lobal
facevariables.hh
→
dumux/discretization/staggered/g
rid
facevariables.hh
View file @
a45b6171
...
...
@@ -29,17 +29,12 @@
namespace
Dumux
{
namespace
Properties
{
NEW_PROP_TAG
(
ElementFaceVariables
);
}
template
<
class
TypeTag
,
bool
enableGlobalFaceVarsCache
>
class
StaggeredG
lobal
FaceVariables
class
StaggeredG
rid
FaceVariables
{};
template
<
class
TypeTag
>
class
StaggeredG
lobal
FaceVariables
<
TypeTag
,
/*enableGlobalFaceVarsCache*/
true
>
class
StaggeredG
rid
FaceVariables
<
TypeTag
,
/*enableGlobalFaceVarsCache*/
true
>
{
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
...
...
@@ -55,7 +50,7 @@ class StaggeredGlobalFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/true>
typename
DofTypeIndices
::
FaceIdx
faceIdx
;
public:
StaggeredG
lobal
FaceVariables
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
StaggeredG
rid
FaceVariables
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
const
SolutionVector
&
sol
)
{
...
...
@@ -86,7 +81,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
ElementFaceVariables
localView
(
const
StaggeredG
lobal
FaceVariables
&
global
)
friend
inline
ElementFaceVariables
localView
(
const
StaggeredG
rid
FaceVariables
&
global
)
{
return
ElementFaceVariables
(
global
);
}
const
Problem
&
problem
()
const
...
...
@@ -100,7 +95,7 @@ private:
};
template
<
class
TypeTag
>
class
StaggeredG
lobal
FaceVariables
<
TypeTag
,
/*enableGlobalFaceVarsCache*/
false
>
class
StaggeredG
rid
FaceVariables
<
TypeTag
,
/*enableGlobalFaceVarsCache*/
false
>
{
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
...
...
@@ -116,7 +111,7 @@ class StaggeredGlobalFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/false>
typename
DofTypeIndices
::
FaceIdx
faceIdx
;
public:
StaggeredG
lobal
FaceVariables
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
StaggeredG
rid
FaceVariables
(
const
Problem
&
problem
)
:
problemPtr_
(
&
problem
)
{}
void
update
(
const
FVGridGeometry
&
fvGridGeometry
,
const
SolutionVector
&
sol
)
{
}
...
...
@@ -126,7 +121,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
ElementFaceVariables
localView
(
const
StaggeredG
lobal
FaceVariables
&
global
)
friend
inline
ElementFaceVariables
localView
(
const
StaggeredG
rid
FaceVariables
&
global
)
{
return
ElementFaceVariables
(
global
);
}
const
Problem
&
problem
()
const
...
...
dumux/discretization/staggered/gridvariables.hh
View file @
a45b6171
...
...
@@ -40,7 +40,7 @@ class StaggeredGridVariables : public FVGridVariables<TypeTag>
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
);
using
GridVolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridVolumeVariables
);
using
GridFaceVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
lobal
FaceVars
);
using
GridFaceVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
G
rid
FaceVar
iable
s
);
using
GridFluxVariablesCache
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridFluxVariablesCache
);
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
...
...
dumux/discretization/staggered/properties.hh
View file @
a45b6171
...
...
@@ -42,7 +42,7 @@
#include <dumux/discretization/staggered/elementvolumevariables.hh>
#include <dumux/discretization/staggered/fvgridgeometry.hh>
#include <dumux/discretization/staggered/fvelementgeometry.hh>
#include <dumux/discretization/staggered/g
lobal
facevariables.hh>
#include <dumux/discretization/staggered/g
rid
facevariables.hh>
#include <dumux/discretization/staggered/facesolution.hh>
#include <dumux/discretization/staggered/elementfacevariables.hh>
#include <dumux/discretization/staggered/subcontrolvolumeface.hh>
...
...
@@ -64,7 +64,6 @@ NEW_PROP_TAG(CellCenterSolutionVector);
NEW_PROP_TAG
(
FaceSolutionVector
);
NEW_PROP_TAG
(
StaggeredFaceSolution
);
NEW_PROP_TAG
(
ElementFaceVariables
);
NEW_PROP_TAG
(
EnableGlobalFaceVariablesCache
);
//! Type tag for the staggered scheme.
NEW_TYPE_TAG
(
StaggeredModel
,
INHERITS_FROM
(
FiniteVolumeModel
));
...
...
@@ -128,7 +127,8 @@ public:
using
type
=
BaseStaggeredGeometryHelper
<
GridView
>
;
};
SET_TYPE_PROP
(
StaggeredModel
,
GlobalFaceVars
,
StaggeredGlobalFaceVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableGlobalFaceVariablesCache
)
>
);
//! Set the default global face variables
SET_TYPE_PROP
(
StaggeredModel
,
GridFaceVariables
,
StaggeredGridFaceVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableGridFaceVariablesCache
)
>
);
//! Set the default for the ElementBoundaryTypes
SET_TYPE_PROP
(
StaggeredModel
,
ElementBoundaryTypes
,
CCElementBoundaryTypes
<
TypeTag
>
);
...
...
@@ -152,9 +152,9 @@ SET_TYPE_PROP(StaggeredModel, IntersectionMapper, ConformingGridIntersectionMapp
SET_TYPE_PROP
(
StaggeredModel
,
StaggeredFaceSolution
,
StaggeredFaceSolution
<
TypeTag
>
);
SET_TYPE_PROP
(
StaggeredModel
,
ElementFaceVariables
,
StaggeredElementFaceVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
lobal
FaceVariablesCache
)
>
);
SET_TYPE_PROP
(
StaggeredModel
,
ElementFaceVariables
,
StaggeredElementFaceVariables
<
TypeTag
,
GET_PROP_VALUE
(
TypeTag
,
EnableG
rid
FaceVariablesCache
)
>
);
SET_BOOL_PROP
(
StaggeredModel
,
EnableG
lobal
FaceVariablesCache
,
true
);
SET_BOOL_PROP
(
StaggeredModel
,
EnableG
rid
FaceVariablesCache
,
true
);
//! Definition of the indices for cell center and face dofs in the global solution vector
SET_PROP
(
StaggeredModel
,
DofTypeIndices
)
...
...
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