dune-vtk 2.12
Loading...
Searching...
No Matches
imagedatawriter.hh
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <iosfwd>
5#include <map>
6
8#include <dune/vtk/types.hh>
12
13
14namespace Dune::Vtk
15{
17
21 template <class GridView, class DataCollector = StructuredDataCollector<GridView>>
23 : public VtkWriterBase<GridView, DataCollector>
24 {
26 using pos_type = typename Super::pos_type;
27
28 public:
30 using Super::Super;
31
32 private:
34 virtual void writeSerialFile (std::ofstream& out) const override;
35
39 virtual void writeParallelFile (std::ofstream& out, std::string const& pfilename, int size) const override;
40
41 virtual std::string fileExtension () const override
42 {
43 return "vti";
44 }
45
46 virtual void writeGridAppended (std::ofstream& /*out*/, std::vector<std::uint64_t>& /*blocks*/) const override {}
47
48 private:
50 using Super::format_;
51 using Super::datatype_;
53
54 // attached data
56 using Super::cellData_;
57 };
58
59 // deduction guides
60 template <class GridView, class... Args,
64
65 template <class DataCollector, class... Args,
67 ImageDataWriter(DataCollector&, Args...)
69
70 template <class DataCollector, class... Args,
72 ImageDataWriter(DataCollector&&, Args...)
74
75 template <class DataCollector, class... Args,
79
80} // end namespace Dune::Vtk
81
Definition writer.hh:16
decltype((std::declval< GV >().grid(), std::declval< GV >().indexSet(), std::declval< GV >().size(0), std::declval< GV >().size(std::declval< Dune::GeometryType >()), CheckTypes< typename GV::Grid, typename GV::IndexSet >{}, true)) IsGridView
Definition concepts.hh:25
decltype((std::declval< DC & >().update(), std::declval< DC >().numPoints(), std::declval< DC >().numCells(), CheckTypes< typename DC::GridView >{}, true)) IsDataCollector
Definition concepts.hh:16
int size() const
Base class for file writers for the Vtk XML file formats.
Definition vtkwriterbase.hh:26
std::vector< VtkFunction > pointData_
Definition vtkwriterbase.hh:322
Vtk::DataTypes datatype_
Definition vtkwriterbase.hh:317
typename std::ostream::pos_type pos_type
Definition vtkwriterbase.hh:39
Vtk::FormatTypes format_
Definition vtkwriterbase.hh:316
std::vector< VtkFunction > cellData_
Definition vtkwriterbase.hh:323
Vtk::DataTypes headertype_
Definition vtkwriterbase.hh:318
std::shared_ptr< DataCollector > dataCollector_
Definition vtkwriterbase.hh:314
File-Writer for ImageData VTK .vti files.
Definition imagedatawriter.hh:24