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
30717984
Commit
30717984
authored
Jul 02, 2021
by
Dennis Gläser
Browse files
[mpfa][scvf] add boundary flag
parent
ab9389eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh
View file @
30717984
...
...
@@ -419,7 +419,7 @@ private:
scvfs_
.
emplace_back
(
MpfaHelper
(),
MpfaHelper
::
getScvfCorners
(
isPositions
,
numCorners
,
c
),
is
.
centerUnitOuterNormal
()
,
is
,
vIdxGlobal
,
vIdxLocal
,
scvFaceIndices
[
scvfCounter
],
...
...
@@ -509,7 +509,7 @@ private:
// build scvf
neighborScvfs_
.
emplace_back
(
MpfaHelper
(),
MpfaHelper
::
getScvfCorners
(
isPositions
,
numCorners
,
c
),
is
.
centerUnitOuterNormal
()
,
is
,
vIdxGlobal
,
vIdxLocal
,
scvFaceIndices
[
scvfCounter
],
...
...
dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh
View file @
30717984
...
...
@@ -294,7 +294,7 @@ public:
scvfIndexSet
.
push_back
(
scvfIdx
);
scvfs_
.
emplace_back
(
MpfaHelper
(),
MpfaHelper
::
getScvfCorners
(
isPositions
,
numCorners
,
c
),
is
.
centerUnitOuterNormal
()
,
is
,
vIdxGlobal
,
vIdxLocal
,
scvfIdx
,
...
...
dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh
View file @
30717984
...
...
@@ -33,6 +33,7 @@
#include <dune/geometry/multilineargeometry.hh>
#include <dumux/common/indextraits.hh>
#include <dumux/common/boundaryflag.hh>
namespace
Dumux
{
...
...
@@ -81,6 +82,7 @@ struct CCMpfaDefaultScvfGeometryTraits
using
Geometry
=
Dune
::
MultiLinearGeometry
<
Scalar
,
dim
-
1
,
dimWorld
,
ScvfMLGTraits
<
Scalar
>
>
;
using
CornerStorage
=
typename
ScvfMLGTraits
<
Scalar
>::
template
CornerStorage
<
dim
-
1
,
dimWorld
>
::
Type
;
using
GlobalPosition
=
typename
CornerStorage
::
value_type
;
using
BoundaryFlag
=
Dumux
::
BoundaryFlag
<
Grid
>
;
};
/*!
...
...
@@ -99,6 +101,7 @@ class CCMpfaSubControlVolumeFace
using
CornerStorage
=
typename
T
::
CornerStorage
;
using
OutsideGridIndexStorage
=
typename
T
::
OutsideGridIndexStorage
;
using
Geometry
=
typename
T
::
Geometry
;
using
BoundaryFlag
=
typename
T
::
BoundaryFlag
;
public:
//! export the type used for global coordinates
...
...
@@ -121,6 +124,7 @@ public:
* \param boundary Boolean to specify whether or not the scvf is on a boundary
*/
template
<
class
MpfaHelper
>
[[
deprecated
(
"Use constructor taking an intersection instead"
)]]
CCMpfaSubControlVolumeFace
(
const
MpfaHelper
&
helper
,
CornerStorage
&&
corners
,
GlobalPosition
&&
unitOuterNormal
,
...
...
@@ -151,6 +155,39 @@ public:
area_
=
helper
.
computeScvfArea
(
corners_
);
}
//! Construction with given intersection
template
<
class
MpfaHelper
,
class
Intersection
>
CCMpfaSubControlVolumeFace
(
const
MpfaHelper
&
helper
,
CornerStorage
&&
corners
,
const
Intersection
&
intersection
,
GridIndexType
vIdxGlobal
,
unsigned
int
vIdxLocal
,
GridIndexType
scvfIndex
,
GridIndexType
insideScvIdx
,
const
OutsideGridIndexStorage
&
outsideScvIndices
,
Scalar
q
,
bool
boundary
)
:
boundary_
(
boundary
)
,
vertexIndex_
(
vIdxGlobal
)
,
scvfIndex_
(
scvfIndex
)
,
insideScvIdx_
(
insideScvIdx
)
,
outsideScvIndices_
(
outsideScvIndices
)
,
vIdxInElement_
(
vIdxLocal
)
,
corners_
(
std
::
move
(
corners
))
,
center_
(
0.0
)
,
unitOuterNormal_
(
intersection
.
centerUnitOuterNormal
())
,
boundaryFlag_
{
intersection
}
{
// compute the center of the scvf
for
(
const
auto
&
corner
:
corners_
)
center_
+=
corner
;
center_
/=
corners_
.
size
();
// use helper class to obtain area & integration point
ipGlobal_
=
helper
.
getScvfIntegrationPoint
(
corners_
,
q
);
area_
=
helper
.
computeScvfArea
(
corners_
);
}
//! The area of the sub control volume face
Scalar
area
()
const
{
return
area_
;
}
...
...
@@ -223,6 +260,10 @@ public:
Geometry
geometry
()
const
{
return
Geometry
(
Dune
::
GeometryTypes
::
cube
(
Geometry
::
mydimension
),
corners_
);
}
//! Return the boundary flag
typename
BoundaryFlag
::
value_type
boundaryFlag
()
const
{
return
boundaryFlag_
.
get
();
}
private:
bool
boundary_
;
GridIndexType
vertexIndex_
;
...
...
@@ -236,6 +277,7 @@ private:
GlobalPosition
ipGlobal_
;
GlobalPosition
unitOuterNormal_
;
Scalar
area_
;
BoundaryFlag
boundaryFlag_
;
};
}
// end namespace Dumux
...
...
Timo Koch
@timok
mentioned in commit
77164fe8
·
Jul 02, 2021
mentioned in commit
77164fe8
mentioned in commit 77164fe8450f7937e39091cd7f609895939f82a5
Toggle commit list
Timo Koch
@timok
mentioned in merge request
!2696 (merged)
·
Jul 02, 2021
mentioned in merge request
!2696 (merged)
mentioned in merge request !2696
Toggle commit list
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