Peano
Loading...
Searching...
No Matches
VTKWriter.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "tarch/la/Vector.h"
9#include "../PointWriter.h"
10
11
12namespace tarch {
13 namespace plotter {
14 namespace pointdata {
15 namespace vtk {
16 class VTKWriter;
17 }
18 }
19 }
20}
21
22
36 private:
43
47
55 VTKWriter(const VTKWriter& writer) = delete;
56
64 VTKWriter& operator=(const VTKWriter& writer) = delete;
65
66 public:
73 VTKWriter(bool binaryFile, const std::string& fileName, const std::string& indexFileName, tarch::plotter::PVDTimeSeriesWriter::IndexFileMode modeFile, double timeStamp);
74
75 virtual ~VTKWriter();
76
88 virtual bool writeToFile() override;
89
93 virtual bool isOpen() override;
94
100 virtual void clear() override;
101
102 virtual int plotPoint(const tarch::la::Vector<2,double>& position) override;
103 virtual int plotPoint(const tarch::la::Vector<3,double>& position) override;
104
109 private:
114
116 public:
117 PointDataWriter(VTKWriter& myWriter, const std::string& identifier, int recordsPerPoint);
119
127 virtual void plot( int index, double value ) override;
128 virtual void plot( int index, const tarch::la::Vector<1,double>& value ) override;
129 virtual void plot( int index, const tarch::la::Vector<2,double>& value ) override;
130 virtual void plot( int index, const tarch::la::Vector<3,double>& value ) override;
131 virtual void plot( int index, double* values, int numberOfValues ) override;
132
150 virtual void close() override;
151
155 virtual void assignRemainingPointsDefaultValues() override;
156 };
157
161 virtual PointWriter::PointDataWriter* createPointDataWriter( const std::string& identifier, int recordsPerPoint ) override;
162};
163
Boolean semaphore across MPI ranks.
This is the vertex writer you have to create to plot the vertices.
Interface for all Plotters.
Definition PointWriter.h:23
virtual void plot(int index, double *values, int numberOfValues) override
virtual void plot(int index, const tarch::la::Vector< 3, double > &value) override
virtual void close() override
If you close your writer, each point has to be assigned a value, i.e.
virtual void plot(int index, double value) override
Write data for one point.
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexDataWriter * _particleDataWriter
Definition VTKWriter.h:115
virtual void plot(int index, const tarch::la::Vector< 2, double > &value) override
virtual void plot(int index, const tarch::la::Vector< 1, double > &value) override
PointDataWriter(VTKWriter &myWriter, const std::string &identifier, int recordsPerPoint)
Implementation of the point data writer that basically maps the points onto a vtk text file,...
Definition VTKWriter.h:35
VTKWriter(const VTKWriter &writer)=delete
Copy constructor.
tarch::plotter::griddata::unstructured::UnstructuredGridWriter * _vtkWriter
Definition VTKWriter.h:44
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellWriter * _cellWriter
Definition VTKWriter.h:46
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexWriter * _vertexWriter
Definition VTKWriter.h:45
virtual int plotPoint(const tarch::la::Vector< 2, double > &position) override
virtual int plotPoint(const tarch::la::Vector< 3, double > &position) override
VTKWriter & operator=(const VTKWriter &writer)=delete
Assignment operator.
static tarch::mpi::BooleanSemaphore _sempahore
This is a global (mpi) semaphore that I use to update/modify the index file over all files.
Definition VTKWriter.h:42
virtual void clear() override
Clear the writer, i.e.
virtual bool writeToFile() override
Before we write to a file, we have to close the.
VTKWriter(bool binaryFile, const std::string &fileName, const std::string &indexFileName, tarch::plotter::PVDTimeSeriesWriter::IndexFileMode modeFile, double timeStamp)
virtual PointWriter::PointDataWriter * createPointDataWriter(const std::string &identifier, int recordsPerPoint) override
Caller has to destroy this instance manually.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19
Simple vector class.
Definition Vector.h:159