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
0200cdd2
Commit
0200cdd2
authored
Nov 18, 2018
by
Timo Koch
Browse files
[tests] Add fvGeometry.hasBoundaryScvf() to the fvgeometry tests
parent
c6873cc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/discretization/box/test_boxfvgeometry.cc
View file @
0200cdd2
...
...
@@ -98,12 +98,21 @@ int main (int argc, char *argv[]) try
if
(
0
!=
testForwardIterator
(
range2
.
begin
(),
range2
.
end
(),
op2
))
DUNE_THROW
(
Dune
::
Exception
,
"Iterator does not fulfill the forward iterator concept"
);
std
::
size_t
boundaryCount
=
0
;
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
std
::
cout
<<
"-- scvf "
<<
scvf
.
index
()
<<
" ip at: "
<<
scvf
.
ipGlobal
()
<<
" normal: "
<<
scvf
.
unitOuterNormal
();
if
(
scvf
.
boundary
())
std
::
cout
<<
" (on boundary)."
;
if
(
scvf
.
boundary
())
{
++
boundaryCount
;
std
::
cout
<<
" (on boundary)."
;
}
std
::
cout
<<
std
::
endl
;
}
if
((
boundaryCount
>
0
)
!=
fvGeometry
.
hasBoundaryScvf
())
DUNE_THROW
(
Dune
::
InvalidStateException
,
"fvGeometry.hasBoundaryScvf() reports "
<<
fvGeometry
.
hasBoundaryScvf
()
<<
" but the number of boundary scvfs is "
<<
boundaryCount
);
}
}
// //////////////////////////////////
...
...
test/discretization/cellcentered/tpfa/test_tpfafvgeometry.cc
View file @
0200cdd2
...
...
@@ -99,12 +99,21 @@ int main (int argc, char *argv[]) try
if
(
0
!=
testForwardIterator
(
range2
.
begin
(),
range2
.
end
(),
op2
))
DUNE_THROW
(
Dune
::
Exception
,
"Iterator does not fulfill the forward iterator concept"
);
std
::
size_t
boundaryCount
=
0
;
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
std
::
cout
<<
"-- scvf "
<<
scvf
.
index
()
<<
" ip at: "
<<
scvf
.
ipGlobal
();
if
(
scvf
.
boundary
())
std
::
cout
<<
" (on boundary)."
;
if
(
scvf
.
boundary
())
{
++
boundaryCount
;
std
::
cout
<<
" (on boundary)."
;
}
std
::
cout
<<
std
::
endl
;
}
if
((
boundaryCount
>
0
)
!=
fvGeometry
.
hasBoundaryScvf
())
DUNE_THROW
(
Dune
::
InvalidStateException
,
"fvGeometry.hasBoundaryScvf() reports "
<<
fvGeometry
.
hasBoundaryScvf
()
<<
" but the number of boundary scvfs is "
<<
boundaryCount
);
}
}
// //////////////////////////////////
...
...
test/discretization/staggered/test_staggeredfvgeometry.cc
View file @
0200cdd2
...
...
@@ -133,12 +133,21 @@ int main (int argc, char *argv[]) try
if
(
0
!=
testForwardIterator
(
range2
.
begin
(),
range2
.
end
(),
op2
))
DUNE_THROW
(
Dune
::
Exception
,
"Iterator does not fulfill the forward iterator concept"
);
std
::
size_t
boundaryCount
=
0
;
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
std
::
cout
<<
"-- scvf "
<<
scvf
.
index
()
<<
" ip at: "
<<
scvf
.
ipGlobal
()
<<
" normal: "
<<
scvf
.
unitOuterNormal
();
if
(
scvf
.
boundary
())
std
::
cout
<<
" (on boundary)."
;
if
(
scvf
.
boundary
())
{
++
boundaryCount
;
std
::
cout
<<
" (on boundary)."
;
}
std
::
cout
<<
std
::
endl
;
}
if
((
boundaryCount
>
0
)
!=
fvGeometry
.
hasBoundaryScvf
())
DUNE_THROW
(
Dune
::
InvalidStateException
,
"fvGeometry.hasBoundaryScvf() reports "
<<
fvGeometry
.
hasBoundaryScvf
()
<<
" but the number of boundary scvfs is "
<<
boundaryCount
);
}
}
// //////////////////////////////////
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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