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
6b292da2
Commit
6b292da2
authored
Sep 16, 2021
by
Ned Coltman
Browse files
[discretization][walldistance] modify the wall distance scheme's considerFace tool
parent
a0e3b576
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/walldistance.hh
View file @
6b292da2
...
...
@@ -51,6 +51,8 @@ class WallDistance
using
GridView
=
typename
GridGeometry
::
GridView
;
using
GridIndexType
=
typename
IndexTraits
<
GridView
>::
GridIndex
;
using
SubControlVolumeFace
=
typename
GridGeometry
::
SubControlVolumeFace
;
using
FVElementGeometry
=
typename
GridGeometry
::
LocalView
;
using
Element
=
typename
GridGeometry
::
GridView
::
template
Codim
<
0
>
::
Entity
;
using
Scalar
=
typename
GridView
::
Grid
::
ctype
;
using
GlobalPosition
=
typename
SubControlVolumeFace
::
GlobalPosition
;
...
...
@@ -131,7 +133,7 @@ public:
*/
template
<
class
LocationTag
>
WallDistance
(
std
::
shared_ptr
<
const
GridGeometry
>
gridGeometry
,
LocationTag
tag
)
:
WallDistance
(
gridGeometry
,
tag
,
[](
const
SubControlVolumeFace
&
scvf
)
{
return
true
;
})
{}
:
WallDistance
(
gridGeometry
,
tag
,
[](
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolumeFace
&
scvf
)
{
return
true
;
})
{}
//! caller has to make sure the lifetime of grid geometry exceeds the lifetime of wall distance
template
<
class
LocationTag
,
class
ScvfSelectionFunctor
>
...
...
@@ -194,7 +196,7 @@ private:
for
(
const
auto
&
scvf
:
scvfs
(
fvGeometry
))
{
if
(
scvf
.
boundary
()
&&
considerFace
(
scvf
))
if
(
scvf
.
boundary
()
&&
considerFace
(
fvGeometry
,
scvf
))
{
const
auto
&
geo
=
scvf
.
geometry
();
CornerStorage
corners
;
...
...
test/discretization/test_walldistance.cc
View file @
6b292da2
...
...
@@ -75,7 +75,7 @@ void testElement(const GridGeometry& gridGeometry, const std::string& outputName
const
auto
bottom
=
gridGeometry
.
bBoxMin
()[
GridGeometry
::
Grid
::
dimension
-
1
];
// Do not consider scvfs at top or bottom of domain.
const
auto
considerScvf
=
[
&
](
const
auto
&
scvf
){
const
auto
considerScvf
=
[
&
](
const
auto
&
fvGeometry
,
const
auto
&
scvf
){
return
scvf
.
ipGlobal
()[
GridGeometry
::
Grid
::
dimension
-
1
]
<
top
-
1e-6
&&
scvf
.
ipGlobal
()[
GridGeometry
::
Grid
::
dimension
-
1
]
>
bottom
+
1e-6
;
};
...
...
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