dune-vtk 2.12
Loading...
Searching...
No Matches
vtkwriter.hh
Go to the documentation of this file.
1#pragma once
2
7
8#define DUNE_VTK_DISABLE_DEPRECATION_WARNING
13#undef DUNE_VTK_DISABLE_DEPRECATION_WARNING
14
15#if HAVE_DUNE_SPGRID
16#include <dune/grid/spgrid.hh>
18#endif
19
21#include <dune/grid/yaspgrid.hh>
24
25namespace Dune::Vtk
26{
27 namespace Impl
28 {
29 // The default writer assumes an unstructured grid
30 template <class GridView, class Grid>
31 struct VtkWriterImpl
32 {
33 using type = Vtk::UnstructuredGridWriter<GridView, Vtk::CellTypeDataCollector<GridView>>;
34 };
35 }
36
38
45 template <class GridView>
47 : public Impl::VtkWriterImpl<GridView, typename GridView::Grid>::type
48 {
50
51 public:
52 using Super::Super;
53 };
54
55 // deduction guide
56 template <class GridView,
60
61
62 namespace Impl
63 {
64 // A structured grid with coordinates in x, y, and z direction with arbitrary spacing
65 template <class GridView, int dim, class Coordinates>
66 struct VtkWriterImpl<GridView, YaspGrid<dim,Coordinates>>
67 {
69 };
70
71#if HAVE_DUNE_SPGRID
72 // A structured grid with coordinates in x, y, and z direction with arbitrary spacing
73 template <class GridView, class ct, int dim, template <int> class Ref, class Comm>
74 struct VtkWriterImpl<GridView, SPGrid<ct,dim,Ref,Comm>>
75 {
77 };
78#endif
79
80 // A structured grid with coordinates in x, y, and z direction with arbitrary spacing
81 template <class GridView, int dim, class ct>
82 struct VtkWriterImpl<GridView, YaspGrid<dim,TensorProductCoordinates<ct,dim>>>
83 {
85 };
86
87 // A transformed structured grid has structured connectivity but unstructured point
88 // coordinates.
89 template <class GridView, int dim, class Coordinates, class CoordFunction, class Allocator>
90 struct VtkWriterImpl<GridView, GeometryGrid<YaspGrid<dim,Coordinates>, CoordFunction, Allocator>>
91 {
93 };
94
95 } // end namespace Impl
96} // end namespace Dune::Vtk
97
98namespace Dune
99{
100 template <class GridView>
101 class [[deprecated("Use Vtk::VtkWriter instead.")]] VtkWriter
102 : public Vtk::VtkWriter<GridView>
103 {
105 public:
106 using Base::Base;
107 };
108
109#pragma GCC diagnostic push
110#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
111 // deduction guide
112 template <class GridView,
116#pragma GCC diagnostic pop
117
118} // end namespace Dune
Definition writer.hh:16
FormatTypes
Type used for representing the output format.
Definition types.hh:19
DataTypes
Definition types.hh:51
size_type dim() const
Default choice of VTK Writer for several grid types.
Definition vtkwriter.hh:48
Definition vtkwriter.hh:103
File-Writer for RectilinearGrid VTK .vtr files.
Definition rectilineargridwriter.hh:23
File-Writer for StructuredGrid VTK .vts files.
Definition structuredgridwriter.hh:23
File-Writer for VTK .vtu files.
Definition unstructuredgridwriter.hh:23