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
ae68de5a
Commit
ae68de5a
authored
May 22, 2018
by
Dennis Gläser
Browse files
[mpfa] respect dumux conventions
parent
10c3f245
Changes
8
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/cellcentered/mpfa/dualgridindexset.hh
View file @
ae68de5a
...
...
@@ -136,19 +136,24 @@ public:
}
//! returns the number of scvs around the node
std
::
size_t
numScvs
()
const
{
return
scvIndices_
.
size
();
}
std
::
size_t
numScvs
()
const
{
return
scvIndices_
.
size
();
}
//! returns the number of scvfs around the node
std
::
size_t
numScvfs
()
const
{
return
scvfIndices_
.
size
();
}
std
::
size_t
numScvfs
()
const
{
return
scvfIndices_
.
size
();
}
//! returns the number of boundary scvfs around the node
std
::
size_t
numBoundaryScvfs
()
const
{
return
numBoundaryScvfs_
;
}
std
::
size_t
numBoundaryScvfs
()
const
{
return
numBoundaryScvfs_
;
}
//! returns the grid scv indices connected to this dual grid node
const
NodalGridStencilType
&
globalScvIndices
()
const
{
return
scvIndices_
;
}
const
NodalGridStencilType
&
globalScvIndices
()
const
{
return
scvIndices_
;
}
//! returns the grid scvf indices connected to this dual grid node
const
NodalGridScvfStencilType
&
globalScvfIndices
()
const
{
return
scvfIndices_
;
}
const
NodalGridScvfStencilType
&
globalScvfIndices
()
const
{
return
scvfIndices_
;
}
//! returns whether or not the i-th scvf is on a domain boundary
bool
scvfIsOnBoundary
(
unsigned
int
i
)
const
...
...
@@ -222,7 +227,9 @@ public:
//! Constructor taking a grid view
template
<
class
GridView
>
CCMpfaDualGridIndexSet
(
const
GridView
&
gridView
)
:
nodalIndexSets_
(
gridView
.
size
(
GridView
::
dimension
))
{}
CCMpfaDualGridIndexSet
(
const
GridView
&
gridView
)
:
nodalIndexSets_
(
gridView
.
size
(
GridView
::
dimension
))
{}
//! Access with an scvf
template
<
class
SubControlVolumeFace
>
...
...
@@ -234,8 +241,11 @@ public:
{
return
nodalIndexSets_
[
scvf
.
vertexIndex
()];
}
//! Access with an index
const
NodalIndexSet
&
operator
[]
(
GridIndexType
i
)
const
{
return
nodalIndexSets_
[
i
];
}
NodalIndexSet
&
operator
[]
(
GridIndexType
i
)
{
return
nodalIndexSets_
[
i
];
}
const
NodalIndexSet
&
operator
[]
(
GridIndexType
i
)
const
{
return
nodalIndexSets_
[
i
];
}
NodalIndexSet
&
operator
[]
(
GridIndexType
i
)
{
return
nodalIndexSets_
[
i
];
}
private:
std
::
vector
<
NodalIndexSet
>
nodalIndexSets_
;
...
...
dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh
View file @
ae68de5a
...
...
@@ -118,25 +118,32 @@ public:
//! the element mapper is the dofMapper
//! this is convenience to have better chance to have the same main files for box/tpfa/mpfa...
const
DofMapper
&
dofMapper
()
const
{
return
this
->
elementMapper
();
}
const
DofMapper
&
dofMapper
()
const
{
return
this
->
elementMapper
();
}
//! The total number of sub control volumes
std
::
size_t
numScv
()
const
{
return
scvs_
.
size
();
}
std
::
size_t
numScv
()
const
{
return
scvs_
.
size
();
}
//! The total number of sub control volume faces
std
::
size_t
numScvf
()
const
{
return
scvfs_
.
size
();
}
std
::
size_t
numScvf
()
const
{
return
scvfs_
.
size
();
}
//! The total number of boundary sub control volume faces
std
::
size_t
numBoundaryScvf
()
const
{
return
numBoundaryScvf_
;
}
std
::
size_t
numBoundaryScvf
()
const
{
return
numBoundaryScvf_
;
}
//! The total number of degrees of freedom
std
::
size_t
numDofs
()
const
{
return
this
->
gridView
().
size
(
0
);
}
std
::
size_t
numDofs
()
const
{
return
this
->
gridView
().
size
(
0
);
}
//! Get an element from a global element index
Element
element
(
GridIndexType
eIdx
)
const
{
return
this
->
elementMap
()[
eIdx
];
}
Element
element
(
GridIndexType
eIdx
)
const
{
return
this
->
elementMap
()[
eIdx
];
}
//! Get an element from a sub control volume contained in it
Element
element
(
const
SubControlVolume
&
scv
)
const
{
return
this
->
elementMap
()[
scv
.
elementIndex
()];
}
Element
element
(
const
SubControlVolume
&
scv
)
const
{
return
this
->
elementMap
()[
scv
.
elementIndex
()];
}
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! This specialization is enabled if the use of secondary interaction volumes is active.
...
...
@@ -343,26 +350,33 @@ public:
}
//! Returns instance of the mpfa helper type
MpfaHelper
mpfaHelper
()
const
{
return
MpfaHelper
();
}
MpfaHelper
mpfaHelper
()
const
{
return
MpfaHelper
();
}
//! Get a sub control volume with a global scv index
const
SubControlVolume
&
scv
(
GridIndexType
scvIdx
)
const
{
return
scvs_
[
scvIdx
];
}
const
SubControlVolume
&
scv
(
GridIndexType
scvIdx
)
const
{
return
scvs_
[
scvIdx
];
}
//! Get a sub control volume face with a global scvf index
const
SubControlVolumeFace
&
scvf
(
GridIndexType
scvfIdx
)
const
{
return
scvfs_
[
scvfIdx
];
}
const
SubControlVolumeFace
&
scvf
(
GridIndexType
scvfIdx
)
const
{
return
scvfs_
[
scvfIdx
];
}
//! Returns the connectivity map of which dofs
//! have derivatives with respect to a given dof.
const
ConnectivityMap
&
connectivityMap
()
const
{
return
connectivityMap_
;
}
const
ConnectivityMap
&
connectivityMap
()
const
{
return
connectivityMap_
;
}
//! Returns the grid interaction volume index set class.
const
GridIVIndexSets
&
gridInteractionVolumeIndexSets
()
const
{
return
ivIndexSets_
;
}
const
GridIVIndexSets
&
gridInteractionVolumeIndexSets
()
const
{
return
ivIndexSets_
;
}
//! Get the sub control volume face indices of an scv by global index
const
std
::
vector
<
GridIndexType
>&
scvfIndicesOfScv
(
GridIndexType
scvIdx
)
const
{
return
scvfIndicesOfScv_
[
scvIdx
];
}
const
std
::
vector
<
GridIndexType
>&
scvfIndicesOfScv
(
GridIndexType
scvIdx
)
const
{
return
scvfIndicesOfScv_
[
scvIdx
];
}
//! Returns the flip scvf index set
const
FlipScvfIndexSet
&
flipScvfIndexSet
()
const
{
return
flipScvfIndices_
;
}
const
FlipScvfIndexSet
&
flipScvfIndexSet
()
const
{
return
flipScvfIndices_
;
}
//! Get the scvf on the same face but from the other side
//! Note that e.g. the normals might be different in the case of surface grids
...
...
@@ -467,22 +481,28 @@ public:
{
return
this
->
elementMapper
();
}
//! Returns the total number of sub control volumes.
std
::
size_t
numScv
()
const
{
return
numScvs_
;
}
std
::
size_t
numScv
()
const
{
return
numScvs_
;
}
//! Returns the total number of sub control volume faces.
std
::
size_t
numScvf
()
const
{
return
numScvf_
;
}
std
::
size_t
numScvf
()
const
{
return
numScvf_
;
}
//! Returns the number of scvfs on the domain boundary.
std
::
size_t
numBoundaryScvf
()
const
{
return
numBoundaryScvf_
;
}
std
::
size_t
numBoundaryScvf
()
const
{
return
numBoundaryScvf_
;
}
//! Returns the total number of degrees of freedom.
std
::
size_t
numDofs
()
const
{
return
this
->
gridView
().
size
(
0
);
}
std
::
size_t
numDofs
()
const
{
return
this
->
gridView
().
size
(
0
);
}
//! Gets an element from a global element index.
Element
element
(
GridIndexType
eIdx
)
const
{
return
this
->
elementMap
()[
eIdx
];
}
Element
element
(
GridIndexType
eIdx
)
const
{
return
this
->
elementMap
()[
eIdx
];
}
//! Gets an element from a sub control volume contained in it.
Element
element
(
const
SubControlVolume
&
scv
)
const
{
return
this
->
elementMap
()[
scv
.
elementIndex
()];
}
Element
element
(
const
SubControlVolume
&
scv
)
const
{
return
this
->
elementMap
()[
scv
.
elementIndex
()];
}
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! This specialization is enabled if the use of secondary interaction volumes is active.
...
...
@@ -496,10 +516,12 @@ public:
constexpr
bool
vertexUsesSecondaryInteractionVolume
(
GridIndexType
vIdxGlobal
)
const
{
return
false
;
}
//! Returns true if a given vertex lies on a processor boundary inside a ghost element.
bool
isGhostVertex
(
const
Vertex
&
v
)
const
{
return
isGhostVertex_
[
this
->
vertexMapper
().
index
(
v
)];
}
bool
isGhostVertex
(
const
Vertex
&
v
)
const
{
return
isGhostVertex_
[
this
->
vertexMapper
().
index
(
v
)];
}
//! Returns true if the vertex (index) lies on a processor boundary inside a ghost element.
bool
isGhostVertex
(
GridIndexType
vIdxGlobal
)
const
{
return
isGhostVertex_
[
vIdxGlobal
];
}
bool
isGhostVertex
(
GridIndexType
vIdxGlobal
)
const
{
return
isGhostVertex_
[
vIdxGlobal
];
}
//! Updates all finite volume geometries of the grid. Has to be called again after grid adaption.
void
update
()
...
...
@@ -685,7 +707,8 @@ public:
}
//! Returns instance of the mpfa helper type
MpfaHelper
mpfaHelper
()
const
{
return
MpfaHelper
();
}
MpfaHelper
mpfaHelper
()
const
{
return
MpfaHelper
();
}
//! Returns the sub control volume face indices of an scv by global index.
const
std
::
vector
<
GridIndexType
>&
scvfIndicesOfScv
(
GridIndexType
scvIdx
)
const
...
...
@@ -701,14 +724,17 @@ public:
{
return
flipScvfIndices_
[
scvfIdx
][
outsideScvfIdx
];
}
//! Returns the flip scvf index set
const
FlipScvfIndexSet
&
flipScvfIndexSet
()
const
{
return
flipScvfIndices_
;
}
const
FlipScvfIndexSet
&
flipScvfIndexSet
()
const
{
return
flipScvfIndices_
;
}
//! Returns the connectivity map of which dofs
//! have derivatives with respect to a given dof.
const
ConnectivityMap
&
connectivityMap
()
const
{
return
connectivityMap_
;
}
const
ConnectivityMap
&
connectivityMap
()
const
{
return
connectivityMap_
;
}
//! Returns the grid interaction volume seeds class.
const
GridIVIndexSets
&
gridInteractionVolumeIndexSets
()
const
{
return
ivIndexSets_
;
}
const
GridIVIndexSets
&
gridInteractionVolumeIndexSets
()
const
{
return
ivIndexSets_
;
}
private:
// connectivity map for efficient assembly
...
...
dumux/discretization/cellcentered/mpfa/interactionvolumebase.hh
View file @
ae68de5a
...
...
@@ -89,16 +89,20 @@ public:
{
asImp
().
setUpLocalScope
();
}
//! returns the number of "primary" scvfs of this interaction volume
std
::
size_t
numFaces
()
const
{
return
asImp
().
numFaces
();
}
std
::
size_t
numFaces
()
const
{
return
asImp
().
numFaces
();
}
//! returns the number of intermediate unknowns within this interaction volume
std
::
size_t
numUnknowns
()
const
{
return
asImp
().
numUnknowns
();
}
std
::
size_t
numUnknowns
()
const
{
return
asImp
().
numUnknowns
();
}
//! returns the number of (in this context) known solution values within this interaction volume
std
::
size_t
numKnowns
()
const
{
return
asImp
().
numKnowns
();
}
std
::
size_t
numKnowns
()
const
{
return
asImp
().
numKnowns
();
}
//! returns the number of scvs embedded in this interaction volume
std
::
size_t
numScvs
()
const
{
return
asImp
().
numScvs
();
}
std
::
size_t
numScvs
()
const
{
return
asImp
().
numScvs
();
}
//! Returns a reference to the container with the local face data. The actual type of
//! the container depends on the interaction volume implementation. At this point we throw
...
...
@@ -107,20 +111,25 @@ public:
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Interaction volume implementation does not provide a localFaceData() funtion"
);
}
//! returns the cell-stencil of this interaction volume
const
NodalStencilType
&
stencil
()
const
{
return
asImp
().
stencil
();
}
const
NodalStencilType
&
stencil
()
const
{
return
asImp
().
stencil
();
}
//! returns the local scvf entity corresponding to a given iv-local scvf idx
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
asImp
().
localScvf
(
ivLocalScvfIdx
);
}
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
asImp
().
localScvf
(
ivLocalScvfIdx
);
}
//! returns the local scv entity corresponding to a given iv-local scv idx
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
asImp
().
localScv
(
ivLocalScvIdx
);
}
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
asImp
().
localScv
(
ivLocalScvIdx
);
}
//! returns the element in which the scv with the given local idx is embedded in
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
asImp
().
element
();
}
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
asImp
().
element
();
}
//! returns the number of interaction volumes living around a vertex
template
<
class
NodalIndexSet
>
static
std
::
size_t
numIVAtVertex
(
const
NodalIndexSet
&
nodalIndexSet
)
{
return
Impl
::
numIVAtVertex
(
nodalIndexSet
);
}
static
std
::
size_t
numIVAtVertex
(
const
NodalIndexSet
&
nodalIndexSet
)
{
return
Impl
::
numIVAtVertex
(
nodalIndexSet
);
}
//! adds the iv index sets living around a vertex to a given container
//! and stores the the corresponding index in a map for each scvf
...
...
dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh
View file @
ae68de5a
...
...
@@ -258,34 +258,44 @@ public:
}
//! returns the number of primary scvfs of this interaction volume
std
::
size_t
numFaces
()
const
{
return
numFaces_
;
}
std
::
size_t
numFaces
()
const
{
return
numFaces_
;
}
//! returns the number of intermediate unknowns within this interaction volume
std
::
size_t
numUnknowns
()
const
{
return
numUnknowns_
;
}
std
::
size_t
numUnknowns
()
const
{
return
numUnknowns_
;
}
//! returns the number of (in this context) known solution values within this interaction volume
std
::
size_t
numKnowns
()
const
{
return
numKnowns_
;
}
std
::
size_t
numKnowns
()
const
{
return
numKnowns_
;
}
//! returns the number of scvs embedded in this interaction volume
std
::
size_t
numScvs
()
const
{
return
scvs_
.
size
();
}
std
::
size_t
numScvs
()
const
{
return
scvs_
.
size
();
}
//! returns the cell-stencil of this interaction volume
const
Stencil
&
stencil
()
const
{
return
*
stencil_
;
}
const
Stencil
&
stencil
()
const
{
return
*
stencil_
;
}
//! returns the grid element corresponding to a given iv-local scv idx
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
elements_
[
ivLocalScvIdx
];
}
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
elements_
[
ivLocalScvIdx
];
}
//! returns the local scvf entity corresponding to a given iv-local scvf idx
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
scvfs_
[
ivLocalScvfIdx
];
}
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
scvfs_
[
ivLocalScvfIdx
];
}
//! returns the local scv entity corresponding to a given iv-local scv idx
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
scvs_
[
ivLocalScvIdx
];
}
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
scvs_
[
ivLocalScvIdx
];
}
//! returns a reference to the container with the local face data
const
std
::
vector
<
LocalFaceData
>&
localFaceData
()
const
{
return
localFaceData_
;
}
const
std
::
vector
<
LocalFaceData
>&
localFaceData
()
const
{
return
localFaceData_
;
}
//! returns a reference to the information container on Dirichlet BCs within this iv
const
std
::
vector
<
DirichletData
>&
dirichletData
()
const
{
return
dirichletData_
;
}
const
std
::
vector
<
DirichletData
>&
dirichletData
()
const
{
return
dirichletData_
;
}
//! returns the matrix associated with face unknowns in local equation system
const
AMatrix
&
A
()
const
{
return
A_
;
}
...
...
dumux/discretization/cellcentered/mpfa/omethod/interactionvolumeindexset.hh
View file @
ae68de5a
...
...
@@ -122,16 +122,20 @@ public:
}
//! returns the corresponding nodal index set
const
NodalIndexSet
&
nodalIndexSet
()
const
{
return
nodalIndexSet_
;
}
const
NodalIndexSet
&
nodalIndexSet
()
const
{
return
nodalIndexSet_
;
}
//! returns the global scv indices connected to this dual grid node
const
NodalGridStencilType
&
globalScvIndices
()
const
{
return
nodalIndexSet_
.
globalScvIndices
();
}
const
NodalGridStencilType
&
globalScvIndices
()
const
{
return
nodalIndexSet_
.
globalScvIndices
();
}
//! returns the number of faces in the interaction volume
std
::
size_t
numFaces
()
const
{
return
numFaces_
;
}
std
::
size_t
numFaces
()
const
{
return
numFaces_
;
}
//! returns the number of scvs in the interaction volume
std
::
size_t
numScvs
()
const
{
return
nodalIndexSet_
.
numScvs
();
}
std
::
size_t
numScvs
()
const
{
return
nodalIndexSet_
.
numScvs
();
}
//! returns a global scvf idx for a given iv-local scvf index
GridIndexType
scvfIdxGlobal
(
LocalIndexType
ivLocalScvfIdx
)
const
...
...
dumux/discretization/cellcentered/mpfa/omethod/localsubcontrolentities.hh
View file @
ae68de5a
...
...
@@ -94,13 +94,16 @@ public:
}
//! detX is needed for setting up the omegas in the interaction volumes
ctype
detX
()
const
{
return
detX_
;
}
ctype
detX
()
const
{
return
detX_
;
}
//! grid view-global index related to this scv
GridIndexType
globalScvIndex
()
const
{
return
globalScvIndex_
;
}
GridIndexType
globalScvIndex
()
const
{
return
globalScvIndex_
;
}
//! returns the index in the set of cell unknowns of the iv
LocalIndexType
localDofIndex
()
const
{
return
localDofIndex_
;
}
LocalIndexType
localDofIndex
()
const
{
return
localDofIndex_
;
}
//! iv-local index of the coordir's scvf in this scv
LocalIndexType
scvfIdxLocal
(
unsigned
int
coordDir
)
const
...
...
dumux/discretization/cellcentered/mpfa/omethod/staticinteractionvolume.hh
View file @
ae68de5a
...
...
@@ -216,35 +216,45 @@ public:
}
//! returns the number of primary scvfs of this interaction volume
static
constexpr
std
::
size_t
numFaces
()
{
return
numScvf
;
}
static
constexpr
std
::
size_t
numFaces
()
{
return
numScvf
;
}
//! returns the number of intermediate unknowns within this interaction volume
static
constexpr
std
::
size_t
numUnknowns
()
{
return
numScvf
;
}
static
constexpr
std
::
size_t
numUnknowns
()
{
return
numScvf
;
}
//! returns the number of (in this context) known solution values within this interaction volume
static
constexpr
std
::
size_t
numKnowns
()
{
return
numScv
;
}
static
constexpr
std
::
size_t
numKnowns
()
{
return
numScv
;
}
//! returns the number of scvs embedded in this interaction volume
static
constexpr
std
::
size_t
numScvs
()
{
return
numScv
;
}
static
constexpr
std
::
size_t
numScvs
()
{
return
numScv
;
}
//! returns the cell-stencil of this interaction volume
const
Stencil
&
stencil
()
const
{
return
*
stencil_
;
}
const
Stencil
&
stencil
()
const
{
return
*
stencil_
;
}
//! returns the grid element corresponding to a given iv-local scv idx
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
elements_
[
ivLocalScvIdx
];
}
const
Element
&
element
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
elements_
[
ivLocalScvIdx
];
}
//! returns the local scvf entity corresponding to a given iv-local scvf idx
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
scvfs_
[
ivLocalScvfIdx
];
}
const
LocalScvfType
&
localScvf
(
LocalIndexType
ivLocalScvfIdx
)
const
{
return
scvfs_
[
ivLocalScvfIdx
];
}
//! returns the local scv entity corresponding to a given iv-local scv idx
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
scvs_
[
ivLocalScvIdx
];
}
const
LocalScvType
&
localScv
(
LocalIndexType
ivLocalScvIdx
)
const
{
return
scvs_
[
ivLocalScvIdx
];
}
//! returns a reference to the container with the local face data
const
std
::
array
<
LocalFaceData
,
numScvf
*
2
>&
localFaceData
()
const
{
return
localFaceData_
;
}
const
std
::
array
<
LocalFaceData
,
numScvf
*
2
>&
localFaceData
()
const
{
return
localFaceData_
;
}
//! Returns a reference to the information container on Dirichlet BCs within this iv.
//! Here, we return an empty container as this implementation cannot be used on boundaries.
const
std
::
array
<
DirichletData
,
0
>&
dirichletData
()
const
{
return
dirichletData_
;
}
const
std
::
array
<
DirichletData
,
0
>&
dirichletData
()
const
{
return
dirichletData_
;
}
//! returns the matrix associated with face unknowns in local equation system
const
AMatrix
&
A
()
const
{
return
A_
;
}
...
...
@@ -264,7 +274,8 @@ public:
//! returns the number of interaction volumes living around a vertex
template
<
class
NI
>
static
constexpr
std
::
size_t
numIVAtVertex
(
const
NI
&
nodalIndexSet
)
{
return
1
;
}
static
constexpr
std
::
size_t
numIVAtVertex
(
const
NI
&
nodalIndexSet
)
{
return
1
;
}
//! adds the iv index sets living around a vertex to a given container
//! and stores the the corresponding index in a map for each scvf
...
...
dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh
View file @
ae68de5a
...
...
@@ -149,35 +149,45 @@ public:
}
//! The area of the sub control volume face
Scalar
area
()
const
{
return
area_
;
}
Scalar
area
()
const
{
return
area_
;
}
//! returns bolean if the sub control volume face is on the domain boundary
bool
boundary
()
const
{
return
boundary_
;
}
bool
boundary
()
const
{
return
boundary_
;
}
//! The global index of this sub control volume face
GridIndexType
index
()
const
{
return
scvfIndex_
;
}
GridIndexType
index
()
const
{
return
scvfIndex_
;
}
//! Returns the index of the vertex the scvf is connected to
GridIndexType
vertexIndex
()
const
{
return
vertexIndex_
;
}
GridIndexType
vertexIndex
()
const
{
return
vertexIndex_
;
}
//! Returns the element-local vertex index the scvf is connected to
unsigned
int
vertexIndexInElement
()
const
{
return
vIdxInElement_
;
}
unsigned
int
vertexIndexInElement
()
const
{
return
vIdxInElement_
;
}
//! index of the inside sub control volume
GridIndexType
insideScvIdx
()
const
{
return
insideScvIdx_
;
}
GridIndexType
insideScvIdx
()
const
{
return
insideScvIdx_
;
}
//! The number of outside scvs connection via this scv face
std
::
size_t
numOutsideScvs
()
const
{
return
outsideScvIndices_
.
size
();
}
std
::
size_t
numOutsideScvs
()
const
{
return
outsideScvIndices_
.
size
();
}
//! index of the outside sub control volume or boundary scv index
//! returns undefined behaviour if index exceeds numOutsideScvs
GridIndexType
outsideScvIdx
(
int
i
=
0
)
const
{
return
outsideScvIndices_
[
i
];
}
GridIndexType
outsideScvIdx
(
int
i
=
0
)
const
{
return
outsideScvIndices_
[
i
];
}
//! returns the outside scv indices (can be more than one index for dim < dimWorld)
const
OutsideGridIndexStorage
&
outsideScvIndices
()
const
{
return
outsideScvIndices_
;
}
const
OutsideGridIndexStorage
&
outsideScvIndices
()
const
{
return
outsideScvIndices_
;
}
//! Returns the number of corners
std
::
size_t
corners
()
const
{
return
corners_
.
size
();
}
std
::
size_t
corners
()
const
{
return
corners_
.
size
();
}
//! Returns the corner for a given local index
const
GlobalPosition
&
corner
(
unsigned
int
localIdx
)
const
...
...
@@ -187,22 +197,28 @@ public:
}
//! Returns the global position of the vertex the scvf is connected to
const
GlobalPosition
&
vertexCorner
()
const
{
return
corners_
.
back
();
}
const
GlobalPosition
&
vertexCorner
()
const
{
return
corners_
.
back
();
}
//! Returns the global position of the center of the element facet this scvf is embedded in
const
GlobalPosition
&
facetCorner
()
const
{
return
corner
(
0
);
}
const
GlobalPosition
&
facetCorner
()
const
{
return
corner
(
0
);
}
//! The center of the sub control volume face
const
GlobalPosition
&
center
()
const
{
return
center_
;
}
const
GlobalPosition
&
center
()
const
{
return
center_
;
}
//! The integration point for flux evaluations in global coordinates
const
GlobalPosition
&
ipGlobal
()
const
{
return
ipGlobal_
;
}
const
GlobalPosition
&
ipGlobal
()
const
{
return
ipGlobal_
;
}
//! returns the unit outer normal vector (assumes non-curved geometries)
const
GlobalPosition
&
unitOuterNormal
()
const
{
return
unitOuterNormal_
;
}
const
GlobalPosition
&
unitOuterNormal
()
const
{
return
unitOuterNormal_
;
}
//! The geometry of the sub control volume face
Geometry
geometry
()
const
{
return
Geometry
(
Dune
::
GeometryTypes
::
cube
(
Geometry
::
mydimension
),
corners_
);
}
Geometry
geometry
()
const
{
return
Geometry
(
Dune
::
GeometryTypes
::
cube
(
Geometry
::
mydimension
),
corners_
);
}
private:
bool
boundary_
;
...
...
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