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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Sankhesh Jhaveri
VTK
Commits
a0076182
Commit
a0076182
authored
2 weeks ago
by
Louis Gombert
Browse files
Options
Downloads
Patches
Plain Diff
Fix new HDF tests for no merge parts
parent
0964fb02
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
IO/HDF/Testing/Cxx/TestHDFWriter.cxx
+3
-3
3 additions, 3 deletions
IO/HDF/Testing/Cxx/TestHDFWriter.cxx
IO/HDF/Testing/Cxx/TestHDFWriterTemporal.cxx
+31
-6
31 additions, 6 deletions
IO/HDF/Testing/Cxx/TestHDFWriterTemporal.cxx
with
34 additions
and
9 deletions
IO/HDF/Testing/Cxx/TestHDFWriter.cxx
+
3
−
3
View file @
a0076182
...
...
@@ -274,7 +274,6 @@ bool TestPartitionedUnstructuredGrid(const std::string& tempDir, const std::stri
const
std
::
string
basePath
=
dataRoot
+
"/Data/"
+
baseName
;
vtkNew
<
vtkHDFReader
>
baseReader
;
baseReader
->
SetFileName
(
basePath
.
c_str
());
baseReader
->
SetMergeParts
(
false
);
baseReader
->
Update
();
auto
baseData
=
vtkPartitionedDataSet
::
SafeDownCast
(
baseReader
->
GetOutput
());
if
(
baseData
==
nullptr
)
...
...
@@ -302,7 +301,6 @@ bool TestPartitionedPolyData(const std::string& tempDir, const std::string& data
const
std
::
string
basePath
=
dataRoot
+
"/Data/"
+
baseName
;
vtkNew
<
vtkHDFReader
>
baseReader
;
baseReader
->
SetFileName
(
basePath
.
c_str
());
baseReader
->
SetMergeParts
(
false
);
baseReader
->
Update
();
auto
baseData
=
vtkPartitionedDataSet
::
SafeDownCast
(
baseReader
->
GetOutput
());
if
(
baseData
==
nullptr
)
...
...
@@ -356,7 +354,9 @@ bool TestMultiBlockIdenticalBlockNames(const std::string& tempDir, const std::st
vtkNew
<
vtkHDFReader
>
baseReader
;
baseReader
->
SetFileName
(
basePath
.
c_str
());
baseReader
->
Update
();
vtkPolyData
*
pd
=
vtkPolyData
::
SafeDownCast
(
baseReader
->
GetOutputDataObject
(
0
));
vtkPartitionedDataSet
*
pds
=
vtkPartitionedDataSet
::
SafeDownCast
(
baseReader
->
GetOutputDataObject
(
0
));
vtkPolyData
*
pd
=
vtkPolyData
::
SafeDownCast
(
pds
->
GetPartition
(
0
));
// Create a nested MultiBlock with several times the same block
vtkNew
<
vtkMultiBlockDataSet
>
subSubBlock
;
...
...
This diff is collapsed.
Click to expand it.
IO/HDF/Testing/Cxx/TestHDFWriterTemporal.cxx
+
31
−
6
View file @
a0076182
...
...
@@ -245,12 +245,21 @@ bool TestTemporalComposite(const std::string& tempDir, const std::string& dataRo
const
std
::
vector
<
std
::
string
>&
baseNames
,
int
compositeType
)
{
std
::
vector
<
vtkSmartPointer
<
vtkHDFReader
>>
baselineReaders
;
std
::
vector
<
vtkSmartPointer
<
vtkMergeBlocks
>>
baselineReadersMerged
;
for
(
const
auto
&
baseName
:
baseNames
)
{
const
std
::
string
filePath
=
dataRoot
+
"/Data/"
+
baseName
+
".hdf"
;
vtkNew
<
vtkHDFReader
>
baseHDFReader
;
baseHDFReader
->
SetFileName
(
filePath
.
c_str
());
vtkNew
<
vtkMergeBlocks
>
mergeBlocks
;
mergeBlocks
->
SetInputConnection
(
baseHDFReader
->
GetOutputPort
());
mergeBlocks
->
SetMergePartitionsOnly
(
true
);
mergeBlocks
->
SetMergePoints
(
false
);
mergeBlocks
->
SetOutputDataSetType
(
VTK_UNSTRUCTURED_GRID
);
baselineReaders
.
emplace_back
(
baseHDFReader
);
baselineReadersMerged
.
emplace_back
(
mergeBlocks
);
}
// Create a composite structure
...
...
@@ -258,12 +267,18 @@ bool TestTemporalComposite(const std::string& tempDir, const std::string& dataRo
groupDataSets
->
SetOutputType
(
compositeType
);
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
baseNames
.
size
());
i
++
)
{
groupDataSets
->
AddInputConnection
(
baselineReaders
[
i
]
->
GetOutputPort
());
if
(
baseNames
[
i
]
==
"transient_sphere"
)
{
groupDataSets
->
AddInputConnection
(
baselineReadersMerged
[
i
]
->
GetOutputPort
());
}
else
{
groupDataSets
->
AddInputConnection
(
baselineReaders
[
i
]
->
GetOutputPort
());
}
groupDataSets
->
SetInputName
(
i
,
baseNames
[
i
].
c_str
());
}
// vtkGroupDataSetsFilter does not create an assembly for PDC, but the VTKHDF requires one.
// vtkNew<vtkPassInputTypeAlgorithm> addAssembly;
vtkNew
<::
vtkAddAssembly
>
addAssembly
;
addAssembly
->
SetInputConnection
(
groupDataSets
->
GetOutputPort
());
...
...
@@ -327,10 +342,19 @@ bool TestTemporalComposite(const std::string& tempDir, const std::string& dataRo
baselineReaders
[
compositeID
]
->
SetStep
(
step
);
baselineReaders
[
compositeID
]
->
Update
();
baselineReadersMerged
[
compositeID
]
->
Update
();
auto
currentGroupedDO
=
vtkDataSet
::
SafeDownCast
(
iter
->
GetCurrentDataObject
());
auto
baselineDO
=
vtkDataSet
::
SafeDownCast
(
baselineReaders
[
compositeID
]
->
GetOutputDataObject
(
0
));
vtkDataSet
*
baselineDO
=
nullptr
;
if
(
baseNames
[
compositeID
]
==
"transient_sphere"
)
{
baselineDO
=
vtkDataSet
::
SafeDownCast
(
baselineReadersMerged
[
compositeID
]
->
GetOutputDataObject
(
0
));
}
else
{
baselineDO
=
vtkDataSet
::
SafeDownCast
(
baselineReaders
[
compositeID
]
->
GetOutputDataObject
(
0
));
}
// After grouping datasets, field data (time values) are not expected to match with the
// original dataset field values. Copy them to avoid failing comparison.
...
...
@@ -391,8 +415,9 @@ int TestHDFWriterTemporal(int argc, char* argv[])
}
}
// Use a modified version of transient_harmonics to make sure that the time values match between
// both datasets
// // Use a modified version of transient_harmonics to make sure that the time values match
// between
// // both datasets
std
::
vector
<
std
::
string
>
baseNamesComposite
=
{
"transient_sphere"
,
"transient_harmonics"
};
result
&=
TestTemporalComposite
(
tempDir
,
dataRoot
,
baseNamesComposite
,
VTK_MULTIBLOCK_DATA_SET
);
result
&=
TestTemporalComposite
(
...
...
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