From a76db634f9bc9b69feccf414b27527624d7a4ae5 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Mon, 7 Dec 2020 07:46:27 +0100 Subject: [PATCH] Fix MEDReader to be able to read big meshes with connectivity ids length > 2**31 (int32 limit) --- .../plugin/MEDLoaderForPV/MEDFileFieldRepresentationTree.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugins/MEDReader/plugin/MEDLoaderForPV/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/plugin/MEDLoaderForPV/MEDFileFieldRepresentationTree.cxx index 87404a49..a8396b31 100644 --- a/src/Plugins/MEDReader/plugin/MEDLoaderForPV/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/plugin/MEDLoaderForPV/MEDFileFieldRepresentationTree.cxx @@ -270,7 +270,7 @@ void AssignDataPointerToVTK(typename MEDFileVTKTraits::VtkType *vtkTab, typen // here copy is always assumed. template -void AssignDataPointerOther(VTKT *vtkTab, MCT *mcTab, int nbElems) +void AssignDataPointerOther(VTKT *vtkTab, MCT *mcTab, vtkIdType nbElems) { typedef typename VTKT::ValueType VTKType; if ( sizeof( VTKType ) == sizeof( typename MCT::Type )) @@ -732,7 +732,7 @@ vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInt MCAuto typesSafe(typesMC); MCAuto cellLocationsSafe(cellLocationsMC),cellsSafe(cellsMC),faceLocationsSafe(faceLocationsMC),facesSafe(facesMC); // - int nbOfCells(typesSafe->getNbOfElems()); + vtkIdType nbOfCells(typesSafe->getNbOfElems()); vtkUnstructuredGrid *ret(vtkUnstructuredGrid::New()); vtkUnsignedCharArray *cellTypes(vtkUnsignedCharArray::New()); AssignDataPointerOther(cellTypes,typesSafe,nbOfCells); -- 2.39.2