Peano
Loading...
Searching...
No Matches
PointWriter.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 pointdata {
12 class PointWriter;
13 }
14 }
15}
16
17
24 public:
25 virtual ~PointWriter() = default;
26
30 virtual bool writeToFile() = 0;
31
35 virtual bool isOpen() = 0;
36
42 virtual void clear() = 0;
43
44 virtual int plotPoint(const tarch::la::Vector<2,double>& position) = 0;
45 virtual int plotPoint(const tarch::la::Vector<3,double>& position) = 0;
46
51 public:
52 virtual ~PointDataWriter() {};
53
61 virtual void plot( int index, double value ) = 0;
62 virtual void plot( int index, const tarch::la::Vector<1,double>& value ) = 0;
63 virtual void plot( int index, const tarch::la::Vector<2,double>& value ) = 0;
64 virtual void plot( int index, const tarch::la::Vector<3,double>& value ) = 0;
65 virtual void plot( int index, double* values, int numberOfValues ) = 0;
66
71 virtual void close() = 0;
72
77 };
78
82 virtual PointDataWriter* createPointDataWriter( const std::string& identifier, int recordsPerPoint ) = 0;
83};
84
virtual void plot(int index, const tarch::la::Vector< 1, double > &value)=0
virtual void plot(int index, const tarch::la::Vector< 2, double > &value)=0
virtual void plot(int index, double *values, int numberOfValues)=0
virtual void plot(int index, double value)=0
Write data for one point.
virtual void close()=0
If you close your writer, each point has to be assigned a value, i.e.
virtual void plot(int index, const tarch::la::Vector< 3, double > &value)=0
Interface for all Plotters.
Definition PointWriter.h:23
virtual bool writeToFile()=0
Counterpart to close() on all the depending writers.
virtual int plotPoint(const tarch::la::Vector< 2, double > &position)=0
virtual int plotPoint(const tarch::la::Vector< 3, double > &position)=0
virtual void clear()=0
Clear the writer, i.e.
virtual PointDataWriter * createPointDataWriter(const std::string &identifier, int recordsPerPoint)=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