Template Numerical Library: TNL::Meshes::Writers::VTKWriter< Mesh > Class Template Reference

Template Numerical Library version\ main:16b9213d5

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TNL::Meshes::Writers::VTKWriter< Mesh > Class Template Reference

Writer of data linked with meshes into VTK format. More...

`#include <TNL/Meshes/Writers/VTKWriter.h>`

Collaboration diagram for TNL::Meshes::Writers::VTKWriter< Mesh >:
[legend]

## Public Member Functions
| VTKWriter ()=delete
| Construct with no parameters is not allowed.
| VTKWriter (std::ostream &str, VTK::FileFormat format=VTK::FileFormat::binary)
| Constructor of a VTIWriter.
template<typename Array>
void | writeCellData (const Array &array, const std::string &name, int numberOfComponents=1)
| Writes data linked with mesh cells.
template<typename Array>
void | writeDataArray (const Array &array, const std::string &name, int numberOfComponents=1)
template<int EntityDimension = Mesh::getMeshDimension()>
void | writeEntities (const Mesh &mesh)
| Write mesh entities to the output file.
void | writeMetadata (std::int32_t cycle=-1, double time=-1)
| If desired, cycle and time of the simulation can put into the file.
template<typename Array>
void | writePointData (const Array &array, const std::string &name, int numberOfComponents=1)
| Writes data linked with mesh vertices.

## Protected Member Functions
void | writeHeader ()
void | writePoints (const Mesh &mesh)

## Protected Attributes
int | cellDataArrays = 0
std::uint64_t | cellsCount = 0
VTK::DataType | currentSection = VTK::DataType::CellData
VTK::FileFormat | format
bool | headerWritten = false
int | pointDataArrays = 0
std::uint64_t | pointsCount = 0
std::ostream | str

## Detailed Description

template<typename Mesh>
class TNL::Meshes::Writers::VTKWriter< Mesh >

Writer of data linked with meshes into VTK format.

Template Parameters

  Mesh | type of mesh.

## Constructor & Destructor Documentation

## ◆ VTKWriter()

template<typename Mesh>

TNL::Meshes::Writers::VTKWriter< Mesh >::VTKWriter | ( | std::ostream & | str,
|  | VTK::FileFormat | format = VTK::FileFormat::binary )

Constructor of a VTIWriter.

Parameters

  str | output stream used for the export of the data.
  format |

## Member Function Documentation

## ◆ writeCellData()

template<typename Mesh>
template<typename Array>

void TNL::Meshes::Writers::VTKWriter< Mesh >::writeCellData | ( | const Array & | array,
|  | const std::string & | name,
|  | int | numberOfComponents = 1 )

Writes data linked with mesh cells.

Template Parameters

  Array | type of array holding the data.

Parameters

  array | instance of an array holding the data.
  name | is a name of data which will appear in the outptu file.
  numberOfComponents | is number of compononets of the data for each cell.

## ◆ writeEntities()

template<typename Mesh>
template<int EntityDimension = Mesh::getMeshDimension()>

void TNL::Meshes::Writers::VTKWriter< Mesh >::writeEntities | ( | const Mesh & | mesh | ) |

Write mesh entities to the output file.

Template Parameters

  EntityDimension | is a dimension of entities to be exported.

Parameters

  mesh | is a mesh to be exported.

## ◆ writeMetadata()

template<typename Mesh>

void TNL::Meshes::Writers::VTKWriter< Mesh >::writeMetadata | ( | std::int32_t | cycle = -1,
|  | double | time = -1 )

If desired, cycle and time of the simulation can put into the file.

This follows the instructions at http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files

Parameters

  cycle | is the of the simulation.
  time | is the time of the simulation.

## ◆ writePointData()

template<typename Mesh>
template<typename Array>

void TNL::Meshes::Writers::VTKWriter< Mesh >::writePointData | ( | const Array & | array,
|  | const std::string & | name,
|  | int | numberOfComponents = 1 )

Writes data linked with mesh vertices.

Template Parameters

  Array | type of array holding the data.

Parameters

  array | instance of an array holding the data.
  name | is a name of data which will appear in the outptu file.
  numberOfComponents | is number of compononets of the data for each vertex.

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

- src/TNL/Meshes/Writers/VTKWriter.h