Template Numerical Library: TNL::Meshes::Readers::VTKReader Class Reference

Template Numerical Library version\ main:be7e16d88

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
TNL::Meshes::Readers::VTKReader Class Reference
Inheritance diagram for TNL::Meshes::Readers::VTKReader:
[legend]
Collaboration diagram for TNL::Meshes::Readers::VTKReader:
[legend]

## Public Member Functions
| VTKReader (const std::string &fileName)
void | detectMesh () override
| Main method responsible for reading the mesh file.
VariantVector | readCellData (const std::string &arrayName) const override
VariantVector | readPointData (const std::string &arrayName) const override
void | reset () override
| This method resets the reader to an empty state.
Public Member Functions inherited from TNL::Meshes::Readers::MeshReader
| MeshReader (std::string fileName)
void | forceGlobalIndexType (std::string globalIndexType)
void | forceLocalIndexType (std::string localIndexType)
void | forceRealType (std::string realType)
VTK::EntityShape | getCellShape () const
std::string | getGlobalIndexType () const
std::string | getLocalIndexType () const
int | getMeshDimension () const
std::string | getMeshType () const
std::string | getRealType () const
int | getSpaceDimension () const
template<typename MeshType>
std::enable_if_t< ! isGrid< MeshType >::value &&std::is_same_v< typename MeshType::DeviceType, Devices::GPU > > | loadMesh (MeshType &mesh)
| Method which loads the intermediate mesh representation into a mesh object.
template<typename MeshType>
std::enable_if_t< ! isGrid< MeshType >::value &&! std::is_same_v< typename MeshType::DeviceType, Devices::GPU > > | loadMesh (MeshType &mesh)
| Method which loads the intermediate mesh representation into a mesh object.
template<typename MeshType>
std::enable_if_t< isGrid< MeshType >::value > | loadMesh (MeshType &mesh)
| Method which loads the intermediate mesh representation into a mesh object.
void | setFileName (const std::string &fileName)

## Protected Member Functions
void | findSections (std::istream &str)
void | parseHeader (std::istream &str)
template<typename T>
std::vector< T > | readDataArray (std::istream &str, std::int32_t values) const
VariantVector | readPointOrCellData (std::string sectionName, const std::string &arrayName) const
Protected Member Functions inherited from TNL::Meshes::Readers::MeshReader
template<typename T>
void | reset_std_vectors (std::vector< T > &v)
template<typename T, typename... Ts>
void | reset_std_vectors (std::vector< T > &v, std::vector< Ts > &... vs)
void | resetBase ()
| Resets the base class MeshReader to the empty state.

## Static Protected Member Functions
template<typename T>
static T | readValue (VTK::FileFormat format, std::istream &str)
static std::string | rstrip_cr (const std::string &string)
static void | skip_meta (std::istream &str)
static void | skipValue (VTK::FileFormat format, std::istream &str, const std::string &datatype)

## Protected Attributes
std::int32_t | cells_count = 0
VTK::FileFormat | dataFormat = VTK::FileFormat::ascii
std::string | dataset
std::string | formatVersion
std::int32_t | points_count = 0
std::map< std::string, std::ios::pos_type > | sectionPositions
Protected Attributes inherited from TNL::Meshes::Readers::MeshReader
VariantVector | cellConnectivityArray
VariantVector | cellOffsetsArray
VTK::EntityShape | cellShape = VTK::EntityShape::Vertex
std::string | connectivityType
VariantVector | faceConnectivityArray
VariantVector | faceOffsetsArray
std::string | fileName
std::string | forcedGlobalIndexType
std::string | forcedLocalIndexType = "std::int16_t"
std::string | forcedRealType
std::vector< std::int64_t > | gridExtent
std::vector< double > | gridOrigin
std::vector< double > | gridSpacing
int | meshDimension = 0
std::string | meshType
std::size_t | NumberOfCells = 0
std::size_t | NumberOfFaces = 0
std::size_t | NumberOfPoints = 0
std::string | offsetsType
VariantVector | pointsArray
std::string | pointsType
int | spaceDimension = 0
VariantVector | typesArray
std::string | typesType

## Additional Inherited Members
Public Types inherited from TNL::Meshes::Readers::MeshReader
using | VariantVector

## Member Function Documentation

## ◆ detectMesh()

void TNL::Meshes::Readers::VTKReader::detectMesh | ( |  | ) |
| inlineoverridevirtual

Main method responsible for reading the mesh file.

The implementation has to set all protected attributes of this class such that the mesh representation can be loaded into the mesh object by the loadMesh method.

Implements TNL::Meshes::Readers::MeshReader.

## ◆ readCellData()

VariantVector TNL::Meshes::Readers::VTKReader::readCellData | ( | const std::string & | arrayName | ) | const
| inlinenodiscardoverridevirtual

Reimplemented from TNL::Meshes::Readers::MeshReader.

## ◆ readPointData()

VariantVector TNL::Meshes::Readers::VTKReader::readPointData | ( | const std::string & | arrayName | ) | const
| inlinenodiscardoverridevirtual

Reimplemented from TNL::Meshes::Readers::MeshReader.

## ◆ reset()

void TNL::Meshes::Readers::VTKReader::reset | ( |  | ) |
| inlineoverridevirtual

This method resets the reader to an empty state.

In particular, implementations should call the resetBase method to reset the arrays holding the intermediate mesh representation.

Reimplemented from TNL::Meshes::Readers::MeshReader.

The documentation for this class was generated from the following file:

- src/TNL/Meshes/Readers/VTKReader.h