34 #include <vtkCellData.h>
35 #include <vtkDataSet.h>
36 #include <vtkDataSetReader.h>
37 #include <vtkGenericCell.h>
38 #include <vtkIdList.h>
39 #include <vtkPointData.h>
40 #include <vtkPointSet.h>
41 #include <vtkPoints.h>
42 #include <vtkPolyData.h>
43 #include <vtkSmartPointer.h>
44 #include <vtkUnstructuredGrid.h>
45 #include <vtkXMLPUnstructuredGridReader.h>
46 #include <vtkCommand.h>
std::basic_string< CepsChar > CepsString
C++ format string.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
Abstract base class that encapsulates primary functionalities of each mesh reader.
This class enables reading of vtk dataset files.
~VtkMeshReader() override
Destructor.
void getNextCell(CepsUInt cellId, CepsUInt fileCellId, CepsUInt nodeOffset, CepsVector< CepsNodeGlobalIndex > &nodeIndices, CepsVector< CepsUInt > &nodeIndicesPtr, CepsVector< CepsAttribute > &cellAttr, CepsVector< CepsUInt > &cellAttrPtr, CepsVector< CepsChar > &isBoundaryCell, CepsBool boundaryFlag) override
Reads a single cell in mesh file.
void readNodes(CepsUInt indexStart, CepsUInt indexEnd, CepsUInt nodeOffset, CepsVector< CepsReal > &coords, CepsVector< CepsAttribute > &attr, CepsVector< CepsUInt > &attrPtr) override
Reads several nodes in mesh file.
void determinePointDataToRead()
Selects the integer array that should be present, which contains node attributes.
CepsVector< vtkDataArray * > m_cellArrayToRead
Arrays of data defined on cells.
void readCells(CepsUInt indexStart, CepsUInt indexEnd, CepsUInt nodeOffset, CepsUInt cellOffset, CepsVector< CepsNodeGlobalIndex > &nodeIndices, CepsVector< CepsUInt > &nodeIndicesPtr, CepsVector< CepsAttribute > &cellAttr, CepsVector< CepsUInt > &cellAttrPtr, CepsVector< CepsChar > &isBoundaryCell) override
Reads several cells in mesh file.
VtkMeshReader(const CepsString &fileName, const CepsUInt &dim, CepsBool quads=false)
Constructor with full file name.
void determineCellDataToRead()
Selects the integer array that should be present, which contains cell attributes.
void initializePvtu(const CepsString &fileName)
Reads global information for parallel unstructured grids.
vtkSmartPointer< vtkDataSet > m_mesh
VTK mesh structure.
CepsVector< vtkDataArray * > m_pointArrayToRead
Arrays of data defined on points.
void initializeLegacy(const CepsString &fileName)
Reads global information for legacy files.
void initialize() override
Read nodes from indexStart to indexEnd, filling the arrays of coordinates and attributes.
CepsBool isVtkFile(const CepsString &fileName) const
Test if file is legacy file .vtk or .pvtu.