Peano
Loading...
Searching...
No Matches
TraversalVTKPlotter.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#include "TraversalObserver.h"
6
7#include "tarch/logging/Log.h"
10
12
13#include "config.h"
14
15namespace peano4 {
16 namespace grid {
17 class TraversalVTKPlotter;
18 }
19}
20
49 protected:
51
52 const std::string _filename;
53 const int _spacetreeId;
54
58 void plotCell(
59 const GridTraversalEvent& event
60 );
61
62 private:
68
70
71 public:
78 TraversalVTKPlotter( const std::string& filename, int treeId=-1 );
79 virtual ~TraversalVTKPlotter();
80
81 virtual void beginTraversal(
84 ) override;
85
86 virtual void endTraversal(
89 ) override;
90
91 virtual void loadCell(
92 const GridTraversalEvent& event
93 ) override;
94
95 virtual void storeCell(
96 const GridTraversalEvent& event
97 ) override;
98
99 virtual void enterCell(
100 const GridTraversalEvent& event
101 ) override;
102
103 virtual void leaveCell(
104 const GridTraversalEvent& event
105 ) override;
106
107 virtual TraversalObserver* clone(int spacetreeId) override;
108
112 virtual std::vector< GridControlEvent > getGridControlEvents() const override;
113};
Observer which pipes the automaton transitions into a VTK file.
static tarch::logging::Log _log
virtual void loadCell(const GridTraversalEvent &event) override
virtual std::vector< GridControlEvent > getGridControlEvents() const override
Obviously empty for this particular observer.
TraversalVTKPlotter(const std::string &filename, int treeId=-1)
You have to invoke startNewSnapshot() if you wanna have a pvd file immediately after you've created t...
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellDataWriter * _spacetreeIdWriter
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellDataWriter * _coreWriter
virtual TraversalObserver * clone(int spacetreeId) override
virtual void endTraversal(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h) override
static tarch::mpi::BooleanSemaphore _sempahore
tarch::plotter::griddata::unstructured::vtk::VTUTextFileWriter * _writer
virtual void leaveCell(const GridTraversalEvent &event) override
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellWriter * _cellWriter
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexWriter * _vertexWriter
virtual void beginTraversal(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h) override
Begin the traversal.
virtual void storeCell(const GridTraversalEvent &event) override
virtual void enterCell(const GridTraversalEvent &event) override
Event is invoked per cell.
void plotCell(const GridTraversalEvent &event)
Does the actual plotting, i.e.
Log Device.
Definition Log.h:516
Boolean semaphore across MPI ranks.
This is the vertex writer you have to create to plot the vertices.
Simple vector class.
Definition Vector.h:150