Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
dune-vtk
Commits
482abe13
Commit
482abe13
authored
Dec 16, 2020
by
Praetorius, Simon
Browse files
adapt the tests after changing the defaults
parent
121b8682
Changes
1
Hide whitespace changes
Inline
Side-by-side
dune/vtk/test/test-function.cc
View file @
482abe13
...
...
@@ -92,39 +92,38 @@ int main (int argc, char** argv)
Vtk
::
Function
<
GridView
>
func1
{
f1
};
VTK_ASSERT
(
func1
.
numComponents
()
==
1
);
VTK_ASSERT
(
func1
.
rangeType
()
==
Vtk
::
RangeTypes
::
SCALAR
);
VTK_ASSERT
(
func1
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT32
);
writer
.
addPointData
(
func1
,
"p2"
);
// test constructible by local-function
Vtk
::
Function
<
GridView
>
func2
{
f2
,
"func2"
};
VTK_ASSERT
(
func2
.
numComponents
()
==
1
);
VTK_ASSERT
(
func2
.
rangeType
()
==
Vtk
::
RangeTypes
::
UNSPECIFIED
);
VTK_ASSERT
(
func2
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
32
);
VTK_ASSERT
(
func2
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
64
);
writer
.
addPointData
(
func2
);
Vtk
::
Function
<
GridView
>
func3
{
f3
,
"func3"
,
3
};
VTK_ASSERT
(
func3
.
numComponents
()
==
3
);
VTK_ASSERT
(
func3
.
rangeType
()
==
Vtk
::
RangeTypes
::
UNSPECIFIED
);
VTK_ASSERT
(
func3
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
32
);
VTK_ASSERT
(
func3
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
64
);
writer
.
addPointData
(
func3
);
// test constructible with component vector
Vtk
::
Function
<
GridView
>
func4a
{
f3
,
"func4a"
,
1
};
VTK_ASSERT
(
func4a
.
numComponents
()
==
1
);
VTK_ASSERT
(
func4a
.
rangeType
()
==
Vtk
::
RangeTypes
::
UNSPECIFIED
);
VTK_ASSERT
(
func4a
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
32
);
VTK_ASSERT
(
func4a
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
64
);
writer
.
addPointData
(
func4a
);
Vtk
::
Function
<
GridView
>
func4b
{
f3
,
"func4b"
,
{
1
}};
// == func4a
VTK_ASSERT
(
func4b
.
numComponents
()
==
1
);
VTK_ASSERT
(
func4b
.
rangeType
()
==
Vtk
::
RangeTypes
::
UNSPECIFIED
);
VTK_ASSERT
(
func4b
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
32
);
VTK_ASSERT
(
func4b
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
64
);
writer
.
addPointData
(
func4b
);
Vtk
::
Function
<
GridView
>
func4c
{
f3
,
"func4c"
,
std
::
vector
{
1
}};
VTK_ASSERT
(
func4c
.
numComponents
()
==
1
);
VTK_ASSERT
(
func4c
.
rangeType
()
==
Vtk
::
RangeTypes
::
UNSPECIFIED
);
VTK_ASSERT
(
func4c
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
32
);
VTK_ASSERT
(
func4c
.
dataType
()
==
Vtk
::
DataTypes
::
FLOAT
64
);
writer
.
addPointData
(
func4c
);
// Test copy-constructible
...
...
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