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
bb10b205
Commit
bb10b205
authored
Sep 29, 2020
by
Timo Koch
Browse files
[test][vtk][io] Add hasData to the vtk reader unit test
parent
b429ca33
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/io/vtk/test_vtkreader.cc
View file @
bb10b205
...
...
@@ -76,6 +76,10 @@ int main(int argc, char** argv) try
Dumux
::
VTKReader
::
Data
reorderedCellData
=
cellData
,
reorderedPointData
=
pointData
;
for
(
const
auto
&
[
name
,
data
]
:
cellData
)
{
// sanity check
if
(
!
vtkReader
->
hasData
(
name
,
Dumux
::
VTKReader
::
DataType
::
cellData
))
DUNE_THROW
(
Dune
::
Exception
,
"Array "
<<
name
<<
" exists but hasData returns false!"
);
auto
&
reorderedData
=
reorderedCellData
[
name
];
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
++
i
)
reorderedData
[
elementIndex
[
i
]]
=
data
[
i
];
...
...
@@ -83,6 +87,10 @@ int main(int argc, char** argv) try
for
(
const
auto
&
[
name
,
data
]
:
pointData
)
{
// sanity check
if
(
!
vtkReader
->
hasData
(
name
,
Dumux
::
VTKReader
::
DataType
::
pointData
))
DUNE_THROW
(
Dune
::
Exception
,
"Array "
<<
name
<<
" exists but hasData returns false!"
);
auto
&
reorderedData
=
reorderedPointData
[
name
];
for
(
unsigned
int
i
=
0
;
i
<
data
.
size
();
++
i
)
reorderedData
[
vertexIndex
[
i
]]
=
data
[
i
];
...
...
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