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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Michael Migliore
VTK
Commits
8cc10ae6
Commit
8cc10ae6
authored
1 year ago
by
Julien Fausty
Browse files
Options
Downloads
Patches
Plain Diff
vtkHDFReader: fixing build warnings
parent
539cfec2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
IO/HDF/Testing/Cxx/TestHDFReaderTransient.cxx
+56
-56
56 additions, 56 deletions
IO/HDF/Testing/Cxx/TestHDFReaderTransient.cxx
IO/HDF/vtkHDFReader.cxx
+2
-1
2 additions, 1 deletion
IO/HDF/vtkHDFReader.cxx
IO/HDF/vtkHDFReaderImplementation.h
+0
-7
0 additions, 7 deletions
IO/HDF/vtkHDFReaderImplementation.h
with
58 additions
and
64 deletions
IO/HDF/Testing/Cxx/TestHDFReaderTransient.cxx
+
56
−
56
View file @
8cc10ae6
...
...
@@ -134,74 +134,74 @@ public:
return
false
;
}
template
<
>
bool
operator
()(
vtkUnstructuredGrid
*
lhs
,
vtkUnstructuredGrid
*
rhs
)
private
:
double
Tolerance
=
CHECK_TOLERANCE
;
};
template
<
>
bool
GeometryCheckerWorklet
::
operator
()(
vtkUnstructuredGrid
*
lhs
,
vtkUnstructuredGrid
*
rhs
)
{
CheckerWorklet
checks
(
this
->
Tolerance
);
// Geometry checks
auto
refRange
=
vtk
::
DataArrayValueRange
<
3
>
(
lhs
->
GetPoints
()
->
GetData
());
auto
getLHSPoints
=
[
&
](
vtkIdType
iPComp
)
{
return
refRange
[
iPComp
];
};
auto
hdfRange
=
vtk
::
DataArrayValueRange
<
3
>
(
rhs
->
GetPoints
()
->
GetData
());
auto
getRHSPoints
=
[
&
](
vtkIdType
iPComp
)
{
return
hdfRange
[
iPComp
];
};
if
(
!
checks
(
0
,
lhs
->
GetNumberOfPoints
()
*
3
,
getLHSPoints
,
getRHSPoints
))
{
CheckerWorklet
checks
(
this
->
Tolerance
);
// Geometry checks
auto
refRange
=
vtk
::
DataArrayValueRange
<
3
>
(
lhs
->
GetPoints
()
->
GetData
());
auto
getLHSPoints
=
[
&
](
vtkIdType
iPComp
)
{
return
refRange
[
iPComp
];
};
auto
hdfRange
=
vtk
::
DataArrayValueRange
<
3
>
(
rhs
->
GetPoints
()
->
GetData
());
auto
getRHSPoints
=
[
&
](
vtkIdType
iPComp
)
{
return
hdfRange
[
iPComp
];
};
if
(
!
checks
(
0
,
lhs
->
GetNumberOfPoints
()
*
3
,
getLHSPoints
,
getRHSPoints
))
{
std
::
cout
<<
"Points: Failed point geometry checks"
<<
std
::
endl
;
return
false
;
}
std
::
cout
<<
"Points: Failed point geometry checks"
<<
std
::
endl
;
return
false
;
}
auto
refConnRange
=
vtk
::
DataArrayValueRange
<
1
>
(
lhs
->
GetCells
()
->
GetConnectivityArray
());
auto
getLHSConn
=
[
&
](
vtkIdType
iConn
)
{
return
refConnRange
[
iConn
];
};
auto
hdfConnRange
=
vtk
::
DataArrayValueRange
<
1
>
(
rhs
->
GetCells
()
->
GetConnectivityArray
());
auto
getRHSConn
=
[
&
](
vtkIdType
iConn
)
{
return
hdfConnRange
[
iConn
];
};
if
(
!
checks
(
0
,
refConnRange
.
size
(),
getLHSConn
,
getRHSConn
))
{
std
::
cout
<<
"Connectivity: Failed connectivity geometry checks"
<<
std
::
endl
;
return
false
;
}
auto
refConnRange
=
vtk
::
DataArrayValueRange
<
1
>
(
lhs
->
GetCells
()
->
GetConnectivityArray
());
auto
getLHSConn
=
[
&
](
vtkIdType
iConn
)
{
return
refConnRange
[
iConn
];
};
auto
hdfConnRange
=
vtk
::
DataArrayValueRange
<
1
>
(
rhs
->
GetCells
()
->
GetConnectivityArray
());
auto
getRHSConn
=
[
&
](
vtkIdType
iConn
)
{
return
hdfConnRange
[
iConn
];
};
if
(
!
checks
(
0
,
refConnRange
.
size
(),
getLHSConn
,
getRHSConn
))
{
std
::
cout
<<
"Connectivity: Failed connectivity geometry checks"
<<
std
::
endl
;
return
false
;
}
auto
refOffRange
=
vtk
::
DataArrayValueRange
<
1
>
(
lhs
->
GetCells
()
->
GetOffsetsArray
());
auto
getLHSOff
=
[
&
](
vtkIdType
iOff
)
{
return
refOffRange
[
iOff
];
};
auto
hdfOffRange
=
vtk
::
DataArrayValueRange
<
1
>
(
rhs
->
GetCells
()
->
GetOffsetsArray
());
auto
getRHSOff
=
[
&
](
vtkIdType
iOff
)
{
return
hdfOffRange
[
iOff
];
};
if
(
!
checks
(
0
,
refOffRange
.
size
(),
getLHSOff
,
getRHSOff
))
{
std
::
cout
<<
"Offsets: Failed offsets geometry checks"
<<
std
::
endl
;
return
false
;
}
return
true
;
auto
refOffRange
=
vtk
::
DataArrayValueRange
<
1
>
(
lhs
->
GetCells
()
->
GetOffsetsArray
());
auto
getLHSOff
=
[
&
](
vtkIdType
iOff
)
{
return
refOffRange
[
iOff
];
};
auto
hdfOffRange
=
vtk
::
DataArrayValueRange
<
1
>
(
rhs
->
GetCells
()
->
GetOffsetsArray
());
auto
getRHSOff
=
[
&
](
vtkIdType
iOff
)
{
return
hdfOffRange
[
iOff
];
};
if
(
!
checks
(
0
,
refOffRange
.
size
(),
getLHSOff
,
getRHSOff
))
{
std
::
cout
<<
"Offsets: Failed offsets geometry checks"
<<
std
::
endl
;
return
false
;
}
return
true
;
}
template
<
>
bool
operator
()(
vtkImageData
*
lhs
,
vtkImageData
*
rhs
)
template
<
>
bool
GeometryCheckerWorklet
::
operator
()(
vtkImageData
*
lhs
,
vtkImageData
*
rhs
)
{
const
auto
lExtent
=
lhs
->
GetExtent
();
const
auto
rExtent
=
rhs
->
GetExtent
();
for
(
vtkIdType
iE
=
0
;
iE
<
6
;
++
iE
)
{
const
auto
lExtent
=
lhs
->
GetExtent
();
const
auto
rExtent
=
rhs
->
GetExtent
();
for
(
vtkIdType
iE
=
0
;
iE
<
6
;
++
iE
)
if
(
lExtent
[
iE
]
-
rExtent
[
iE
]
>
this
->
Tolerance
)
{
if
(
lExtent
[
iE
]
-
rExtent
[
iE
]
>
this
->
Tolerance
)
{
std
::
cout
<<
"Extents: Failed extent geometry checks"
<<
std
::
endl
;
return
false
;
}
std
::
cout
<<
"Extents: Failed extent geometry checks"
<<
std
::
endl
;
return
false
;
}
}
const
auto
lSpacing
=
lhs
->
GetSpacing
();
const
auto
rSpacing
=
rhs
->
GetSpacing
();
for
(
vtkIdType
iS
=
0
;
iS
<
3
;
++
iS
)
const
auto
lSpacing
=
lhs
->
GetSpacing
();
const
auto
rSpacing
=
rhs
->
GetSpacing
();
for
(
vtkIdType
iS
=
0
;
iS
<
3
;
++
iS
)
{
if
(
lSpacing
[
iS
]
-
rSpacing
[
iS
]
>
this
->
Tolerance
)
{
if
(
lSpacing
[
iS
]
-
rSpacing
[
iS
]
>
this
->
Tolerance
)
{
std
::
cout
<<
"Spacing: Failed spacing geometry checks"
<<
std
::
endl
;
return
false
;
}
std
::
cout
<<
"Spacing: Failed spacing geometry checks"
<<
std
::
endl
;
return
false
;
}
return
true
;
}
private
:
double
Tolerance
=
CHECK_TOLERANCE
;
};
return
true
;
}
int
TestUGTransient
(
const
std
::
string
&
dataRoot
)
{
...
...
This diff is collapsed.
Click to expand it.
IO/HDF/vtkHDFReader.cxx
+
2
−
1
View file @
8cc10ae6
...
...
@@ -359,7 +359,8 @@ int vtkHDFReader::RequestInformation(vtkInformation* vtkNotUsed(request),
}
this
->
TimeRange
[
0
]
=
*
std
::
min_element
(
values
.
begin
(),
values
.
end
());
this
->
TimeRange
[
1
]
=
*
std
::
max_element
(
values
.
begin
(),
values
.
end
());
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_STEPS
(),
values
.
data
(),
values
.
size
());
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_STEPS
(),
values
.
data
(),
static_cast
<
int
>
(
values
.
size
()));
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_RANGE
(),
this
->
TimeRange
.
data
(),
2
);
}
else
...
...
This diff is collapsed.
Click to expand it.
IO/HDF/vtkHDFReaderImplementation.h
+
0
−
7
View file @
8cc10ae6
...
...
@@ -250,13 +250,6 @@ private:
///@}
};
//------------------------------------------------------------------------------
// explicit template instantiation declaration
extern
template
bool
vtkHDFReader
::
Implementation
::
GetAttribute
<
int
>(
const
char
*
attributeName
,
size_t
dim
,
int
*
value
);
extern
template
bool
vtkHDFReader
::
Implementation
::
GetAttribute
<
double
>(
const
char
*
attributeName
,
size_t
dim
,
double
*
value
);
VTK_ABI_NAMESPACE_END
#endif
// VTK-HeaderTest-Exclude: vtkHDFReaderImplementation.h
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