Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
56b31a63
Commit
56b31a63
authored
5 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test] Add test for reading vtk polylines with multiple points
parent
d2abbba3
No related branches found
No related tags found
1 merge request
!1587
[vtkreader] Enable reading polylines with multiple points
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/io/vtk/CMakeLists.txt
+10
-0
10 additions, 0 deletions
test/io/vtk/CMakeLists.txt
test/io/vtk/polyline.vtp
+38
-0
38 additions, 0 deletions
test/io/vtk/polyline.vtp
test/references/test_vtkreader_1d_polyline-reference.vtp
+45
-0
45 additions, 0 deletions
test/references/test_vtkreader_1d_polyline-reference.vtp
with
93 additions
and
0 deletions
test/io/vtk/CMakeLists.txt
+
10
−
0
View file @
56b31a63
add_input_file_links
()
dune_symlink_to_source_files
(
FILES polyline.vtp
)
dune_add_test
(
NAME test_vtkreader_3d
SOURCES test_vtkreader.cc
...
...
@@ -53,6 +54,15 @@ dune_add_test(NAME test_vtkreader_1d
--files
${
CMAKE_SOURCE_DIR
}
/test/references/test_md_embedded1d3d_1p_richards_tpfatpfa_1d-reference.vtp
${
CMAKE_CURRENT_BINARY_DIR
}
/test-1d.vtp
)
dune_add_test
(
NAME test_vtkreader_1d_polyline
TARGET test_vtkreader_1d
LABELS unit io
COMMAND
${
CMAKE_SOURCE_DIR
}
/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--command
"
${
CMAKE_CURRENT_BINARY_DIR
}
/test_vtkreader_1d polyline.vtp test_polyline"
--files
${
CMAKE_SOURCE_DIR
}
/test/references/test_vtkreader_1d_polyline-reference.vtp
${
CMAKE_CURRENT_BINARY_DIR
}
/test_polyline.vtp
)
dune_add_test
(
NAME test_vtk_staggeredfreeflowpvnames
SOURCES test_vtk_staggeredfreeflowpvnames.cc
LABELS unit io
)
This diff is collapsed.
Click to expand it.
test/io/vtk/polyline.vtp
0 → 100644
+
38
−
0
View file @
56b31a63
<?xml version="1.0"?>
<VTKFile
type=
"PolyData"
version=
"0.1"
byte_order=
"LittleEndian"
>
<PolyData>
<Piece
NumberOfLines=
"1"
NumberOfPoints=
"21"
>
<CellData
Scalars=
"p"
>
<DataArray
type=
"Float32"
Name=
"p"
NumberOfComponents=
"1"
format=
"ascii"
>
1
</DataArray>
<DataArray
type=
"Float32"
Name=
"process rank"
NumberOfComponents=
"1"
format=
"ascii"
>
0
</DataArray>
</CellData>
<PointData
Scalars=
"r"
>
<DataArray
type=
"Float32"
Name=
"r"
NumberOfComponents=
"1"
format=
"ascii"
>
0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0
</DataArray>
</PointData>
<Points>
<DataArray
type=
"Float32"
Name=
"Coordinates"
NumberOfComponents=
"3"
format=
"ascii"
>
0 0 0 0 0 0.05 0 0 0.1 0 0 0.15
0 0 0.2 0 0 0.25 0 0 0.3 0 0 0.35
0 0 0.4 0 0 0.45 0 0 0.5 0 0 0.55
0 0 0.6 0 0 0.65 0 0 0.7 0 0 0.75
0 0 0.8 0 0 0.85 0 0 0.9 0 0 0.95
0 0 1
</DataArray>
</Points>
<Lines>
<DataArray
type=
"Int32"
Name=
"connectivity"
NumberOfComponents=
"1"
format=
"ascii"
>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
</DataArray>
<DataArray
type=
"Int32"
Name=
"offsets"
NumberOfComponents=
"1"
format=
"ascii"
>
21
</DataArray>
</Lines>
</Piece>
</PolyData>
</VTKFile>
This diff is collapsed.
Click to expand it.
test/references/test_vtkreader_1d_polyline-reference.vtp
0 → 100644
+
45
−
0
View file @
56b31a63
<?xml version="1.0"?>
<VTKFile
type=
"PolyData"
version=
"0.1"
byte_order=
"LittleEndian"
>
<PolyData>
<Piece
NumberOfLines=
"20"
NumberOfPoints=
"21"
>
<PointData
Scalars=
"r"
>
<DataArray
type=
"Float32"
Name=
"r"
NumberOfComponents=
"1"
format=
"ascii"
>
0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1
1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
</DataArray>
</PointData>
<CellData
Scalars=
"p"
>
<DataArray
type=
"Float32"
Name=
"p"
NumberOfComponents=
"1"
format=
"ascii"
>
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
</DataArray>
<DataArray
type=
"Float32"
Name=
"process rank"
NumberOfComponents=
"1"
format=
"ascii"
>
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
</DataArray>
</CellData>
<Points>
<DataArray
type=
"Float32"
Name=
"Coordinates"
NumberOfComponents=
"3"
format=
"ascii"
>
0 0 0 0 0 0.05 0 0 0.1 0 0 0.15
0 0 0.2 0 0 0.25 0 0 0.3 0 0 0.35
0 0 0.4 0 0 0.45 0 0 0.5 0 0 0.55
0 0 0.6 0 0 0.65 0 0 0.7 0 0 0.75
0 0 0.8 0 0 0.85 0 0 0.9 0 0 0.95
0 0 1
</DataArray>
</Points>
<Lines>
<DataArray
type=
"Int32"
Name=
"connectivity"
NumberOfComponents=
"1"
format=
"ascii"
>
0 1 1 2 2 3 3 4 4 5 5 6
6 7 7 8 8 9 9 10 10 11 11 12
12 13 13 14 14 15 15 16 16 17 17 18
18 19 19 20
</DataArray>
<DataArray
type=
"Int32"
Name=
"offsets"
NumberOfComponents=
"1"
format=
"ascii"
>
2 4 6 8 10 12 14 16 18 20 22 24
26 28 30 32 34 36 38 40
</DataArray>
</Lines>
</Piece>
</PolyData>
</VTKFile>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment