bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
vtk_mesh_file_writer.h
Go to the documentation of this file.
1#ifndef VTK_MESH_FILE_WRITER_H
2#define VTK_MESH_FILE_WRITER_H
3
4#include "kernel/base/types.h"
5#include "kernel/utilities/file_writer_base.h"
6
7#include <string>
8#include <vector>
9
10namespace kernel
11{
12namespace numerics
13{
14
16{
17 std::vector<std::string> options;
18};
19
20template <int dim> class Mesh;
21
25class VtkMeshFileWriter : public FileWriterBase
26{
27
28 public:
30 VtkMeshFileWriter(const std::string &filename, bool open_file = false);
31
34 void write_mesh(const Mesh<2> &mesh);
35
38 void write_mesh(const Mesh<2> &mesh, const VtkMeshMeshCellOptions &options);
39
43 void write_mesh(const Mesh<2> &mesh, const std::vector<real_t> &cell_values,
44 const std::string &option_name);
45
48 virtual void write_header() override;
49
50 protected:
51 virtual void write_option(const Mesh<2> &mesh, const std::string &name);
52};
53
54} // namespace numerics
55
56} // namespace kernel
57
58#endif // VTK_MESH_FILE_WRITER_H
Definition vtk_mesh_file_writer.h:20
Write the given Mesh object in a VTK format.
Definition vtk_mesh_file_writer.h:26
virtual void write_option(const Mesh< 2 > &mesh, const std::string &name)
Definition vtk_mesh_file_writer.cpp:145
virtual void write_header() override
Write the header of the file. By default some information such as date and time the file was created ...
Definition vtk_mesh_file_writer.cpp:24
void write_mesh(const Mesh< 2 > &mesh)
Write the mesh into the file specified in constructor of this class.
Definition vtk_mesh_file_writer.cpp:45
Definition line_mesh_utils.cpp:13
Definition vtk_mesh_file_writer.h:16
std::vector< std::string > options
Definition vtk_mesh_file_writer.h:17