Skip to content
GitLab
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
57895d57
Commit
57895d57
authored
Oct 11, 2015
by
Christoph Grüninger
Browse files
[Cleanup] Remove Dune 2.3 compatibility code.
parent
8cee5a02
Changes
44
Hide whitespace changes
Inline
Side-by-side
dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh
View file @
57895d57
...
...
@@ -833,11 +833,8 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo()
//
// int globalVertIdx12corner = problem_.variables().index(
// *((*eIt).template subEntity < dim > (localVertIdx12corner)));
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
globalVertIdx12corner
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
*
eIt
,
localVertIdx12corner
,
dim
);
#else
int
globalVertIdx12corner
=
problem_
.
variables
().
vertexMapper
().
map
(
*
eIt
,
localVertIdx12corner
,
dim
);
#endif
// std::cout<<"globalVertIdx12corner = "<<globalVertIdx12corner<<"\n";
...
...
@@ -848,11 +845,8 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo()
// int globalVertIdx14corner = problem_.variables().index(
// *((*eIt).template subEntity < dim > (localVertIdx14corner)));
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
globalVertIdx14corner
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
*
eIt
,
localVertIdx14corner
,
dim
);
#else
int
globalVertIdx14corner
=
problem_
.
variables
().
vertexMapper
().
map
(
*
eIt
,
localVertIdx14corner
,
dim
);
#endif
// std::cout<<"globalVertIdx14corner = "<<globalVertIdx14corner<<"\n";
if
(
globalVertIdx12corner
==
globalVertIdx14corner
)
...
...
dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
View file @
57895d57
...
...
@@ -320,7 +320,6 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const
std
::
vector
<
std
::
vector
<
int
>
>&
elemVertMap
)
{
int
eIdxGlobal
=
problem_
.
variables
().
index
(
element
);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
element
,
0
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
7
);
elemVertMap
[
vIdxGlobal
][
7
]
=
eIdxGlobal
;
...
...
@@ -352,39 +351,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
element
,
7
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
0
);
elemVertMap
[
vIdxGlobal
][
0
]
=
eIdxGlobal
;
#else
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
0
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
7
);
elemVertMap
[
vIdxGlobal
][
7
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
1
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
6
);
elemVertMap
[
vIdxGlobal
][
6
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
2
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
5
);
elemVertMap
[
vIdxGlobal
][
5
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
3
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
4
);
elemVertMap
[
vIdxGlobal
][
4
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
4
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
3
);
elemVertMap
[
vIdxGlobal
][
3
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
5
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
2
);
elemVertMap
[
vIdxGlobal
][
2
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
6
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
1
);
elemVertMap
[
vIdxGlobal
][
1
]
=
eIdxGlobal
;
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
7
,
dim
);
interactionVolumes_
[
vIdxGlobal
].
setSubVolumeElement
(
element
,
0
);
elemVertMap
[
vIdxGlobal
][
0
]
=
eIdxGlobal
;
#endif
}
/*! \brief Stores information with respect to DUNE intersections in the interaction volumes
...
...
@@ -452,11 +419,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
{
int
localVertIdx
=
referenceElement
.
subEntity
(
indexInInside
,
1
,
i
,
dim
);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
element
,
localVertIdx
,
dim
);
#else
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
element
,
localVertIdx
,
dim
);
#endif
InteractionVolume
&
interactionVolume
=
interactionVolumes_
[
vIdxGlobal
];
...
...
dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
View file @
57895d57
...
...
@@ -568,11 +568,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixRowSize()
for
(
int
vIdx
=
0
;
vIdx
<
numVertices
;
vIdx
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
*
eIt
,
vIdx
,
dim
);
#else
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
*
eIt
,
vIdx
,
dim
);
#endif
InteractionVolume
&
interactionVolume
=
interactionVolumes_
.
interactionVolume
(
vIdxGlobal
);
...
...
@@ -612,11 +608,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixIndices()
for
(
int
vIdx
=
0
;
vIdx
<
numVertices
;
vIdx
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
subIndex
(
*
eIt
,
vIdx
,
dim
);
#else
int
vIdxGlobal
=
problem_
.
variables
().
vertexMapper
().
map
(
*
eIt
,
vIdx
,
dim
);
#endif
InteractionVolume
&
interactionVolume
=
interactionVolumes_
.
interactionVolume
(
vIdxGlobal
);
for
(
int
subVolumeIdx
=
0
;
subVolumeIdx
<
InteractionVolume
::
subVolumeTotalNum
;
subVolumeIdx
++
)
...
...
dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
View file @
57895d57
...
...
@@ -144,11 +144,7 @@ public:
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
index
=
faceMapper_
.
subIndex
(
*
eIt
,
i
,
1
);
#else
int
index
=
faceMapper_
.
map
(
*
eIt
,
i
,
1
);
#endif
if
(
!
visited
[
index
])
{
...
...
@@ -179,11 +175,8 @@ public:
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
indexI
=
faceMapper_
.
subIndex
(
*
eIt
,
i
,
1
);
#else
int
indexI
=
faceMapper_
.
map
(
*
eIt
,
i
,
1
);
#endif
if
(
!
visited
[
indexI
])
{
A_
.
addindex
(
indexI
,
indexI
);
...
...
@@ -191,11 +184,8 @@ public:
}
for
(
int
k
=
0
;
k
<
numFaces
;
k
++
)
if
(
k
!=
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
indexJ
=
faceMapper_
.
subIndex
(
*
eIt
,
k
,
1
);
#else
int
indexJ
=
faceMapper_
.
map
(
*
eIt
,
k
,
1
);
#endif
A_
.
addindex
(
indexI
,
indexJ
);
//std::cout << "indexI = " << indexI << ", added indexJ = " << indexJ << std::endl;
}
...
...
@@ -280,11 +270,7 @@ public:
// get local to global id map
for
(
unsigned
int
k
=
0
;
k
<
numFaces
;
k
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
alpha
=
faceMapper_
.
subIndex
(
*
eIt
,
k
,
1
);
#else
int
alpha
=
faceMapper_
.
map
(
*
eIt
,
k
,
1
);
#endif
local2Global
[
k
]
=
alpha
;
}
...
...
@@ -325,11 +311,7 @@ public:
// get local to global id map
for
(
unsigned
int
k
=
0
;
k
<
numFaces
;
k
++
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
alpha
=
faceMapper_
.
subIndex
(
*
eIt
,
k
,
1
);
#else
int
alpha
=
faceMapper_
.
map
(
*
eIt
,
k
,
1
);
#endif
local2Global
[
k
]
=
alpha
;
}
loc
.
completeRHS
(
*
eIt
,
local2Global
,
f
);
...
...
dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
View file @
57895d57
...
...
@@ -181,11 +181,7 @@ public:
*/
void
assemble
(
const
Element
&
element
,
int
k
=
1
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numFaces
=
element
.
subEntities
(
1
);
#else
unsigned
int
numFaces
=
element
.
template
count
<
1
>();
#endif
this
->
setcurrentsize
(
numFaces
);
// clear assemble data
...
...
@@ -221,11 +217,7 @@ public:
*/
void
assembleBoundaryCondition
(
const
Element
&
element
,
int
k
=
1
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numFaces
=
element
.
subEntities
(
1
);
#else
unsigned
int
numFaces
=
element
.
template
count
<
1
>();
#endif
this
->
setcurrentsize
(
numFaces
);
// clear assemble data
...
...
@@ -242,11 +234,7 @@ public:
void
completeRHS
(
const
Element
&
element
,
Dune
::
FieldVector
<
int
,
2
*
dim
>&
local2Global
,
Vector
&
f
)
{
int
eIdxGlobal
=
problem_
.
variables
().
index
(
element
);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numFaces
=
element
.
subEntities
(
1
);
#else
unsigned
int
numFaces
=
element
.
template
count
<
1
>();
#endif
Dune
::
FieldVector
<
Scalar
,
2
*
dim
>
F
(
0.
);
Scalar
dInv
=
0.
;
...
...
@@ -413,11 +401,7 @@ private:
template
<
class
TypeTag
>
void
MimeticTwoPLocalStiffness
<
TypeTag
>::
assembleV
(
const
Element
&
element
,
int
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numFaces
=
element
.
subEntities
(
1
);
#else
unsigned
int
numFaces
=
element
.
template
count
<
1
>();
#endif
this
->
setcurrentsize
(
numFaces
);
int
eIdxGlobal
=
problem_
.
variables
().
index
(
element
);
...
...
@@ -469,11 +453,7 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
Scalar
&
dInv
,
Scalar
&
qmean
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numFaces
=
element
.
subEntities
(
1
);
#else
unsigned
int
numFaces
=
element
.
template
count
<
1
>();
#endif
this
->
setcurrentsize
(
numFaces
);
// get global coordinate of cell center
...
...
dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh
View file @
57895d57
...
...
@@ -406,11 +406,7 @@ public:
//! Function needed for restart option.
void
serializeEntity
(
std
::
ostream
&
outstream
,
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numFaces
=
element
.
subEntities
(
1
);
#else
int
numFaces
=
element
.
template
count
<
1
>();
#endif
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
int
fIdxGlobal
=
A_
.
faceMapper
().
map
(
element
,
i
,
1
);
...
...
@@ -420,11 +416,7 @@ public:
void
deserializeEntity
(
std
::
istream
&
instream
,
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numFaces
=
element
.
subEntities
(
1
);
#else
int
numFaces
=
element
.
template
count
<
1
>();
#endif
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
int
fIdxGlobal
=
A_
.
faceMapper
().
map
(
element
,
i
,
1
);
...
...
dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh
View file @
57895d57
...
...
@@ -418,11 +418,7 @@ public:
//! Function needed for restart option.
void
serializeEntity
(
std
::
ostream
&
outstream
,
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numFaces
=
element
.
subEntities
(
1
);
#else
int
numFaces
=
element
.
template
count
<
1
>();
#endif
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
int
isIdxGlobal
=
A_
.
intersectionMapper
().
map
(
element
,
i
);
...
...
@@ -432,11 +428,7 @@ public:
void
deserializeEntity
(
std
::
istream
&
instream
,
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numFaces
=
element
.
subEntities
(
1
);
#else
int
numFaces
=
element
.
template
count
<
1
>();
#endif
for
(
int
i
=
0
;
i
<
numFaces
;
i
++
)
{
int
isIdxGlobal
=
A_
.
intersectionMapper
().
map
(
element
,
i
);
...
...
dumux/decoupled/2p/impes/gridadaptionindicator2p.hh
View file @
57895d57
...
...
@@ -166,11 +166,7 @@ public:
*/
bool
refine
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
(
indicatorVector_
[
problem_
.
elementMapper
().
index
(
element
)]
>
refineBound_
);
#else
return
(
indicatorVector_
[
problem_
.
elementMapper
().
map
(
element
)]
>
refineBound_
);
#endif
}
/*! \brief Indicator function for marking of grid cells for coarsening
...
...
@@ -181,11 +177,7 @@ public:
*/
bool
coarsen
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
(
indicatorVector_
[
problem_
.
elementMapper
().
index
(
element
)]
<
coarsenBound_
);
#else
return
(
indicatorVector_
[
problem_
.
elementMapper
().
map
(
element
)]
<
coarsenBound_
);
#endif
}
/*! \brief Initializes the adaption indicator class*/
...
...
dumux/decoupled/2p/impes/gridadaptionindicator2plocal.hh
View file @
57895d57
...
...
@@ -229,11 +229,7 @@ public:
*/
bool
refine
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
(
indicatorVector_
[
problem_
.
elementMapper
().
index
(
element
)]
>
refineBound_
);
#else
return
(
indicatorVector_
[
problem_
.
elementMapper
().
map
(
element
)]
>
refineBound_
);
#endif
}
/*! \brief Indicator function for marking of grid cells for coarsening
...
...
@@ -244,11 +240,7 @@ public:
*/
bool
coarsen
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
(
indicatorVector_
[
problem_
.
elementMapper
().
index
(
element
)]
<
coarsenBound_
);
#else
return
(
indicatorVector_
[
problem_
.
elementMapper
().
map
(
element
)]
<
coarsenBound_
);
#endif
}
/*! \brief Initializes the adaption indicator class*/
...
...
dumux/decoupled/common/gridadaptinitializationindicator.hh
View file @
57895d57
...
...
@@ -318,11 +318,8 @@ public:
*/
bool
refine
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
idx
=
problem_
.
elementMapper
().
index
(
element
);
#else
int
idx
=
problem_
.
elementMapper
().
map
(
element
);
#endif
if
(
indicatorVector_
[
idx
]
==
refineCell
)
return
true
;
else
if
(
maxLevel_
==
maxAllowedLevel_
)
...
...
@@ -339,11 +336,8 @@ public:
*/
bool
coarsen
(
const
Element
&
element
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
idx
=
problem_
.
elementMapper
().
index
(
element
);
#else
int
idx
=
problem_
.
elementMapper
().
map
(
element
);
#endif
if
(
indicatorVector_
[
idx
]
==
coarsenCell
&&
maxLevel_
<
maxAllowedLevel_
)
return
true
;
else
if
(
indicatorVector_
[
idx
]
==
coarsenCell
&&
!
adaptionIndicator_
.
refine
(
element
))
...
...
dumux/decoupled/common/variableclass.hh
View file @
57895d57
...
...
@@ -139,11 +139,7 @@ public:
*/
int
index
(
const
Element
&
element
)
const
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
elementMapper_
.
index
(
element
);
#else
return
elementMapper_
.
map
(
element
);
#endif
}
//! Get index of vertex (codim dim entity)
...
...
@@ -153,11 +149,7 @@ public:
*/
int
index
(
const
Vertex
&
vertex
)
const
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
vertexMapper_
.
index
(
vertex
);
#else
return
vertexMapper_
.
map
(
vertex
);
#endif
}
//!Return gridView
...
...
dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh
View file @
57895d57
...
...
@@ -102,11 +102,8 @@ public:
{
// we assert that the i-th shape function is
// associated to the i-th vert of the element.
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numScv
=
element
.
subEntities
(
dim
);
#else
int
numScv
=
element
.
template
count
<
dim
>();
#endif
// number of faces which contribute to the porosity value in the sub-control volume
std
::
vector
<
double
>
numContributingFaces
;
numContributingFaces
.
resize
(
numScv
);
...
...
dumux/geomechanics/el1p2c/el1p2cvolumevariables.hh
View file @
57895d57
...
...
@@ -73,11 +73,7 @@ public:
{
ParentType
::
update
(
priVars
,
problem
,
element
,
fvGeometry
,
scvIdx
,
isOldSol
);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
problem
.
vertexMapper
().
subIndex
(
element
,
scvIdx
,
dim
);
#else
int
vIdxGlobal
=
problem
.
vertexMapper
().
map
(
element
,
scvIdx
,
dim
);
#endif
primaryVars_
=
priVars
;
prevPrimaryVars_
=
problem
.
model
().
prevSol
()[
vIdxGlobal
];
...
...
dumux/geomechanics/el2p/el2passembler.hh
View file @
57895d57
...
...
@@ -434,11 +434,8 @@ public:
if
(
!
enablePartialReassemble
)
return
Red
;
// reassemble unconditionally!
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
vertexMapper_
().
subIndex
(
element
,
vIdx
,
dim
);
#else
int
vIdxGlobal
=
vertexMapper_
().
map
(
element
,
vIdx
,
dim
);
#endif
return
vertexColor_
[
vIdxGlobal
];
}
...
...
dumux/geomechanics/el2p/el2pbasemodel.hh
View file @
57895d57
...
...
@@ -136,19 +136,11 @@ public:
if
(
!
isBox
||
!
enableHints_
)
return
;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
n
=
element
.
subEntities
(
dim
);
#else
int
n
=
element
.
template
count
<
dim
>();
#endif
prevVolVars
.
resize
(
n
);
curVolVars
.
resize
(
n
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
vertexMapper
().
subIndex
(
element
,
i
,
dim
);
#else
int
vIdxGlobal
=
vertexMapper
().
map
(
element
,
i
,
dim
);
#endif
if
(
!
hintsUsable_
[
vIdxGlobal
])
{
curVolVars
[
i
].
setHint
(
NULL
);
...
...
@@ -167,18 +159,10 @@ public:
if
(
!
isBox
||
!
enableHints_
)
return
;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
n
=
element
.
subEntities
(
dim
);
#else
int
n
=
element
.
template
count
<
dim
>();
#endif
curVolVars
.
resize
(
n
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
vertexMapper
().
subIndex
(
element
,
i
,
dim
);
#else
int
vIdxGlobal
=
vertexMapper
().
map
(
element
,
i
,
dim
);
#endif
if
(
!
hintsUsable_
[
vIdxGlobal
])
curVolVars
[
i
].
setHint
(
NULL
);
...
...
@@ -202,11 +186,7 @@ public:
return
;
for
(
unsigned
int
i
=
0
;
i
<
elemVolVars
.
size
();
++
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
vertexMapper
().
subIndex
(
element
,
i
,
dim
);
#else
int
vIdxGlobal
=
vertexMapper
().
map
(
element
,
i
,
dim
);
#endif
curHints_
[
vIdxGlobal
]
=
elemVolVars
[
i
];
if
(
!
hintsUsable_
[
vIdxGlobal
])
prevHints_
[
vIdxGlobal
]
=
elemVolVars
[
i
];
...
...
@@ -777,11 +757,7 @@ public:
bool
onBoundary
(
const
Element
&
element
,
const
int
vIdx
)
const
{
if
(
isBox
)
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
return
onBoundary
(
vertexMapper
().
subIndex
(
element
,
vIdx
,
dim
));
#else
return
onBoundary
(
vertexMapper
().
map
(
element
,
vIdx
,
dim
));
#endif
else
DUNE_THROW
(
Dune
::
InvalidStateException
,
"requested for cell-centered model"
);
...
...
@@ -964,21 +940,13 @@ protected:
1
,
faceVertexIdx
,
dim
);
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
vIdxGlobal
=
vertexMapper
().
subIndex
(
*
eIt
,
vIdx
,
dim
);
#else
int
vIdxGlobal
=
vertexMapper
().
map
(
*
eIt
,
vIdx
,
dim
);
#endif
boundaryIndices_
[
vIdxGlobal
]
=
true
;
}
}
else
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
eIdxGlobal
=
elementMapper
().
index
(
*
eIt
);
#else
int
eIdxGlobal
=
elementMapper
().
map
(
*
eIt
);
#endif
boundaryIndices_
[
eIdxGlobal
]
=
true
;
}
}
...
...
dumux/geomechanics/el2p/el2pelementvolumevariables.hh
View file @
57895d57
...
...
@@ -124,11 +124,7 @@ public:
const
DisplacementLFS
&
displacementLFS
=
localFunctionSpace
.
template
child
<
1
>();
typedef
typename
DisplacementLFS
::
template
Child
<
0
>
::
Type
ScalarDispLFS
;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numScv
=
element
.
subEntities
(
dim
);
#else
int
numScv
=
element
.
template
count
<
dim
>();
#endif
this
->
resize
(
numScv
);
for
(
int
scvIdx
=
0
;
scvIdx
<
numScv
;
scvIdx
++
)
...
...
@@ -187,11 +183,7 @@ public:
const
FVElementGeometry
&
fvGeometry
,
bool
isOldSol
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
numScv
=
element
.
subEntities
(
dim
);
#else
int
numScv
=
element
.
template
count
<
dim
>();
#endif
// retrieve the current or the previous solution vector and write the values into globalSol
const
SolutionVector
&
globalSol
=
...
...
dumux/geomechanics/el2p/el2plocaloperator.hh
View file @
57895d57
...
...
@@ -129,11 +129,8 @@ public:
typedef
typename
PressSatLFS
::
template
Child
<
1
>
::
Type
SatLFS
;
const
SatLFS
&
satLFS
=
pressSatLFS
.
template
child
<
1
>();
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numScv
=
eg
.
entity
().
subEntities
(
dim
);
#else
unsigned
int
numScv
=
eg
.
entity
().
template
count
<
dim
>();
#endif
for
(
size_type
i
=
0
;
i
<
(
numEq
-
dim
)
*
numScv
;
i
++
)
{
// retrieve the local residual value for vertex=i%Vertices and equation i/numScv (here 0 or 1)
...
...
@@ -535,11 +532,7 @@ public:
typedef
Dune
::
PDELab
::
LocalVector
<
R
>
LocalResidualVector
;
typedef
Dune
::
PDELab
::
WeightedVectorAccumulationView
<
LocalResidualVector
>
ResidualView
;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
unsigned
int
numScv
=
eg
.
entity
().
subEntities
(
dim
);
#else
unsigned
int
numScv
=
eg
.
entity
().
template
count
<
dim
>();
#endif
// loop over all degrees of freedom of the current element
for
(
size_type
j
=
0
;
j
<
numScv
*
numEq
;
j
++
)
...
...
dumux/implicit/2p/2pgridadaptindicator.hh
View file @
57895d57
...
...
@@ -123,11 +123,7 @@ public:
for
(
int
i
=
0
;
i
<
shapeVal
.
size
();
++
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
dofIdxGlobal
=
problem_
.
model
().
dofMapper
().
subIndex
(
*
eIt
,
i
,
dofCodim
);
#else
int
dofIdxGlobal
=
problem_
.
model
().
dofMapper
().
map
(
*
eIt
,
i
,
dofCodim
);
#endif
satI
+=
shapeVal
[
i
]
*
problem_
.
model
().
curSol
()[
dofIdxGlobal
][
saturationIdx
];
}
}
...
...
@@ -145,11 +141,7 @@ public:
{
// Access neighbor
auto
outside
=
intersection
.
outside
();
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
globalIdxJ
=
problem_
.
elementMapper
().
index
(
outside
);
#else
int
globalIdxJ
=
problem_
.
elementMapper
().
map
(
outside
);
#endif
// Visit intersection only once
if
(
eIt
->
level
()
>
outside
.
level
()
||
(
eIt
->
level
()
==
outside
.
level
()
&&
globalIdxI
<
globalIdxJ
))
...
...
@@ -171,11 +163,8 @@ public:
for
(
int
i
=
0
;
i
<
shapeVal
.
size
();
++
i
)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
int
dofIdxGlobal
=
problem_
.
model
().
dofMapper
().
subIndex
(
outside
,
i
,
dofCodim
);
#else
int
dofIdxGlobal
=
problem_
.
model
().
dofMapper
().
map
(
outside
,
i
,
dofCodim
);
#endif
satJ
+=
shapeVal
[
i
]
*
problem_
.
model
().