dune-vtk 2.12
Loading...
Searching...
No Matches
structuredgridwriter.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
13namespace Dune::Vtk
14{
16
20 template <class GridView, class DataCollector = StructuredDataCollector<GridView>>
22 : public VtkWriterBase<GridView, DataCollector>
23 {
25 using pos_type = typename Super::pos_type;
26
27 public:
29 using Super::Super;
30
31 private:
33 virtual void writeSerialFile (std::ofstream& out) const override;
34
38 virtual void writeParallelFile (std::ofstream& out, std::string const& pfilename, int size) const override;
39
40 virtual std::string fileExtension () const override
41 {
42 return "vts";
43 }
44
45 virtual void writeGridAppended (std::ofstream& out, std::vector<std::uint64_t>& blocks) const override;
46
47 private:
49 using Super::format_;
50 using Super::datatype_;
52
53 // attached data
55 using Super::cellData_;
56 };
57
58 // deduction guides
59 template <class GridView, class... Args,
63
64 template <class DataCollector, class... Args,
66 StructuredGridWriter(DataCollector&, Args...)
68
69 template <class DataCollector, class... Args,
71 StructuredGridWriter(DataCollector&&, Args...)
73
74 template <class DataCollector, class... Args,
78
79} // end namespace Dune::Vtk
80
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 StructuredGrid VTK .vts files.
Definition structuredgridwriter.hh:23