Commit 4bdcbb0d authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed GlobalIndexType in VTKReader_libvtk.h

parent ae571b72
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -82,17 +82,16 @@ public:
      TNL_ASSERT_EQ( this->verticesInEntities.at( this->meshDimension ), subvertices, "numbers of cell subvertices do not match" );

      using MeshBuilder = MeshBuilder< MeshType >;
      using VertexIndexType = typename MeshType::MeshTraitsType::template EntityTraits< 0 >::GlobalIndexType;
      using CellIndexType = typename MeshType::MeshTraitsType::template EntityTraits< MeshType::Config::meshDimension >::GlobalIndexType;
      using GlobalIndexType = typename MeshType::GlobalIndexType;

      const VertexIndexType numberOfPoints = this->pointsData.size();
      const CellIndexType numberOfCells = this->entityIdMappings.at( this->meshDimension ).size();
      const GlobalIndexType numberOfPoints = this->pointsData.size();
      const GlobalIndexType numberOfCells = this->entityIdMappings.at( this->meshDimension ).size();

      MeshBuilder meshBuilder;
      meshBuilder.setPointsCount( numberOfPoints );
      meshBuilder.setCellsCount( numberOfCells );

      for( VertexIndexType i = 0; i < numberOfPoints; i++ ) {
      for( GlobalIndexType i = 0; i < numberOfPoints; i++ ) {
         typename MeshType::PointType p;
         for( int j = 0; j < p.size; j++ )
            p[ j ] = this->pointsData.at( i )[ j ];
@@ -100,7 +99,7 @@ public:
      }

      const auto& cellIdMap = this->entityIdMappings.at( this->meshDimension );
      for( CellIndexType i = 0; i < numberOfCells; i++ ) {
      for( GlobalIndexType i = 0; i < numberOfCells; i++ ) {
         const VTKIndexType vtkCellIndex = cellIdMap.at( i );
         const auto& vtkCellSeeds = this->entitySeeds.at( vtkCellIndex );
         using CellSeedType = typename MeshBuilder::CellSeedType;