SHA256
1
0
forked from pool/paraview
Richard Brown 2021-03-30 19:12:26 +00:00 committed by Git OBS Bridge
commit ce9490e33f
13 changed files with 101 additions and 628 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7653950392a0d7c0287c26f1d3a25cdbaa11baa7524b0af0e6a1a0d7d487d034
size 49822084

3
ParaView-v5.9.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b03258b7cddb77f0ee142e3e77b377e5b1f503bcabc02bfa578298c99a06980d
size 62784788

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:097239c700e7a78fc12bb2c9efdc856c2ade4c94d7c41538531ad3f173a65da7
size 49311320

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ccea82d032f014f1fd65acba9faaeb1c48df64ee30e60d1453b8fbf648ed7ce
size 46087750

View File

@ -1,38 +0,0 @@
diff --git a/VTK/ThirdParty/exodusII/vtk.module b/VTK/ThirdParty/exodusII/vtk.module
index 27301eceb62f6200f69d65046a0e35a3572825e8..cb6bd927acd008a15c9d2df67d75cbbfd3237b57 100644
--- a/VTK/ThirdParty/exodusII/vtk.module
+++ b/VTK/ThirdParty/exodusII/vtk.module
@@ -3,5 +3,6 @@ NAME
LIBRARY_NAME
vtkexodusII
DEPENDS
+ VTK::hdf5
VTK::netcdf
THIRD_PARTY
diff --git a/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt b/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
index 025abc43e0a8f9a94abdafdb7dfc95713d8f9216..d931004997f199c4aab57b94797043dd384fd2dd 100644
--- a/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
+++ b/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
@@ -297,14 +297,19 @@ set(headers
"${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h"
"${CMAKE_CURRENT_BINARY_DIR}/include/exodus_config.h")
+vtk_module_find_package(PACKAGE Threads)
+
vtk_module_add_module(VTK::exodusII
SOURCES ${sources}
HEADERS ${headers}
HEADERS_SUBDIR "vtkexodusII/include")
-target_compile_definitions(exodusII
+vtk_module_definitions(VTK::exodusII
PRIVATE
exoIIc_EXPORTS)
-target_include_directories(exodusII
+vtk_module_include(VTK::exodusII
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
+vtk_module_link(VTK::exodusII
+ PRIVATE
+ Threads::Threads)

View File

@ -1,540 +0,0 @@
From 3d48a287141eb911b4888440e09c262743b4db3c Mon Sep 17 00:00:00 2001
From: Mickael PHILIT <mickey.phy@gmail.com>
Date: Wed, 4 Mar 2020 14:54:30 +0100
Subject: [PATCH] Add support for new API cgio_read_***data***_type
CGNS 4.1 removed old cgio API and now support providing memory data type.
Changes are made to keep current behavior of CGNS reading.
Data conversion is not let to CGNS with new API as it may only be stable for HDF5 files.
---
VTKExtensions/CGNSReader/cgio_helpers.cxx | 14 +--
VTKExtensions/CGNSReader/cgio_helpers.h | 3 +-
VTKExtensions/CGNSReader/vtkCGNSReader.cxx | 85 +++++++++++++------
.../CGNSReader/vtkCGNSReaderInternal.cxx | 44 +++++-----
.../CGNSReader/vtkCGNSReaderInternal.h | 53 ++++++++++--
5 files changed, 133 insertions(+), 66 deletions(-)
Index: ParaView-v5.8.1/VTKExtensions/CGNSReader/cgio_helpers.cxx
===================================================================
--- ParaView-v5.8.1.orig/VTKExtensions/CGNSReader/cgio_helpers.cxx
+++ ParaView-v5.8.1/VTKExtensions/CGNSReader/cgio_helpers.cxx
@@ -44,7 +44,7 @@ int readNodeStringData(int cgioNum, doub
data.resize(size);
// read data
- if (cgio_read_all_data(cgioNum, nodeId, (void*)data.c_str()) != CG_OK)
+ if (cgio_read_all_data_type(cgioNum, nodeId, "C1", (void*)data.c_str()) != CG_OK)
{
return 1;
}
@@ -80,7 +80,7 @@ int readNodeData<char>(int cgioNum, doub
data.resize(size + 1);
// read data
- if (cgio_read_all_data(cgioNum, nodeId, &data[0]) != CG_OK)
+ if (cgio_read_all_data_type(cgioNum, nodeId, "C1", &data[0]) != CG_OK)
{
return 1;
}
@@ -167,7 +167,7 @@ int readBaseIds(int cgioNum, double root
int readBaseCoreInfo(int cgioNum, double baseId, CGNSRead::BaseInformation& baseInfo)
{
CGNSRead::char_33 dataType;
- std::vector<int> mdata;
+ std::vector<int32_t> mdata;
if (cgio_get_name(cgioNum, baseId, baseInfo.name) != CG_OK)
{
@@ -187,7 +187,7 @@ int readBaseCoreInfo(int cgioNum, double
return 1;
}
- if (CGNSRead::readNodeData<int>(cgioNum, baseId, mdata) != 0)
+ if (CGNSRead::readNodeData<int32_t>(cgioNum, baseId, mdata) != 0)
{
std::cerr << "error while reading base dimension" << std::endl;
return 1;
@@ -209,7 +209,7 @@ int readBaseIteration(int cgioNum, doubl
bool createTimeStates = true;
bool createIterStates = true;
- std::vector<int> ndata;
+ std::vector<int32_t> ndata;
// read node data type
if (cgio_get_data_type(cgioNum, nodeId, dataType) != CG_OK)
{
@@ -222,7 +222,7 @@ int readBaseIteration(int cgioNum, doubl
return 1;
}
- if (CGNSRead::readNodeData<int>(cgioNum, nodeId, ndata) != 0)
+ if (CGNSRead::readNodeData<int32_t>(cgioNum, nodeId, ndata) != 0)
{
std::cerr << "error while reading number of state in base" << std::endl;
return 1;
@@ -298,7 +298,7 @@ int readBaseIteration(int cgioNum, doubl
}
baseInfo.steps.clear();
- CGNSRead::readNodeData<int>(cgioNum, childrenIterative[nc], baseInfo.steps);
+ CGNSRead::readNodeData<int32_t>(cgioNum, childrenIterative[nc], baseInfo.steps);
if (static_cast<int>(baseInfo.steps.size()) != nstates)
{
std::cerr << "Error reading steps node";
Index: ParaView-v5.8.1/VTKExtensions/CGNSReader/cgio_helpers.h
===================================================================
--- ParaView-v5.8.1.orig/VTKExtensions/CGNSReader/cgio_helpers.h
+++ ParaView-v5.8.1/VTKExtensions/CGNSReader/cgio_helpers.h
@@ -46,6 +46,7 @@ inline int readNodeData(int cgioNum, dou
cgsize_t size = 1;
cgsize_t dimVals[12];
int ndim;
+ constexpr const char* dtName = CGNSRead::detail::cgns_type_name<T>();
if (cgio_get_dimensions(cgioNum, nodeId, &ndim, dimVals) != CG_OK)
{
@@ -65,7 +66,7 @@ inline int readNodeData(int cgioNum, dou
data.resize(size);
// read data
- if (cgio_read_all_data(cgioNum, nodeId, &data[0]) != CG_OK)
+ if (cgio_read_all_data_type(cgioNum, nodeId, dtName, &data[0]) != CG_OK)
{
return 1;
}
Index: ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReader.cxx
===================================================================
--- ParaView-v5.8.1.orig/VTKExtensions/CGNSReader/vtkCGNSReader.cxx
+++ ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReader.cxx
@@ -522,6 +522,33 @@ int StartsWithFlowSolution(const char* s
return ret;
}
+//----------------------------------------------------------------------------
+// Small helper
+const char* get_data_type(const CGNS_ENUMT(DataType_t) dt)
+{
+ const char* dataType;
+ switch (dt)
+ {
+ case CGNS_ENUMV(Integer):
+ dataType = "I4";
+ break;
+ case CGNS_ENUMV(LongInteger):
+ dataType = "I8";
+ break;
+ case CGNS_ENUMV(RealSingle):
+ dataType = "R4";
+ break;
+ case CGNS_ENUMV(RealDouble):
+ dataType = "R8";
+ break;
+ case CGNS_ENUMV(Character):
+ dataType = "C1";
+ break;
+ default:
+ dataType = "MT";
+ }
+ return dataType;
+}
//----------------------------------------------------------------------------
vtkCGNSReader::vtkCGNSReader()
@@ -668,7 +695,8 @@ int vtkCGNSReader::vtkPrivate::getGridAn
{
CGNSRead::char_33 gname;
const cgsize_t offset = static_cast<cgsize_t>(self->ActualTimeStep * 32);
- cgio_read_block_data(self->cgioNum, giterId, offset + 1, offset + 32, (void*)gname);
+ cgio_read_block_data_type(
+ self->cgioNum, giterId, offset + 1, offset + 32, "C1", (void*)gname);
gname[32] = '\0';
// NOTE: Names or identifiers contain no spaces and capitalization
// is used to distinguish individual words making up a name.
@@ -728,9 +756,9 @@ int vtkCGNSReader::vtkPrivate::getGridAn
EndsWithPointers(nodeName))
{
CGNSRead::char_33 gname;
- cgio_read_block_data(self->cgioNum, iterChildId[cc],
+ cgio_read_block_data_type(self->cgioNum, iterChildId[cc],
(cgsize_t)(self->ActualTimeStep * 32 + 1), (cgsize_t)(self->ActualTimeStep * 32 + 32),
- (void*)gname);
+ "C1", (void*)gname);
gname[32] = '\0';
CGNSRead::removeTrailingWhiteSpaces(gname);
std::string tmpStr = std::string(gname);
@@ -1193,28 +1221,30 @@ int vtkCGNSReader::vtkPrivate::readSolut
continue;
}
double cgioVarId = solChildId[ff];
+ const char* fieldDataType = get_data_type(cgnsVars[ff].dt);
// quick transfer of data because data types is given by cgns database
if (cgnsVars[ff].isComponent == false)
{
- if (cgio_read_data(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd, fieldSrcStride,
- cellDim, fieldMemDims, fieldMemStart, fieldMemEnd, fieldMemStride,
+ if (cgio_read_data_type(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd, fieldSrcStride,
+ fieldDataType, cellDim, fieldMemDims, fieldMemStart, fieldMemEnd, fieldMemStride,
(void*)vtkVars[ff]->GetVoidPointer(0)) != CG_OK)
{
char message[81];
cgio_error_message(message);
- vtkGenericWarningMacro(<< "cgio_read_data :" << message);
+ vtkGenericWarningMacro(<< "cgio_read_data_type :" << message);
}
}
else
{
- if (cgio_read_data(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd, fieldSrcStride,
- cellDim, fieldVectMemDims, fieldVectMemStart, fieldVectMemEnd, fieldVectMemStride,
+ if (cgio_read_data_type(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd, fieldSrcStride,
+ fieldDataType, cellDim, fieldVectMemDims, fieldVectMemStart, fieldVectMemEnd,
+ fieldVectMemStride,
(void*)vtkVars[ff]->GetVoidPointer(cgnsVars[ff].xyzIndex - 1)) != CG_OK)
{
char message[81];
cgio_error_message(message);
- vtkGenericWarningMacro(<< "cgio_read_data :" << message);
+ vtkGenericWarningMacro(<< "cgio_read_data_type :" << message);
}
}
cgio_release_id(self->cgioNum, cgioVarId);
@@ -1444,6 +1474,7 @@ int vtkCGNSReader::vtkPrivate::readBCDat
continue;
}
double cgioVarId = varIds[ff];
+ const char* fieldDataType = get_data_type(cgnsVars[ff].dt);
cgsize_t dataSize = 1;
cgsize_t dimVals[12];
@@ -1470,12 +1501,12 @@ int vtkCGNSReader::vtkPrivate::readBCDat
// quick transfer of data because data types is given by cgns database
if (cgnsVars[ff].isComponent == false)
{
- if (cgio_read_all_data(
- self->cgioNum, cgioVarId, (void*)vtkVars[ff]->GetVoidPointer(0)) != CG_OK)
+ if (cgio_read_all_data_type(self->cgioNum, cgioVarId, fieldDataType,
+ (void*)vtkVars[ff]->GetVoidPointer(0)) != CG_OK)
{
char message[81];
cgio_error_message(message);
- vtkGenericWarningMacro(<< "cgio_read_data :" << message);
+ vtkGenericWarningMacro(<< "cgio_read_all_data_type :" << message);
}
if (dataSize == 1)
{
@@ -1506,14 +1537,14 @@ int vtkCGNSReader::vtkPrivate::readBCDat
fieldVectMemDims[0] = fieldSrcEnd[0] * fieldVectMemStride[0];
fieldVectMemEnd[0] = fieldSrcEnd[0] * fieldVectMemStride[0];
- if (cgio_read_data(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd,
- fieldSrcStride, 1, fieldVectMemDims, fieldVectMemStart, fieldVectMemEnd,
- fieldVectMemStride,
+ if (cgio_read_data_type(self->cgioNum, cgioVarId, fieldSrcStart, fieldSrcEnd,
+ fieldSrcStride, fieldDataType, 1, fieldVectMemDims, fieldVectMemStart,
+ fieldVectMemEnd, fieldVectMemStride,
(void*)vtkVars[ff]->GetVoidPointer(cgnsVars[ff].xyzIndex - 1)) != CG_OK)
{
char message[81];
cgio_error_message(message);
- vtkGenericWarningMacro(<< "cgio_read_data :" << message);
+ vtkGenericWarningMacro(<< "cgio_read_data_type :" << message);
}
if (dataSize == 1)
{
@@ -2227,7 +2258,7 @@ int vtkCGNSReader::GetUnstructuredZone(
//
CGNSRead::char_33 dataType;
- std::vector<int> mdata;
+ std::vector<vtkTypeInt32> mdata;
if (cgio_get_name(this->cgioNum, elemIdList[sec], sectionInfoList[sec].name) != CG_OK)
{
@@ -2242,7 +2273,7 @@ int vtkCGNSReader::GetUnstructuredZone(
vtkErrorMacro(<< "Unexpected data type for dimension data of Element\n");
}
- CGNSRead::readNodeData<int>(cgioNum, elemIdList[sec], mdata);
+ CGNSRead::readNodeData<vtkTypeInt32>(cgioNum, elemIdList[sec], mdata);
if (mdata.size() != 2)
{
vtkErrorMacro(<< "Unexpected data for Elements_t node\n");
@@ -2263,8 +2294,8 @@ int vtkCGNSReader::GetUnstructuredZone(
if (strcmp(dataType, "I4") == 0)
{
- std::vector<int> mdata2;
- CGNSRead::readNodeData<int>(this->cgioNum, elemRangeId, mdata2);
+ std::vector<vtkTypeInt32> mdata2;
+ CGNSRead::readNodeData<vtkTypeInt32>(this->cgioNum, elemRangeId, mdata2);
if (mdata2.size() != 2)
{
vtkErrorMacro(<< "Unexpected data for ElementRange node\n");
@@ -2274,8 +2305,8 @@ int vtkCGNSReader::GetUnstructuredZone(
}
else if (strcmp(dataType, "I8") == 0)
{
- std::vector<cglong_t> mdata2;
- CGNSRead::readNodeData<cglong_t>(this->cgioNum, elemRangeId, mdata2);
+ std::vector<vtkTypeInt64> mdata2;
+ CGNSRead::readNodeData<vtkTypeInt64>(this->cgioNum, elemRangeId, mdata2);
if (mdata2.size() != 2)
{
vtkErrorMacro(<< "Unexpected data for ElementRange node\n");
@@ -4433,8 +4464,8 @@ int vtkCGNSReader::RequestData(vtkInform
if (strcmp(dataType, "I4") == 0)
{
- std::vector<int> mdata;
- CGNSRead::readNodeData<int>(this->cgioNum, baseChildId[zone], mdata);
+ std::vector<vtkTypeInt32> mdata;
+ CGNSRead::readNodeData<vtkTypeInt32>(this->cgioNum, baseChildId[zone], mdata);
for (std::size_t index = 0; index < mdata.size(); index++)
{
zsize[index] = static_cast<cgsize_t>(mdata[index]);
@@ -4442,8 +4473,8 @@ int vtkCGNSReader::RequestData(vtkInform
}
else if (strcmp(dataType, "I8") == 0)
{
- std::vector<cglong_t> mdata;
- CGNSRead::readNodeData<cglong_t>(this->cgioNum, baseChildId[zone], mdata);
+ std::vector<vtkTypeInt64> mdata;
+ CGNSRead::readNodeData<vtkTypeInt64>(this->cgioNum, baseChildId[zone], mdata);
for (std::size_t index = 0; index < mdata.size(); index++)
{
zsize[index] = static_cast<cgsize_t>(mdata[index]);
@@ -4720,7 +4751,7 @@ int vtkCGNSReader::CanReadFile(const cha
}
// read data
- if (cgio_read_all_data(cgioFile, childId, &FileVersion))
+ if (cgio_read_all_data_type(cgioFile, childId, "R4", &FileVersion))
{
vtkErrorMacro(<< "read CGNS version number");
ierr = 0;
Index: ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.cxx
===================================================================
--- ParaView-v5.8.1.orig/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.cxx
+++ ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.cxx
@@ -36,8 +36,8 @@ int setUpRind(const int cgioNum, const d
if (strcmp(dataType, "I4") == 0)
{
- std::vector<int> mdata;
- CGNSRead::readNodeData<int>(cgioNum, rindId, mdata);
+ std::vector<vtkTypeInt32> mdata;
+ CGNSRead::readNodeData<vtkTypeInt32>(cgioNum, rindId, mdata);
for (std::size_t index = 0; index < mdata.size(); index++)
{
rind[index] = static_cast<int>(mdata[index]);
@@ -45,8 +45,8 @@ int setUpRind(const int cgioNum, const d
}
else if (strcmp(dataType, "I8") == 0)
{
- std::vector<cglong_t> mdata;
- CGNSRead::readNodeData<cglong_t>(cgioNum, rindId, mdata);
+ std::vector<vtkTypeInt64> mdata;
+ CGNSRead::readNodeData<vtkTypeInt64>(cgioNum, rindId, mdata);
for (std::size_t index = 0; index < mdata.size(); index++)
{
rind[index] = static_cast<int>(mdata[index]);
@@ -156,12 +156,12 @@ int get_section_connectivity(const int c
if (sizeOfCnt == sizeof(vtkIdType))
{
- if (cgio_read_data(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)localElements) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, dataType, dim,
+ memDim, memStart, memEnd, memStride, (void*)localElements) != CG_OK)
{
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
}
@@ -181,13 +181,13 @@ int get_section_connectivity(const int c
std::cerr << "Allocation failed for temporary connectivity array\n";
}
- if (cgio_read_data(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)data) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, "I4", dim,
+ memDim, memStart, memEnd, memStride, (void*)data) != CG_OK)
{
delete[] data;
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
for (cgsize_t n = 0; n < nn; n++)
@@ -204,13 +204,13 @@ int get_section_connectivity(const int c
std::cerr << "Allocation failed for temporary connectivity array\n";
return 1;
}
- if (cgio_read_data(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)data) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemConnectId, srcStart, srcEnd, srcStride, "I8", dim,
+ memDim, memStart, memEnd, memStride, (void*)data) != CG_OK)
{
delete[] data;
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
for (cgsize_t n = 0; n < nn; n++)
@@ -258,12 +258,12 @@ int get_section_start_offset(const int c
if (sizeOfCnt == sizeof(vtkIdType))
{
- if (cgio_read_data(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)localElementsIdx) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, dataType, dim,
+ memDim, memStart, memEnd, memStride, (void*)localElementsIdx) != CG_OK)
{
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
}
@@ -283,13 +283,13 @@ int get_section_start_offset(const int c
std::cerr << "Allocation failed for temporary connectivity offset array\n";
}
- if (cgio_read_data(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)data) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, "I4", dim,
+ memDim, memStart, memEnd, memStride, (void*)data) != CG_OK)
{
delete[] data;
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
for (cgsize_t n = 0; n < nn; n++)
@@ -306,13 +306,13 @@ int get_section_start_offset(const int c
std::cerr << "Allocation failed for temporary connectivity array\n";
return 1;
}
- if (cgio_read_data(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, dim, memDim,
- memStart, memEnd, memStride, (void*)data) != CG_OK)
+ if (cgio_read_data_type(cgioNum, cgioElemOffsetId, srcStart, srcEnd, srcStride, "I8", dim,
+ memDim, memStart, memEnd, memStride, (void*)data) != CG_OK)
{
delete[] data;
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
return 1;
}
for (cgsize_t n = 0; n < nn; n++)
Index: ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.h
===================================================================
--- ParaView-v5.8.1.orig/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.h
+++ ParaView-v5.8.1/VTKExtensions/CGNSReader/vtkCGNSReaderInternal.h
@@ -72,6 +72,39 @@ struct is_float<float>
};
}
+namespace detail
+{
+template <typename T>
+constexpr const char* cgns_type_name() noexcept
+{
+ return "MT";
+}
+
+template <>
+constexpr const char* cgns_type_name<float>() noexcept
+{
+ return "R4";
+}
+
+template <>
+constexpr const char* cgns_type_name<double>() noexcept
+{
+ return "R8";
+}
+
+template <>
+constexpr const char* cgns_type_name<vtkTypeInt32>() noexcept
+{
+ return "I4";
+}
+
+template <>
+constexpr const char* cgns_type_name<vtkTypeInt64>() noexcept
+{
+ return "I8";
+}
+}
+
typedef char char_33[33];
//------------------------------------------------------------------------------
@@ -206,12 +239,12 @@ class BaseInformation
public:
char_33 name;
- int cellDim;
- int physicalDim;
+ int32_t cellDim;
+ int32_t physicalDim;
//
int baseNumber;
- std::vector<int> steps;
+ std::vector<int32_t> steps;
std::vector<double> times;
// For unsteady meshes :
@@ -469,16 +502,18 @@ int get_XYZ_mesh(const int cgioNum, cons
// quick transfer of data if same data types
if (sameType == true)
{
- if (cgio_read_data(cgioNum, coordId, srcStart, srcEnd, srcStride, cellDim, memEnd, memStart,
- memEnd, memStride, (void*)currentCoord))
+ constexpr const char* dtNameT = detail::cgns_type_name<T>();
+ if (cgio_read_data_type(cgioNum, coordId, srcStart, srcEnd, srcStride, dtNameT, cellDim,
+ memEnd, memStart, memEnd, memStride, (void*)currentCoord))
{
char message[81];
cgio_error_message(message);
- std::cerr << "cgio_read_data :" << message;
+ std::cerr << "cgio_read_data_type :" << message;
}
}
else
{
+ constexpr const char* dtNameY = detail::cgns_type_name<Y>();
Y* dataArray = 0;
const cgsize_t memNoStride[3] = { 1, 1, 1 };
@@ -489,13 +524,13 @@ int get_XYZ_mesh(const int cgioNum, cons
std::cerr << "Error allocating buffer array\n";
break;
}
- if (cgio_read_data(cgioNum, coordId, srcStart, srcEnd, srcStride, cellDim, memDims, memStart,
- memDims, memNoStride, (void*)dataArray))
+ if (cgio_read_data_type(cgioNum, coordId, srcStart, srcEnd, srcStride, dtNameY, cellDim,
+ memDims, memStart, memDims, memNoStride, (void*)dataArray))
{
delete[] dataArray;
char message[81];
cgio_error_message(message);
- std::cerr << "Buffer array cgio_read_data :" << message;
+ std::cerr << "Buffer array cgio_read_data_type :" << message;
break;
}
for (vtkIdType ii = 0; ii < nPts; ++ii)

View File

@ -0,0 +1,37 @@
From 4caacf4577e615a80c4282c700347dfb2e931788 Mon Sep 17 00:00:00 2001
From: Ben Boeckel <ben.boeckel@kitware.com>
Date: Mon, 15 Feb 2021 10:17:53 -0500
Subject: [PATCH 2/2] Adaptors/Cam: include the .txx file
This allows the TU to instantiate the template information as needed.
---
Adaptors/Cam/fv_create_data.cxx | 1 +
Adaptors/Cam/se_create_data.cxx | 1 +
2 files changed, 2 insertions(+)
diff --git a/Adaptors/Cam/fv_create_data.cxx b/Adaptors/Cam/fv_create_data.cxx
index 95dc7260f0..0dc45c3e33 100644
--- a/Adaptors/Cam/fv_create_data.cxx
+++ b/Adaptors/Cam/fv_create_data.cxx
@@ -16,6 +16,7 @@
#include "fv_create_data.h"
#include "Grid.h"
+#include "Grid.txx"
#include "vtkCPDataDescription.h"
#include "vtkCPInputDataDescription.h"
diff --git a/Adaptors/Cam/se_create_data.cxx b/Adaptors/Cam/se_create_data.cxx
index 4552340652..a9877410df 100644
--- a/Adaptors/Cam/se_create_data.cxx
+++ b/Adaptors/Cam/se_create_data.cxx
@@ -16,6 +16,7 @@
#include "se_create_data.h"
#include "Grid.h"
+#include "Grid.txx"
#include "vtkCPDataDescription.h"
#include "vtkCPInputDataDescription.h"
--
GitLab

View File

@ -1,10 +1,11 @@
Index: ParaView-v5.8.0/Clients/ParaView/org.paraview.ParaView.desktop.in
Index: ParaView-v5.9.0/Clients/ParaView/org.paraview.ParaView.desktop.in
===================================================================
--- ParaView-v5.8.0.orig/Clients/ParaView/org.paraview.ParaView.desktop.in
+++ ParaView-v5.8.0/Clients/ParaView/org.paraview.ParaView.desktop.in
@@ -6,3 +6,5 @@ Comment=Parallel visualization applicati
Exec=paraview %f
--- ParaView-v5.9.0.orig/Clients/ParaView/org.paraview.ParaView.desktop.in
+++ ParaView-v5.9.0/Clients/ParaView/org.paraview.ParaView.desktop.in
@@ -7,4 +7,5 @@ Exec=paraview %f
TryExec=paraview
Icon=paraview
StartupWMClass=paraview
-Categories=Qt;Science;DataVisualization;
+Categories=Graphics;2DGraphics;3DGraphics;
+StartupNotify=true

View File

@ -1,25 +0,0 @@
From dae1718d50bec1b40b860280acafbdd94fc4cd5d Mon Sep 17 00:00:00 2001
From: Ben Boeckel <ben.boeckel@kitware.com>
Date: Sat, 21 Nov 2020 13:37:34 -0500
Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro
This macro has been removed upstream as it was always intended to be
private.
---
VTK/Rendering/FreeType/vtkFreeTypeTools.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: ParaView-v5.8.1/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx
===================================================================
--- ParaView-v5.8.1.orig/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx
+++ ParaView-v5.8.1/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx
@@ -378,8 +378,7 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap
}
//----------------------------------------------------------------------------
-FT_CALLBACK_DEF(FT_Error)
-vtkFreeTypeToolsFaceRequester(
+static FT_Error vtkFreeTypeToolsFaceRequester(
FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)
{
#if VTK_FTFC_DEBUG_CD

View File

@ -0,0 +1,21 @@
Index: ParaView-v5.9.0/VTK/ThirdParty/ioss/vtkioss/CMakeLists.txt
===================================================================
--- ParaView-v5.9.0.orig/VTK/ThirdParty/ioss/vtkioss/CMakeLists.txt
+++ ParaView-v5.9.0/VTK/ThirdParty/ioss/vtkioss/CMakeLists.txt
@@ -231,6 +231,8 @@ list(APPEND headers
vtk_ioss_mangle.h)
+vtk_module_find_package(PACKAGE Threads)
+
vtk_module_add_module(VTK::ioss
SOURCES ${sources}
PRIVATE_HEADERS ${headers})
@@ -238,3 +240,7 @@ vtk_module_definitions(VTK::ioss
PRIVATE
NO_ZOLTAN_SUPPORT
NO_PARMETIS_SUPPORT)
+vtk_module_link(VTK::ioss
+ PRIVATE
+ Threads::Threads)
+

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Feb 19 16:05:24 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 5.9.0:
* See
https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/release/ParaView-5.9.0.md.
- Add paraview-vtkioss-link-pthread.patch: Link against pthread
when building vtkioss
[https://gitlab.kitware.com/paraview/paraview/-/issues/20495].
- Add paraview-Adaptors-include-txx-file.patch: Fix Cam adaptor
template instantiation
[https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4729].
- PDF guide book ParaviewGuide-%{version}.pdf replaced by
ParaviewTutorial-%{version}.pdf.
- Drop upstream-incorporated patches:
* paraview-vtkFreeTypeTools-internal-macro.patch.
* fix-3d48a287-support-new-api-cgio_read_data_type.patch.
* bundled_exodusii_add_missing_libpthread.patch.
-------------------------------------------------------------------
Sun Dec 6 14:13:53 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package paraview
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,8 +16,8 @@
#
%define major_ver 5.8
%define shlib libparaview5_8
%define major_ver 5.9
%define shlib libparaview5_9
%if 0%{?suse_version} <= 1500
%bcond_with pugixml
@ -31,7 +31,7 @@
%define __builder ninja
Name: paraview
Version: 5.8.1
Version: 5.9.0
Release: 0
Summary: Data analysis and visualization application
License: BSD-3-Clause
@ -41,17 +41,15 @@ Source0: https://www.paraview.org/files/v%{major_ver}/ParaView-v%{version
Source1: %{name}-rpmlintrc
# CAUTION: GettingStarted may or may not be updated with each minor version
Source2: https://www.paraview.org/files/v%{major_ver}/ParaViewGettingStarted-%{version}.pdf
Source3: https://www.paraview.org/files/v%{major_ver}/ParaViewGuide-%{version}.pdf
Source3: https://www.paraview.org/files/v%{major_ver}/ParaViewTutorial-%{version}.pdf
# PATCH-FIX-UPSTREAM paraview-desktop-entry-fix.patch badshah400@gmail.com -- Fix desktop menu entry by inserting proper required categories
Patch1: paraview-desktop-entry-fix.patch
# PATCH-FIX-UPSTREAM fix-3d48a287-support-new-api-cgio_read_data_type.patch -- Add support for new API cgio_read_***data***_type
Patch2: fix-3d48a287-support-new-api-cgio_read_data_type.patch
Patch0: paraview-desktop-entry-fix.patch
# PATCH-FIX-OPENSUSE fix-libharu-missing-m.patch -- missing libraries for linking (gh#libharu/libharu#213)
Patch8: fix-libharu-missing-m.patch
# PATCH-FIX-OPENSUSE bundled_exodusii_add_missing_libpthread.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (updated to upstream patch, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865)
Patch10: bundled_exodusii_add_missing_libpthread.patch
# PATCH-FIX-UPSTREAM paraview-vtkFreeTypeTools-internal-macro.patch badshah400@gmail.com -- vtkFreeTypeTools: avoid using an internal macro; patch taken from upstream vtk git and rebased to apply with -p1
Patch11: paraview-vtkFreeTypeTools-internal-macro.patch
Patch2: fix-libharu-missing-m.patch
# PATCH-FIX-UPSTREAM paraview-vtkioss-link-pthread.patch badshah400@gmail.com -- Link against pthread when building vtkioss [https://gitlab.kitware.com/paraview/paraview/-/issues/20495]
Patch3: paraview-vtkioss-link-pthread.patch
# PATCH-FIX-UPSTREAM paraview-Adaptors-include-txx-file.patch badshah400@gmail.com -- Fix Cam adaptor template instantiation [https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4729]
Patch4: paraview-Adaptors-include-txx-file.patch
BuildRequires: Mesa-devel
BuildRequires: cgns-devel
BuildRequires: cmake >= 3.13
@ -184,7 +182,7 @@ This package provides the paraview plugins bundled with the upstream release.
%autosetup -p1 -n ParaView-v%{version}
# FIX env BASED HASHBANG
sed -Ei "1{s|#!/usr/bin/env python3|#!/usr/bin/python3|}" Clients/CommandLineExecutables/paraview-config
sed -Ei "1{s|#!/usr/bin/env python3|#!/usr/bin/python3|}" Clients/CommandLineExecutables/paraview-config.in
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects