Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only. More...
Public Types | |
enum | vtkDataType { VTK_INT, VTK_UINT, VTK_LONG, VTK_ULONG, VTK_FLOAT, VTK_DOUBLE, VTK_STRING, VTK_ID } |
Enumeration defining the vtk data types. More... | |
enum | vtkDataSetType { VTK_FIELD, VTK_SCALARS, VTK_VECTORS } |
Enumeration defining the vtk dataset types. More... | |
enum | parseMode { NOMODE, UNSTRUCTURED_GRID, POLYDATA, CELL_DATA, POINT_DATA } |
Enumeration defining the parse mode - what type of data is being. More... | |
enum | vtkTypes { VTK_EMPTY_CELL = 0, VTK_VERTEX = 1, VTK_POLY_VERTEX = 2, VTK_LINE = 3, VTK_POLY_LINE = 4, VTK_TRIANGLE = 5, VTK_TRIANGLE_STRIP = 6, VTK_POLYGON = 7, VTK_PIXEL = 8, VTK_QUAD = 9, VTK_TETRA = 10, VTK_VOXEL = 11, VTK_HEXAHEDRON = 12, VTK_WEDGE = 13, VTK_PYRAMID = 14, VTK_PENTAGONAL_PRISM = 15, VTK_HEXAGONAL_PRISM = 16 } |
Enumeration defining the cell types. More... | |
Public Member Functions | |
ClassName ("vtkUnstructuredReader") | |
Runtime type information. More... | |
vtkUnstructuredReader (const objectRegistry &obr, ISstream &) | |
Construct from Istream, read all. More... | |
const string | header () const |
Header. More... | |
const string & | title () const |
Title. More... | |
const string & | dataType () const |
DataType. More... | |
const pointField & | points () const |
Points. More... | |
pointField & | points () |
const cellShapeList & | cells () const |
3D cells. More... | |
cellShapeList & | cells () |
const labelList & | cellMap () const |
const faceList & | faces () const |
2D cells (=faces) More... | |
faceList & | faces () |
const labelList & | faceMap () const |
const labelListList & | lines () const |
1D cells (=open lines) More... | |
labelListList & | lines () |
const labelList & | lineMap () const |
const objectRegistry & | cellData () const |
Cell based fields. More... | |
objectRegistry & | cellData () |
const objectRegistry & | pointData () const |
Point based fields. More... | |
objectRegistry & | pointData () |
const objectRegistry & | otherData () const |
Other fields. More... | |
objectRegistry & | otherData () |
template<class Type > | |
void | printFieldStats (const objectRegistry &) const |
Debug: print contents of objectRegistry. More... | |
Static Public Attributes | |
static const NamedEnum< vtkDataType, 8 > | vtkDataTypeNames |
static const NamedEnum< vtkDataSetType, 3 > | vtkDataSetTypeNames |
static const NamedEnum< parseMode, 5 > | parseModeNames |
Private Member Functions | |
template<class T > | |
void | readBlock (Istream &inFile, const label n, List< T > &lst) const |
void | warnUnhandledType (Istream &inFile, const label type, labelHashSet &warningGiven) const |
void | extractCells (Istream &inFile, const labelList &cellTypes, const labelList &cellVertData) |
void | readField (ISstream &inFile, objectRegistry &obj, const word &arrayName, const word &dataType, const label size) const |
wordList | readFieldArray (ISstream &inFile, objectRegistry &obj, const label wantedSize) const |
objectRegistry & | selectRegistry (const parseMode readMode) |
void | read (ISstream &inFile) |
void | operator= (const vtkUnstructuredReader &) |
Dissallow assignment. More... | |
Private Attributes | |
string | header_ |
Header. More... | |
string | title_ |
Title. More... | |
string | dataType_ |
DataType. More... | |
pointField | points_ |
Points. More... | |
cellShapeList | cells_ |
3D cells. More... | |
labelList | cellMap_ |
Map from cells back to original ID. More... | |
faceList | faces_ |
2D cells (=faces) More... | |
labelList | faceMap_ |
Map from faces back to original ID. More... | |
labelListList | lines_ |
1D cells (=edges) More... | |
labelList | lineMap_ |
objectRegistry | cellData_ |
Cell based fields. More... | |
objectRegistry | pointData_ |
Point based fields. More... | |
objectRegistry | otherData_ |
Other fields. More... | |
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only.
- all integer types (int, unsigned_int, long etc.) become Foam::label
Definition at line 63 of file vtkUnstructuredReader.H.
enum vtkDataType |
Enumeration defining the vtk data types.
Enumerator | |
---|---|
VTK_INT | |
VTK_UINT | |
VTK_LONG | |
VTK_ULONG | |
VTK_FLOAT | |
VTK_DOUBLE | |
VTK_STRING | |
VTK_ID |
Definition at line 70 of file vtkUnstructuredReader.H.
enum vtkDataSetType |
Enumeration defining the vtk dataset types.
Enumerator | |
---|---|
VTK_FIELD | |
VTK_SCALARS | |
VTK_VECTORS |
Definition at line 86 of file vtkUnstructuredReader.H.
enum parseMode |
Enumeration defining the parse mode - what type of data is being.
read
Enumerator | |
---|---|
NOMODE | |
UNSTRUCTURED_GRID | |
POLYDATA | |
CELL_DATA | |
POINT_DATA |
Definition at line 98 of file vtkUnstructuredReader.H.
enum vtkTypes |
Enumeration defining the cell types.
Definition at line 111 of file vtkUnstructuredReader.H.
vtkUnstructuredReader | ( | const objectRegistry & | obr, |
ISstream & | inFile | ||
) |
Construct from Istream, read all.
Definition at line 538 of file vtkUnstructuredReader.C.
References Foam::read().
Definition at line 37 of file vtkUnstructuredReaderTemplates.C.
References forAll, n, and List::setSize().
Referenced by vtkUnstructuredReader::read().
|
private |
Definition at line 86 of file vtkUnstructuredReader.C.
References Foam::endl(), HashSet< Key, Hash >::insert(), IOWarningInFunction, and Foam::type().
|
private |
Definition at line 102 of file vtkUnstructuredReader.C.
References Foam::endl(), Foam::exit(), f(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, Foam::hex(), Foam::Info, lookup(), and List::size().
Referenced by vtkUnstructuredReader::read().
|
private |
Definition at line 361 of file vtkUnstructuredReader.C.
References Foam::endl(), forAll, ISstream::getLine(), Foam::Info, and IOWarningInFunction.
Referenced by vtkUnstructuredReader::read().
|
private |
Definition at line 463 of file vtkUnstructuredReader.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, fields, Foam::Info, Foam::Pout, readField(), and Foam::readLabel().
Referenced by vtkUnstructuredReader::read().
|
private |
Definition at line 516 of file vtkUnstructuredReader.C.
Referenced by vtkUnstructuredReader::read().
|
private |
3);
Definition at line 551 of file vtkUnstructuredReader.C.
References vtkUnstructuredReader::CELL_DATA, vtkUnstructuredReader::cellData_, vtkUnstructuredReader::cells_, List::clear(), vtkUnstructuredReader::dataType(), vtkUnstructuredReader::dataType_, Foam::endl(), HashTable::erase(), Foam::exit(), vtkUnstructuredReader::extractCells(), f(), vtkUnstructuredReader::faceMap_, vtkUnstructuredReader::faces_, Foam::FatalIOError, FatalIOErrorInFunction, HashTable::find(), forAll, ISstream::getLine(), IOstream::good(), vtkUnstructuredReader::header_, Foam::Info, HashTable< regIOobject * >::iterator, vtkUnstructuredReader::lineMap_, IOstream::lineNumber(), vtkUnstructuredReader::lines_, Foam::nl, vtkUnstructuredReader::NOMODE, nPoints, vtkUnstructuredReader::otherData_, vtkUnstructuredReader::parseModeNames, vtkUnstructuredReader::POINT_DATA, vtkUnstructuredReader::pointData_, vtkUnstructuredReader::points_, vtkUnstructuredReader::readBlock(), vtkUnstructuredReader::readField(), vtkUnstructuredReader::readFieldArray(), Foam::readLabel(), s(), vtkUnstructuredReader::selectRegistry(), List::setSize(), List::size(), regIOobject::store(), vtkUnstructuredReader::title_, vtkUnstructuredReader::VTK_DOUBLE, vtkUnstructuredReader::VTK_FLOAT, and vtkUnstructuredReader::vtkDataTypeNames.
|
private |
Dissallow assignment.
ClassName | ( | "vtkUnstructuredReader" | ) |
Runtime type information.
|
inline |
Header.
Definition at line 242 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::header_.
|
inline |
Title.
Definition at line 248 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::title_.
|
inline |
DataType.
Definition at line 254 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::dataType_.
Referenced by vtkUnstructuredReader::read().
|
inline |
Points.
Definition at line 261 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::points_.
Referenced by VTKsurfaceFormat< Face >::read(), and VTKedgeFormat::read().
|
inline |
Definition at line 266 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::points_.
|
inline |
3D cells.
Definition at line 272 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::cells_.
|
inline |
Definition at line 277 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::cells_.
|
inline |
Definition at line 282 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::cellMap_.
|
inline |
2D cells (=faces)
Definition at line 288 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::faces_.
Referenced by VTKsurfaceFormat< Face >::read().
|
inline |
Definition at line 293 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::faces_.
|
inline |
Definition at line 298 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::faceMap_.
|
inline |
1D cells (=open lines)
Definition at line 304 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::lines_.
Referenced by VTKedgeFormat::read().
|
inline |
Definition at line 309 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::lines_.
|
inline |
Definition at line 314 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::lineMap_.
|
inline |
Cell based fields.
Definition at line 320 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::cellData_.
Referenced by VTKsurfaceFormat< Face >::read().
|
inline |
Definition at line 325 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::cellData_.
|
inline |
Point based fields.
Definition at line 331 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::pointData_.
|
inline |
Definition at line 336 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::pointData_.
|
inline |
Other fields.
Definition at line 342 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::otherData_.
|
inline |
Definition at line 347 of file vtkUnstructuredReader.H.
References vtkUnstructuredReader::otherData_.
void printFieldStats | ( | const objectRegistry & | obj | ) | const |
Debug: print contents of objectRegistry.
Definition at line 53 of file vtkUnstructuredReaderTemplates.C.
References Foam::endl(), fieldNames, forAll, Foam::Info, objectRegistry::lookupObject(), objectRegistry::names(), Foam::nl, and List::size().
|
static |
Definition at line 82 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::read().
|
static |
Definition at line 93 of file vtkUnstructuredReader.H.
|
static |
Definition at line 107 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::read().
|
private |
Header.
Definition at line 136 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::header(), and vtkUnstructuredReader::read().
|
private |
Title.
Definition at line 139 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::read(), and vtkUnstructuredReader::title().
|
private |
DataType.
Definition at line 142 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::dataType(), and vtkUnstructuredReader::read().
|
private |
Points.
Definition at line 148 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::points(), and vtkUnstructuredReader::read().
|
private |
3D cells.
Definition at line 151 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::cells(), and vtkUnstructuredReader::read().
|
private |
Map from cells back to original ID.
Definition at line 154 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::cellMap().
|
private |
2D cells (=faces)
Definition at line 157 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::faces(), and vtkUnstructuredReader::read().
|
private |
Map from faces back to original ID.
Definition at line 160 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::faceMap(), and vtkUnstructuredReader::read().
|
private |
1D cells (=edges)
Definition at line 163 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::lines(), and vtkUnstructuredReader::read().
|
private |
Definition at line 165 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::lineMap(), and vtkUnstructuredReader::read().
|
private |
Cell based fields.
Definition at line 171 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::cellData(), and vtkUnstructuredReader::read().
|
private |
Point based fields.
Definition at line 174 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::pointData(), and vtkUnstructuredReader::read().
|
private |
Other fields.
Definition at line 177 of file vtkUnstructuredReader.H.
Referenced by vtkUnstructuredReader::otherData(), and vtkUnstructuredReader::read().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.