Peano
Loading...
Searching...
No Matches
UnstructuredGridWriter.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"
7
8
9namespace tarch {
10 namespace plotter {
11 namespace griddata {
12 namespace unstructured {
14 }
15 }
16 }
17}
18
19
21 public:
22 virtual ~UnstructuredGridWriter() = default;
23
27 virtual bool writeToFile() = 0;
28
32 virtual bool isOpen() = 0;
33
39 virtual void clear() = 0;
40
45 public:
46 virtual ~CellDataWriter() {};
47
56 virtual void plotCell( int index, double value ) = 0;
57 virtual void plotCell( int index, const tarch::la::Vector<2,double>& value ) = 0;
58 virtual void plotCell( int index, const tarch::la::Vector<3,double>& value ) = 0;
59 virtual void plotCell( int index, double* values, int numberOfValues ) = 0;
60
66 virtual void close() = 0;
67
72 };
73
78 public:
79 virtual ~VertexDataWriter() {};
80
89 virtual void plotVertex( int index, double value ) = 0;
90 virtual void plotVertex( int index, const tarch::la::Vector<2,double>& value ) = 0;
91 virtual void plotVertex( int index, const tarch::la::Vector<3,double>& value ) = 0;
92 virtual void plotVertex( int index, double* values, int numberOfValues ) = 0;
93
94 virtual void close() = 0;
95
100 };
101
105 virtual CellDataWriter* createCellDataWriter( const std::string& identifier, int recordsPerCell ) = 0;
106
110 virtual VertexDataWriter* createVertexDataWriter( const std::string& identifier, int recordsPerVertex ) = 0;
111
121 public:
122 virtual ~VertexWriter() {}
123
124 virtual int plotVertex(const tarch::la::Vector<2,double>& position) = 0;
125 virtual int plotVertex(const tarch::la::Vector<3,double>& position) = 0;
126
127 virtual void close() = 0;
128 };
129
134 public:
135 virtual ~CellWriter() {}
136
137 virtual int plotHexahedron(int vertexIndex[8]) = 0;
138 virtual int plotQuadrangle(int vertexIndex[4]) = 0;
139 virtual int plotLine(int vertexIndex[2]) = 0;
140 virtual int plotPoint(int vertexIndex) = 0;
141 virtual int plotTriangle(int vertexIndex[3]) = 0;
142
143 virtual void close() = 0;
144 };
145
151
157};
158
159
virtual void plotCell(int index, const tarch::la::Vector< 3, double > &value)=0
virtual void plotCell(int index, const tarch::la::Vector< 2, double > &value)=0
virtual void plotCell(int index, double value)=0
Write data for one cell.
virtual void close()=0
If you close your writer, each cell/vertex has to be assigned a value, i.e.
virtual void plotCell(int index, double *values, int numberOfValues)=0
virtual void plotVertex(int index, double *values, int numberOfValues)=0
virtual void plotVertex(int index, double value)=0
Write data for one cell.
virtual void plotVertex(int index, const tarch::la::Vector< 3, double > &value)=0
virtual void plotVertex(int index, const tarch::la::Vector< 2, double > &value)=0
This is the vertex writer you have to create to plot the vertices.
virtual int plotVertex(const tarch::la::Vector< 2, double > &position)=0
virtual int plotVertex(const tarch::la::Vector< 3, double > &position)=0
virtual VertexDataWriter * createVertexDataWriter(const std::string &identifier, int recordsPerVertex)=0
Caller has to destroy this instance manually.
virtual VertexWriter * createVertexWriter()=0
Caller has to destroy this instance manually.
virtual CellDataWriter * createCellDataWriter(const std::string &identifier, int recordsPerCell)=0
Caller has to destroy this instance manually.
virtual CellWriter * createCellWriter()=0
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