Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Mickael PHILIT
VTK
Commits
d4951a5d
Commit
d4951a5d
authored
2 weeks ago
by
Mickael PHILIT
Browse files
Options
Downloads
Patches
Plain Diff
Improve high order testing
parent
b6e9b16f
Loading
Loading
Loading
Pipeline
#441451
waiting for manual action
Stage: quick
Stage: build
Stage: test
Stage: test-ext
Stage: package
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
IO/CGNS/Testing/Cxx/TestCGNSReaderHOElements.cxx
+29
-0
29 additions, 0 deletions
IO/CGNS/Testing/Cxx/TestCGNSReaderHOElements.cxx
IO/CGNS/vtk.module
+2
-0
2 additions, 0 deletions
IO/CGNS/vtk.module
with
31 additions
and
0 deletions
IO/CGNS/Testing/Cxx/TestCGNSReaderHOElements.cxx
+
29
−
0
View file @
d4951a5d
...
...
@@ -9,8 +9,12 @@
#include
"vtkMultiBlockDataSet.h"
#include
"vtkNew.h"
#include
"vtkPointData.h"
#include
"vtkCellData.h"
#include
"vtkTestUtilities.h"
#include
"vtkUnstructuredGrid.h"
#include
"vtkCellSizeFilter.h"
#define compare_double(x, y, e) ((x) - (y) < (e) && (x) - (y) > -(e))
int
TestCGNSReaderHOElements
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -73,5 +77,30 @@ int TestCGNSReaderHOElements(int argc, char* argv[])
return
EXIT_FAILURE
;
}
// To check the point ordering, just compute the cell volume...
// It could also be possible to do an image comparison.
vtkNew
<
vtkCellSizeFilter
>
checkerSize
;
checkerSize
->
SetInputData
(
internal_hexa_125
);
checkerSize
->
ComputeVolumeOn
();
checkerSize
->
Update
();
auto
res
=
vtkDataSet
::
SafeDownCast
(
checkerSize
->
GetOutputDataObject
(
0
));
auto
cdata
=
res
->
GetCellData
();
auto
volume
=
vtk
::
DataArrayValueRange
<
1
>
(
cdata
->
GetArray
(
"Volume"
));
if
(
!
compare_double
(
volume
[
0
],
2000.
,
1.0e-6
))
{
return
EXIT_FAILURE
;
}
checkerSize
->
SetInputData
(
internal_hexa_64
);
checkerSize
->
ComputeVolumeOn
();
checkerSize
->
Update
();
auto
res_2
=
vtkDataSet
::
SafeDownCast
(
checkerSize
->
GetOutputDataObject
(
0
));
auto
cdata_2
=
res_2
->
GetCellData
();
auto
volume_2
=
vtk
::
DataArrayValueRange
<
1
>
(
cdata_2
->
GetArray
(
"Volume"
));
if
(
!
compare_double
(
volume_2
[
0
],
216.
,
1.0e-6
))
{
return
EXIT_FAILURE
;
}
return
EXIT_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
IO/CGNS/vtk.module
+
2
−
0
View file @
d4951a5d
...
...
@@ -26,3 +26,5 @@ TEST_DEPENDS
VTK
::
InteractionStyle
VTK
::
TestingCore
VTK
::
TestingRendering
VTK
::
FiltersGeneral
VTK
::
FiltersVerdict
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