Skip to content
Snippets Groups Projects
Commit 673509ef authored by Mathieu Westphal (Kitware)'s avatar Mathieu Westphal (Kitware) :zap: Committed by Kitware Robot
Browse files

Merge topic 'FluentCFFReaderImprove'


1b1a2251 Merge branch vtk:master into FluentCFFReaderImprove
5794cf13 Bug fixes in FluentCFFReader

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Tested-by: default avatarbuildbot <buildbot@kitware.com>
Reviewed-by: default avatarMathieu Westphal (Kitware) <mathieu.westphal@kitware.com>
Merge-request: !10577
parents 43fe745b 1b1a2251
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,16 @@ int vtkFLUENTCFFReader::RequestData(vtkInformation* vtkNotUsed(request),
this->NumberOfVectors = 0;
if (this->FileState == DataState::AVAILABLE)
{
int flagData = this->GetData();
int flagData = 0;
try
{
flagData = this->GetData();
}
catch (std::runtime_error const& e)
{
vtkErrorMacro(<< e.what());
return 0;
}
if (flagData == 0)
{
vtkErrorMacro(
......@@ -336,7 +345,16 @@ int vtkFLUENTCFFReader::RequestInformation(vtkInformation* vtkNotUsed(request),
if (this->FileState == DataState::AVAILABLE)
{
int flagData = this->GetMetaData();
int flagData = 0;
try
{
flagData = this->GetMetaData();
}
catch (std::runtime_error const& e)
{
vtkErrorMacro(<< e.what());
return 0;
}
if (flagData == 0)
{
vtkErrorMacro(
......@@ -360,6 +378,14 @@ int vtkFLUENTCFFReader::RequestInformation(vtkInformation* vtkNotUsed(request),
//------------------------------------------------------------------------------
bool vtkFLUENTCFFReader::OpenCaseFile(const std::string& filename)
{
// Check if hdf5 lib contains zlib (DEFLATE)
htri_t avail = H5Zfilter_avail(H5Z_FILTER_DEFLATE);
if (!avail)
{
vtkErrorMacro("The current build is not compatible with this reader, HDF5 library misses ZLIB "
"compatibility.");
return false;
}
// Check if the file is HDF5 or exist
htri_t file_type = H5Fis_hdf5(filename.c_str());
if (file_type != 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment