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
99c6d1d5
Commit
99c6d1d5
authored
Aug 23, 2017
by
Timo Koch
Browse files
[next] Rename GlobalFvGeometry -> FVGridGeometry
parent
d4663f86
Changes
105
Hide whitespace changes
Inline
Side-by-side
dumux/common/pointsource.hh
View file @
99c6d1d5
...
...
@@ -380,7 +380,7 @@ public:
// check in which subcontrolvolume(s) we are
// TODO mapper/problem in bboxtree would allow to make this much better
const
auto
element
=
boundingBoxTree
.
entity
(
eIdx
);
auto
fvGeometry
=
localView
(
problem
.
model
().
globalFv
Geometry
());
auto
fvGeometry
=
localView
(
problem
.
model
().
fvGrid
Geometry
());
fvGeometry
.
bindElement
(
element
);
const
auto
globalPos
=
source
.
position
();
...
...
dumux/discretization/box/fvelementgeometry.hh
View file @
99c6d1d5
...
...
@@ -36,8 +36,8 @@ namespace Dumux
{
//! forward declaration of the global finite volume geometry
template
<
class
TypeTag
,
bool
Enable
GlobalFV
GeometryCache
>
class
Box
GlobalFV
Geometry
;
template
<
class
TypeTag
,
bool
Enable
FVGrid
GeometryCache
>
class
Box
FVGrid
Geometry
;
/*!
* \ingroup ImplicitModel
...
...
@@ -45,7 +45,7 @@ class BoxGlobalFVGeometry;
* This builds up the sub control volumes and sub control volume faces
* for each element.
*/
template
<
class
TypeTag
,
bool
Enable
GlobalFV
GeometryCache
>
template
<
class
TypeTag
,
bool
Enable
FVGrid
GeometryCache
>
class
BoxFVElementGeometry
{};
...
...
@@ -60,7 +60,7 @@ class BoxFVElementGeometry<TypeTag, true>
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalFV
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
GlobalFV
Geometry
);
using
FVGrid
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGrid
Geometry
);
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
);
using
CoordScalar
=
typename
GridView
::
ctype
;
...
...
@@ -77,19 +77,19 @@ class BoxFVElementGeometry<TypeTag, true>
public:
//! Constructor
BoxFVElementGeometry
(
const
GlobalFV
Geometry
&
globalFv
Geometry
)
:
globalFv
GeometryPtr_
(
&
globalFv
Geometry
)
{}
BoxFVElementGeometry
(
const
FVGrid
Geometry
&
fvGrid
Geometry
)
:
fvGrid
GeometryPtr_
(
&
fvGrid
Geometry
)
{}
//! Get a sub control volume with a local scv index
const
SubControlVolume
&
scv
(
IndexType
scvIdx
)
const
{
return
globalFv
Geometry
().
scvs
(
eIdx_
)[
scvIdx
];
return
fvGrid
Geometry
().
scvs
(
eIdx_
)[
scvIdx
];
}
//! Get a sub control volume face with a local scvf index
const
SubControlVolumeFace
&
scvf
(
IndexType
scvfIdx
)
const
{
return
globalFv
Geometry
().
scvfs
(
eIdx_
)[
scvfIdx
];
return
fvGrid
Geometry
().
scvfs
(
eIdx_
)[
scvfIdx
];
}
//! iterator range for sub control volumes. Iterates over
...
...
@@ -100,7 +100,7 @@ public:
friend
inline
Dune
::
IteratorRange
<
typename
std
::
vector
<
SubControlVolume
>::
const_iterator
>
scvs
(
const
BoxFVElementGeometry
&
fvGeometry
)
{
const
auto
&
g
=
fvGeometry
.
globalFv
Geometry
();
const
auto
&
g
=
fvGeometry
.
fvGrid
Geometry
();
using
Iter
=
typename
std
::
vector
<
SubControlVolume
>::
const_iterator
;
return
Dune
::
IteratorRange
<
Iter
>
(
g
.
scvs
(
fvGeometry
.
eIdx_
).
begin
(),
g
.
scvs
(
fvGeometry
.
eIdx_
).
end
());
}
...
...
@@ -113,7 +113,7 @@ public:
friend
inline
Dune
::
IteratorRange
<
typename
std
::
vector
<
SubControlVolumeFace
>::
const_iterator
>
scvfs
(
const
BoxFVElementGeometry
&
fvGeometry
)
{
const
auto
&
g
=
fvGeometry
.
globalFv
Geometry
();
const
auto
&
g
=
fvGeometry
.
fvGrid
Geometry
();
using
Iter
=
typename
std
::
vector
<
SubControlVolumeFace
>::
const_iterator
;
return
Dune
::
IteratorRange
<
Iter
>
(
g
.
scvfs
(
fvGeometry
.
eIdx_
).
begin
(),
g
.
scvfs
(
fvGeometry
.
eIdx_
).
end
());
}
...
...
@@ -121,19 +121,19 @@ public:
//! Get a local finite element basis
const
FeLocalBasis
&
feLocalBasis
()
const
{
return
globalFv
Geometry
().
feCache
().
get
(
elementPtr_
->
geometry
().
type
()).
localBasis
();
return
fvGrid
Geometry
().
feCache
().
get
(
elementPtr_
->
geometry
().
type
()).
localBasis
();
}
//! The total number of sub control volumes
std
::
size_t
numScv
()
const
{
return
globalFv
Geometry
().
scvs
(
eIdx_
).
size
();
return
fvGrid
Geometry
().
scvs
(
eIdx_
).
size
();
}
//! The total number of sub control volume faces
std
::
size_t
numScvf
()
const
{
return
globalFv
Geometry
().
scvfs
(
eIdx_
).
size
();
return
fvGrid
Geometry
().
scvfs
(
eIdx_
).
size
();
}
//! this function is for compatibility reasons with cc methods
...
...
@@ -150,16 +150,16 @@ public:
void
bindElement
(
const
Element
&
element
)
{
elementPtr_
=
&
element
;
eIdx_
=
globalFv
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
eIdx_
=
fvGrid
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
}
//! The global finite volume geometry we are a restriction of
const
GlobalFV
Geometry
&
globalFv
Geometry
()
const
{
return
*
globalFv
GeometryPtr_
;
}
const
FVGrid
Geometry
&
fvGrid
Geometry
()
const
{
return
*
fvGrid
GeometryPtr_
;
}
private:
const
Element
*
elementPtr_
;
const
GlobalFV
Geometry
*
globalFv
GeometryPtr_
;
const
FVGrid
Geometry
*
fvGrid
GeometryPtr_
;
IndexType
eIdx_
;
};
...
...
@@ -174,7 +174,7 @@ class BoxFVElementGeometry<TypeTag, false>
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
FVElementGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVElementGeometry
);
using
GlobalFV
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
GlobalFV
Geometry
);
using
FVGrid
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGrid
Geometry
);
static
const
int
dim
=
GridView
::
dimension
;
static
const
int
dimWorld
=
GridView
::
dimensionworld
;
...
...
@@ -192,8 +192,8 @@ class BoxFVElementGeometry<TypeTag, false>
public:
//! Constructor
BoxFVElementGeometry
(
const
GlobalFV
Geometry
&
globalFv
Geometry
)
:
globalFv
GeometryPtr_
(
&
globalFv
Geometry
)
{}
BoxFVElementGeometry
(
const
FVGrid
Geometry
&
fvGrid
Geometry
)
:
fvGrid
GeometryPtr_
(
&
fvGrid
Geometry
)
{}
//! Get a sub control volume with a local scv index
const
SubControlVolume
&
scv
(
IndexType
scvIdx
)
const
...
...
@@ -234,7 +234,7 @@ public:
//! Get a local finite element basis
const
FeLocalBasis
&
feLocalBasis
()
const
{
return
globalFv
Geometry
().
feCache
().
get
(
elementPtr_
->
geometry
().
type
()).
localBasis
();
return
fvGrid
Geometry
().
feCache
().
get
(
elementPtr_
->
geometry
().
type
()).
localBasis
();
}
//! The total number of sub control volumes
...
...
@@ -263,19 +263,19 @@ public:
void
bindElement
(
const
Element
&
element
)
{
elementPtr_
=
&
element
;
eIdx_
=
globalFv
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
eIdx_
=
fvGrid
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
makeElementGeometries
(
element
);
}
//! The global finite volume geometry we are a restriction of
const
GlobalFV
Geometry
&
globalFv
Geometry
()
const
{
return
*
globalFv
GeometryPtr_
;
}
const
FVGrid
Geometry
&
fvGrid
Geometry
()
const
{
return
*
fvGrid
GeometryPtr_
;
}
private:
void
makeElementGeometries
(
const
Element
&
element
)
{
auto
eIdx
=
globalFv
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
auto
eIdx
=
fvGrid
Geometry
().
problem_
().
elementMapper
().
index
(
element
);
// get the element geometry
auto
elementGeometry
=
element
.
geometry
();
...
...
@@ -289,7 +289,7 @@ private:
for
(
unsigned
int
scvLocalIdx
=
0
;
scvLocalIdx
<
elementGeometry
.
corners
();
++
scvLocalIdx
)
{
// get asssociated dof index
auto
dofIdxGlobal
=
globalFv
Geometry
().
problem_
().
vertexMapper
().
subIndex
(
element
,
scvLocalIdx
,
dim
);
auto
dofIdxGlobal
=
fvGrid
Geometry
().
problem_
().
vertexMapper
().
subIndex
(
element
,
scvLocalIdx
,
dim
);
// add scv to the local container
scvs_
[
scvLocalIdx
]
=
SubControlVolume
(
geometryHelper
,
...
...
@@ -318,7 +318,7 @@ private:
}
// construct the sub control volume faces on the domain boundary
for
(
const
auto
&
intersection
:
intersections
(
globalFv
Geometry
().
gridView
(),
element
))
for
(
const
auto
&
intersection
:
intersections
(
fvGrid
Geometry
().
gridView
(),
element
))
{
if
(
intersection
.
boundary
())
{
...
...
@@ -350,7 +350,7 @@ private:
IndexType
eIdx_
;
//! The global geometry this is a restriction of
const
GlobalFV
Geometry
*
globalFv
GeometryPtr_
;
const
FVGrid
Geometry
*
fvGrid
GeometryPtr_
;
//! vectors to store the geometries locally after binding an element
std
::
vector
<
SubControlVolume
>
scvs_
;
...
...
dumux/discretization/box/
globalfv
geometry.hh
→
dumux/discretization/box/
fvgrid
geometry.hh
View file @
99c6d1d5
...
...
@@ -42,13 +42,13 @@ namespace Dumux
* This builds up the sub control volumes and sub control volume faces
* for each element.
*/
template
<
class
TypeTag
,
bool
Enable
GlobalFV
GeometryCache
>
class
Box
GlobalFV
Geometry
template
<
class
TypeTag
,
bool
Enable
FVGrid
GeometryCache
>
class
Box
FVGrid
Geometry
{};
// specialization in case the FVElementGeometries are stored
template
<
class
TypeTag
>
class
Box
GlobalFV
Geometry
<
TypeTag
,
true
>
class
Box
FVGrid
Geometry
<
TypeTag
,
true
>
{
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
...
...
@@ -75,7 +75,7 @@ class BoxGlobalFVGeometry<TypeTag, true>
public:
//! Constructor
Box
GlobalFV
Geometry
(
const
GridView
gridView
)
Box
FVGrid
Geometry
(
const
GridView
gridView
)
:
gridView_
(
gridView
)
{}
//! The total number of sub control volumes
...
...
@@ -193,7 +193,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
FVElementGeometry
localView
(
const
Box
GlobalFV
Geometry
&
global
)
friend
FVElementGeometry
localView
(
const
Box
FVGrid
Geometry
&
global
)
{
return
FVElementGeometry
(
global
);
}
...
...
@@ -228,7 +228,7 @@ private:
// specialization in case the FVElementGeometries are not stored
template
<
class
TypeTag
>
class
Box
GlobalFV
Geometry
<
TypeTag
,
false
>
class
Box
FVGrid
Geometry
<
TypeTag
,
false
>
{
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
);
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
);
...
...
@@ -255,7 +255,7 @@ class BoxGlobalFVGeometry<TypeTag, false>
public:
//! Constructor
Box
GlobalFV
Geometry
(
const
GridView
gridView
)
Box
FVGrid
Geometry
(
const
GridView
gridView
)
:
gridView_
(
gridView
)
{}
...
...
@@ -309,7 +309,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
FVElementGeometry
localView
(
const
Box
GlobalFV
Geometry
&
global
)
friend
FVElementGeometry
localView
(
const
Box
FVGrid
Geometry
&
global
)
{
return
FVElementGeometry
(
global
);
}
...
...
dumux/discretization/box/globalfluxvariablescache.hh
View file @
99c6d1d5
...
...
@@ -65,7 +65,7 @@ public:
{
auto
eIdx
=
problem
.
elementMapper
().
index
(
element
);
// bind the geometries and volume variables to the element (all the elements in stencil)
auto
fvGeometry
=
localView
(
problem
.
model
().
globalFv
Geometry
());
auto
fvGeometry
=
localView
(
problem
.
model
().
fvGrid
Geometry
());
fvGeometry
.
bind
(
element
);
auto
elemVolVars
=
localView
(
problem
.
model
().
curGlobalVolVars
());
...
...
dumux/discretization/box/globalvolumevariables.hh
View file @
99c6d1d5
...
...
@@ -70,7 +70,7 @@ public:
{
auto
eIdx
=
problem_
().
elementMapper
().
index
(
element
);
auto
fvGeometry
=
localView
(
problem
.
model
().
globalFv
Geometry
());
auto
fvGeometry
=
localView
(
problem
.
model
().
fvGrid
Geometry
());
fvGeometry
.
bindElement
(
element
);
// get the element solution
...
...
dumux/discretization/cellcentered/globalvolumevariables.hh
View file @
99c6d1d5
...
...
@@ -66,13 +66,13 @@ public:
{
problemPtr_
=
&
problem
;
auto
numScv
=
problem
.
model
().
globalFv
Geometry
().
numScv
();
auto
numBoundaryScvf
=
problem
.
model
().
globalFv
Geometry
().
numBoundaryScvf
();
auto
numScv
=
problem
.
model
().
fvGrid
Geometry
().
numScv
();
auto
numBoundaryScvf
=
problem
.
model
().
fvGrid
Geometry
().
numBoundaryScvf
();
volumeVariables_
.
resize
(
numScv
+
numBoundaryScvf
);
for
(
const
auto
&
element
:
elements
(
problem
.
gridView
()))
{
auto
fvGeometry
=
localView
(
problem
.
model
().
globalFv
Geometry
());
auto
fvGeometry
=
localView
(
problem
.
model
().
fvGrid
Geometry
());
fvGeometry
.
bindElement
(
element
);
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
...
...
dumux/discretization/cellcentered/mpfa/darcyslaw.hh
View file @
99c6d1d5
...
...
@@ -138,7 +138,7 @@ class DarcysLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
const
FluxVariablesCacheFiller
&
fluxVarsCacheFiller
)
{
// get interaction volume from the flux vars cache filler & upate the cache
if
(
problem
.
model
().
globalFv
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
if
(
problem
.
model
().
fvGrid
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
scvfFluxVarsCache
.
updateAdvection
(
fluxVarsCacheFiller
.
boundaryInteractionVolume
(),
scvf
);
else
scvfFluxVarsCache
.
updateAdvection
(
fluxVarsCacheFiller
.
interactionVolume
(),
scvf
);
...
...
dumux/discretization/cellcentered/mpfa/elementfluxvariablescache.hh
View file @
99c6d1d5
...
...
@@ -180,7 +180,7 @@ public:
auto
&
scvfCache
=
(
*
this
)[
scvf
];
if
(
!
scvfCache
.
isUpdated
())
{
auto
elementJ
=
problem
.
model
().
globalFv
Geometry
().
element
(
dataJ
.
globalJ
);
auto
elementJ
=
problem
.
model
().
fvGrid
Geometry
().
element
(
dataJ
.
globalJ
);
filler
.
fill
(
*
this
,
scvfCache
,
elementJ
,
fvGeometry
,
elemVolVars
,
scvf
);
}
}
...
...
@@ -249,7 +249,7 @@ private:
const
auto
scvfInsideScvIdx
=
scvf
.
insideScvIdx
();
const
auto
insideElement
=
scvfInsideScvIdx
==
globalI
?
element
:
problem
.
model
().
globalFv
Geometry
().
element
(
scvfInsideScvIdx
);
problem
.
model
().
fvGrid
Geometry
().
element
(
scvfInsideScvIdx
);
filler
.
update
(
*
this
,
scvfCache
,
insideElement
,
fvGeometry
,
elemVolVars
,
scvf
);
}
...
...
dumux/discretization/cellcentered/mpfa/elementvolumevariables.hh
View file @
99c6d1d5
...
...
@@ -118,7 +118,7 @@ public:
const
SolutionVector
&
sol
)
{
const
auto
&
problem
=
globalVolVars
().
problem_
();
const
auto
&
globalFv
Geometry
=
problem
.
model
().
globalFv
Geometry
();
const
auto
&
fvGrid
Geometry
=
problem
.
model
().
fvGrid
Geometry
();
// stencil information
const
auto
globalI
=
problem
.
elementMapper
().
index
(
element
);
...
...
@@ -143,7 +143,7 @@ public:
// Update the volume variables of the neighboring elements
for
(
auto
&&
dataJ
:
assemblyMapI
)
{
const
auto
&
elementJ
=
globalFv
Geometry
.
element
(
dataJ
.
globalJ
);
const
auto
&
elementJ
=
fvGrid
Geometry
.
element
(
dataJ
.
globalJ
);
auto
&&
scvJ
=
fvGeometry
.
scv
(
dataJ
.
globalJ
);
volumeVariables_
[
localIdx
].
update
(
problem
.
model
().
elementSolution
(
elementJ
,
sol
),
problem
,
...
...
@@ -195,11 +195,11 @@ public:
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
// skip the rest if the scvf does not touch a domain boundary
if
(
!
globalFv
Geometry
.
touchesDomainBoundary
(
scvf
))
if
(
!
fvGrid
Geometry
.
touchesDomainBoundary
(
scvf
))
continue
;
// loop over all the scvfs in the interaction region
const
auto
&
ivSeed
=
globalFv
Geometry
.
boundaryInteractionVolumeSeed
(
scvf
);
const
auto
&
ivSeed
=
fvGrid
Geometry
.
boundaryInteractionVolumeSeed
(
scvf
);
for
(
auto
scvfIdx
:
ivSeed
.
globalScvfIndices
())
{
auto
&&
ivScvf
=
fvGeometry
.
scvf
(
scvfIdx
);
...
...
@@ -208,7 +208,7 @@ public:
continue
;
auto
insideScvIdx
=
ivScvf
.
insideScvIdx
();
auto
insideElement
=
globalFv
Geometry
.
element
(
insideScvIdx
);
auto
insideElement
=
fvGrid
Geometry
.
element
(
insideScvIdx
);
// on dirichlet boundaries use dirichlet values
if
(
MpfaHelper
::
getMpfaFaceType
(
problem
,
insideElement
,
ivScvf
)
==
MpfaFaceTypes
::
dirichlet
)
...
...
@@ -243,7 +243,7 @@ public:
volVarIndices_
.
resize
(
volVarIndices_
.
size
()
+
additionalDofDependencies
.
size
());
for
(
auto
globalJ
:
additionalDofDependencies
)
{
const
auto
&
elementJ
=
fvGeometry
.
globalFv
Geometry
().
element
(
globalJ
);
const
auto
&
elementJ
=
fvGeometry
.
fvGrid
Geometry
().
element
(
globalJ
);
auto
&&
scvJ
=
fvGeometry
.
scv
(
globalJ
);
volumeVariables_
[
localIdx
].
update
(
problem
.
model
().
elementSolution
(
elementJ
,
sol
),
...
...
@@ -304,7 +304,7 @@ private:
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
bool
boundary
=
scvf
.
boundary
();
if
(
boundary
||
(
!
boundary
&&
fvGeometry
.
globalFv
Geometry
().
touchesDomainBoundary
(
scvf
)))
if
(
boundary
||
(
!
boundary
&&
fvGeometry
.
fvGrid
Geometry
().
touchesDomainBoundary
(
scvf
)))
bVolVarEstimate
+=
dim
-
1
;
}
...
...
dumux/discretization/cellcentered/mpfa/fickslaw.hh
View file @
99c6d1d5
...
...
@@ -148,7 +148,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
const
FluxVariablesCacheFiller
&
fluxVarsCacheFiller
)
{
// get interaction volume from the flux vars cache filler & upate the cache
if
(
problem
.
model
().
globalFv
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
if
(
problem
.
model
().
fvGrid
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
scvfFluxVarsCache
.
updateDiffusion
(
fluxVarsCacheFiller
.
boundaryInteractionVolume
(),
scvf
,
phaseIdx
,
compIdx
);
else
scvfFluxVarsCache
.
updateDiffusion
(
fluxVarsCacheFiller
.
interactionVolume
(),
scvf
,
phaseIdx
,
compIdx
);
...
...
dumux/discretization/cellcentered/mpfa/fluxvariablescachefiller.hh
View file @
99c6d1d5
...
...
@@ -102,10 +102,10 @@ public:
scvfPtr_
=
&
scvf
;
// prepare interaction volume and fill caches of all the scvfs connected to it
const
auto
&
globalFv
Geometry
=
problem
().
model
().
globalFv
Geometry
();
if
(
globalFv
Geometry
.
isInBoundaryInteractionVolume
(
scvf
))
const
auto
&
fvGrid
Geometry
=
problem
().
model
().
fvGrid
Geometry
();
if
(
fvGrid
Geometry
.
isInBoundaryInteractionVolume
(
scvf
))
{
bIv_
=
std
::
make_unique
<
BoundaryInteractionVolume
>
(
globalFv
Geometry
.
boundaryInteractionVolumeSeed
(
scvf
),
bIv_
=
std
::
make_unique
<
BoundaryInteractionVolume
>
(
fvGrid
Geometry
.
boundaryInteractionVolumeSeed
(
scvf
),
problem
(),
fvGeometry
,
elemVolVars
);
...
...
@@ -115,7 +115,7 @@ public:
}
else
{
iv_
=
std
::
make_unique
<
InteractionVolume
>
(
globalFv
Geometry
.
interactionVolumeSeed
(
scvf
),
iv_
=
std
::
make_unique
<
InteractionVolume
>
(
fvGrid
Geometry
.
interactionVolumeSeed
(
scvf
),
problem
(),
fvGeometry
,
elemVolVars
);
...
...
@@ -219,7 +219,7 @@ private:
const
auto
scvfJInsideScvIndex
=
scvfJ
.
insideScvIdx
();
otherElements
[
otherScvfIdx
]
=
scvfJInsideScvIndex
==
scvFace
().
insideScvIdx
()
?
element
()
:
problem
().
model
().
globalFv
Geometry
().
element
(
scvfJInsideScvIndex
);
problem
().
model
().
fvGrid
Geometry
().
element
(
scvfJInsideScvIndex
);
// get the corresponding flux var cache
otherFluxVarCaches
[
otherScvfIdx
]
=
&
fluxVarsCacheContainer
[
scvfJ
];
...
...
dumux/discretization/cellcentered/mpfa/fourierslaw.hh
View file @
99c6d1d5
...
...
@@ -120,7 +120,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethods::CCMpfa>
const
FluxVariablesCacheFiller
&
fluxVarsCacheFiller
)
{
// get interaction volume from the flux vars cache filler & upate the cache
if
(
problem
.
model
().
globalFv
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
if
(
problem
.
model
().
fvGrid
Geometry
().
isInBoundaryInteractionVolume
(
scvf
))
scvfFluxVarsCache
.
updateHeatConduction
(
fluxVarsCacheFiller
.
boundaryInteractionVolume
(),
scvf
);
else
scvfFluxVarsCache
.
updateHeatConduction
(
fluxVarsCacheFiller
.
interactionVolume
(),
scvf
);
...
...
dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh
View file @
99c6d1d5
...
...
@@ -38,7 +38,7 @@ namespace Dumux
* This builds up the sub control volumes and sub control volume faces
* for each element.
*/
template
<
class
TypeTag
,
bool
Enable
GlobalFV
GeometryCache
>
template
<
class
TypeTag
,
bool
Enable
FVGrid
GeometryCache
>
class
CCMpfaFVElementGeometry
{};
...
...
@@ -53,33 +53,33 @@ class CCMpfaFVElementGeometry<TypeTag, true>
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalFV
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
GlobalFV
Geometry
);
using
FVGrid
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGrid
Geometry
);
using
ScvIterator
=
Dumux
::
ScvIterator
<
SubControlVolume
,
std
::
vector
<
IndexType
>
,
ThisType
>
;
using
ScvfIterator
=
Dumux
::
ScvfIterator
<
SubControlVolumeFace
,
std
::
vector
<
IndexType
>
,
ThisType
>
;
public:
//! Constructor
CCMpfaFVElementGeometry
(
const
GlobalFV
Geometry
&
globalFv
Geometry
)
:
globalFv
GeometryPtr_
(
&
globalFv
Geometry
)
{}
CCMpfaFVElementGeometry
(
const
FVGrid
Geometry
&
fvGrid
Geometry
)
:
fvGrid
GeometryPtr_
(
&
fvGrid
Geometry
)
{}
//! Get an element sub control volume with a global scv index
const
SubControlVolume
&
scv
(
IndexType
scvIdx
)
const
{
return
globalFv
Geometry
().
scv
(
scvIdx
);
return
fvGrid
Geometry
().
scv
(
scvIdx
);
}
//! Get an element sub control volume face with a global scvf index
const
SubControlVolumeFace
&
scvf
(
IndexType
scvfIdx
)
const
{
return
globalFv
Geometry
().
scvf
(
scvfIdx
);
return
fvGrid
Geometry
().
scvf
(
scvfIdx
);
}
//! Get an element sub control volume face with a global scvf index
//! We separate element and neighbor scvfs to speed up mapping
const
SubControlVolumeFace
&
flipScvf
(
IndexType
scvfIdx
,
unsigned
int
outsideScvIdx
=
0
)
const
{
return
globalFv
Geometry
().
flipScvf
(
scvfIdx
,
outsideScvIdx
);
return
fvGrid
Geometry
().
flipScvf
(
scvfIdx
,
outsideScvIdx
);
}
//! iterator range for sub control volumes. Iterates over
...
...
@@ -102,7 +102,7 @@ public:
friend
inline
Dune
::
IteratorRange
<
ScvfIterator
>
scvfs
(
const
CCMpfaFVElementGeometry
&
fvGeometry
)
{
const
auto
&
g
=
fvGeometry
.
globalFv
Geometry
();
const
auto
&
g
=
fvGeometry
.
fvGrid
Geometry
();
const
auto
scvIdx
=
fvGeometry
.
scvIndices_
[
0
];
return
Dune
::
IteratorRange
<
ScvfIterator
>
(
ScvfIterator
(
g
.
scvfIndicesOfScv
(
scvIdx
).
begin
(),
fvGeometry
),
ScvfIterator
(
g
.
scvfIndicesOfScv
(
scvIdx
).
end
(),
fvGeometry
));
...
...
@@ -117,7 +117,7 @@ public:
//! number of sub control volumes in this fv element geometry
std
::
size_t
numScvf
()
const
{
return
globalFv
Geometry
().
scvfIndicesOfScv
(
scvIndices_
[
0
]).
size
();
return
fvGrid
Geometry
().
scvfIndicesOfScv
(
scvIndices_
[
0
]).
size
();
}
//! Binding of an element, called by the local jacobian to prepare element assembly
...
...
@@ -130,18 +130,18 @@ public:
void
bindElement
(
const
Element
&
element
)
{
elementPtr_
=
&
element
;
scvIndices_
=
std
::
vector
<
IndexType
>
({
globalFv
Geometry
().
problem_
().
elementMapper
().
index
(
*
elementPtr_
)});
scvIndices_
=
std
::
vector
<
IndexType
>
({
fvGrid
Geometry
().
problem_
().
elementMapper
().
index
(
*
elementPtr_
)});
}
//! The global finite volume geometry we are a restriction of
const
GlobalFV
Geometry
&
globalFv
Geometry
()
const
{
return
*
globalFv
GeometryPtr_
;
}
const
FVGrid
Geometry
&
fvGrid
Geometry
()
const
{
return
*
fvGrid
GeometryPtr_
;
}
private:
const
Element
*
elementPtr_
;
std
::
vector
<
IndexType
>
scvIndices_
;
const
GlobalFV
Geometry
*
globalFv
GeometryPtr_
;
const
FVGrid
Geometry
*
fvGrid
GeometryPtr_
;
};
//! specialization in case the FVElementGeometries are not stored
...
...
@@ -157,7 +157,7 @@ class CCMpfaFVElementGeometry<TypeTag, false>
using
SubControlVolume
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolume
);
using
SubControlVolumeFace
=
typename
GET_PROP_TYPE
(
TypeTag
,
SubControlVolumeFace
);
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalFV
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
GlobalFV
Geometry
);
using
FVGrid
Geometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGrid
Geometry
);
using
ScvIterator
=
Dumux
::
ScvIterator
<
SubControlVolume
,
std
::
vector
<
IndexType
>
,
ThisType
>
;
using
ScvfIterator
=
Dumux
::
ScvfIterator
<
SubControlVolumeFace
,
std
::
vector
<
IndexType
>
,
ThisType
>
;
...
...
@@ -170,8 +170,8 @@ class CCMpfaFVElementGeometry<TypeTag, false>
public:
//! Constructor
CCMpfaFVElementGeometry
(
const
GlobalFV
Geometry
&
globalFv
Geometry
)
:
globalFv
GeometryPtr_
(
&
globalFv
Geometry
)
{}
CCMpfaFVElementGeometry
(
const
FVGrid
Geometry
&
fvGrid
Geometry
)
:
fvGrid
GeometryPtr_
(
&
fvGrid
Geometry
)
{}
//! Get an elment sub control volume with a global scv index
//! We separate element and neighbor scvs to speed up mapping
...
...
@@ -255,7 +255,7 @@ public:
bindElement
(
element
);
// get some references for convenience
const
auto
&
problem
=
globalFv
Geometry
().
problem_
();
const
auto
&
problem
=
fvGrid
Geometry
().
problem_
();
const
auto
globalI
=
problem
.
elementMapper
().
index
(
element
);
const
auto
&
assemblyMapI
=
problem
.
model
().
localJacobian
().
assemblyMap
()[
globalI
];
...
...
@@ -270,7 +270,7 @@ public:
// make neighbor geometries
// use the assembly map to determine which faces are necessary
for
(
auto
&&
dataJ
:
assemblyMapI
)
makeNeighborGeometries
(
globalFv
Geometry
().
element
(
dataJ
.
globalJ
),
makeNeighborGeometries
(
fvGrid
Geometry
().
element
(
dataJ
.
globalJ
),
dataJ
.
globalJ
,
dataJ
.
scvfsJ
,
dataJ
.
additionalScvfs
);
...
...
@@ -288,7 +288,7 @@ public:
neighborScvIndices_
.
reserve
(
neighborScvIndices_
.
size
()
+
additionalDofDependencies
.
size
());
for
(
auto
globalJ
:
additionalDofDependencies
)
{
neighborScvs_
.
emplace_back
(
globalFv
Geometry
().
element
(
globalJ
).
geometry
(),
globalJ
);
neighborScvs_
.
emplace_back
(
fvGrid
Geometry
().
element
(
globalJ
).
geometry
(),
globalJ
);
neighborScvIndices_
.
emplace_back
(
globalJ
);
}
}
...
...
@@ -303,8 +303,8 @@ public:
}
//! The global finite volume geometry we are a restriction of
const
GlobalFV
Geometry
&
globalFv
Geometry
()
const
{
return
*
globalFv
GeometryPtr_
;
}
const
FVGrid
Geometry
&
fvGrid
Geometry
()
const
{
return
*
fvGrid
GeometryPtr_
;
}
private:
...
...
@@ -323,7 +323,7 @@ private:
void
makeElementGeometries
(
const
Element
&
element
)
{
// the problem
const
auto
&
problem
=
globalFv
Geometry
().
problem_
();
const
auto
&
problem
=
fvGrid
Geometry
().
problem_
();
// make the scv